LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/tiger - tigerkeyfeatures.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 0 9 0.0 %
Date: 2024-11-21 22:18:42 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  TIGER/Line Translator
       4             :  * Purpose:  Implements TigerKeyFeatures, providing access to .RT9 files.
       5             :  * Author:   Frank Warmerdam, warmerdam@pobox.com
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 1999, Frank Warmerdam
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "ogr_tiger.h"
      14             : #include "cpl_conv.h"
      15             : 
      16             : static const char NINE_FILE_CODE[] = "9";
      17             : 
      18             : static const TigerFieldInfo rt9_fields[] = {
      19             :     // fieldname    fmt  type  OFTType      beg  end  len  bDefine bSet
      20             :     {"MODULE", ' ', ' ', OFTString, 0, 0, 8, 1, 0},
      21             :     {"FILE", 'L', 'N', OFTString, 6, 10, 5, 1, 1},
      22             :     {"STATE", 'L', 'N', OFTInteger, 6, 7, 2, 1, 1},
      23             :     {"COUNTY", 'L', 'N', OFTInteger, 8, 10, 3, 1, 1},
      24             :     {"CENID", 'L', 'A', OFTString, 11, 15, 5, 1, 1},
      25             :     {"POLYID", 'R', 'N', OFTInteger, 16, 25, 10, 1, 1},
      26             :     {"SOURCE", 'L', 'A', OFTString, 26, 26, 1, 1, 1},
      27             :     {"CFCC", 'L', 'A', OFTString, 27, 29, 3, 1, 1},
      28             :     {"KGLNAME", 'L', 'A', OFTString, 30, 59, 30, 1, 1},
      29             :     {"KGLADD", 'R', 'A', OFTString, 60, 70, 11, 1, 1},
      30             :     {"KGLZIP", 'L', 'N', OFTInteger, 71, 75, 5, 1, 1},
      31             :     {"KGLZIP4", 'L', 'N', OFTInteger, 76, 79, 4, 1, 1},
      32             :     {"FEAT", 'R', 'N', OFTInteger, 80, 87, 8, 1, 1}};
      33             : 
      34             : static const TigerRecordInfo rt9_info = {
      35             :     rt9_fields, sizeof(rt9_fields) / sizeof(TigerFieldInfo), 88};
      36             : 
      37             : /************************************************************************/
      38             : /*                         TigerKeyFeatures()                         */
      39             : /************************************************************************/
      40             : 
      41           0 : TigerKeyFeatures::TigerKeyFeatures(OGRTigerDataSource *poDSIn,
      42           0 :                                    CPL_UNUSED const char *pszPrototypeModule)
      43           0 :     : TigerFileBase(&rt9_info, NINE_FILE_CODE)
      44             : {
      45           0 :     poDS = poDSIn;
      46           0 :     poFeatureDefn = new OGRFeatureDefn("KeyFeatures");
      47           0 :     poFeatureDefn->Reference();
      48           0 :     poFeatureDefn->SetGeomType(wkbNone);
      49             : 
      50             :     /* -------------------------------------------------------------------- */
      51             :     /*      Fields from type 9 record.                                      */
      52             :     /* -------------------------------------------------------------------- */
      53             : 
      54           0 :     AddFieldDefns(psRTInfo, poFeatureDefn);
      55           0 : }

Generated by: LCOV version 1.14