LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/tiger - tigerpolygoneconomic.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 TigerPolygonEconomic, providing access to .RTE files.
       5             :  * Author:   Mark Phillips, mbp@geomtech.com
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2002, Frank Warmerdam, Mark Phillips
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "ogr_tiger.h"
      14             : #include "cpl_conv.h"
      15             : 
      16             : static const char FILE_CODE[] = "E";
      17             : 
      18             : /* I think this was the expected RTE format, but was never deployed, leaving
      19             :    it in the code in case I am missing something.
      20             : 
      21             : static TigerFieldInfo rtE_fields[] = {
      22             :   // fieldname    fmt  type OFTType      beg  end  len  bDefine bSet
      23             :   { "MODULE",     ' ', ' ', OFTString,     0,   0,   8,       1,   0 },
      24             :   { "FILE",       'L', 'N', OFTInteger,    6,  10,   5,       1,   1 },
      25             :   { "CENID",      'L', 'A', OFTString,    11,  15,   5,       1,   1 },
      26             :   { "POLYID",     'R', 'N', OFTInteger,   16,  25,  10,       1,   1 },
      27             :   { "STATEEC",    'L', 'N', OFTInteger,   26,  27,   2,       1,   1 },
      28             :   { "COUNTYEC",   'L', 'N', OFTInteger,   28,  30,   3,       1,   1 },
      29             :   { "CONCITEC",   'L', 'N', OFTInteger,   31,  35,   5,       1,   1 },
      30             :   { "COUSUBEC",   'L', 'N', OFTInteger,   36,  40,   5,       1,   1 },
      31             :   { "PLACEEC",    'L', 'N', OFTInteger,   41,  45,   5,       1,   1 },
      32             :   { "AIANHHFPEC", 'L', 'N', OFTInteger,   46,  50,   5,       1,   1 },
      33             :   { "AIANHHEC",   'L', 'N', OFTInteger,   51,  54,   4,       1,   1 },
      34             :   { "AIAHHTLIEC", 'L', 'A', OFTString,    55,  55,   1,       1,   1 },
      35             :   { "RS_E1",      'L', 'A', OFTString,    56,  73,  18,       1,   1 }
      36             : };
      37             : */
      38             : 
      39             : static const TigerFieldInfo rtE_fields[] = {
      40             :     // fieldname    fmt  type OFTType      beg  end  len  bDefine bSet
      41             :     {"MODULE", ' ', ' ', OFTString, 0, 0, 8, 1, 0},
      42             :     {"FILE", 'L', 'N', OFTInteger, 6, 10, 5, 1, 1},
      43             :     {"CENID", 'L', 'A', OFTString, 11, 15, 5, 1, 1},
      44             :     {"POLYID", 'R', 'N', OFTInteger, 16, 25, 10, 1, 1},
      45             :     {"STATEEC", 'L', 'N', OFTInteger, 26, 27, 2, 1, 1},
      46             :     {"COUNTYEC", 'L', 'N', OFTInteger, 28, 30, 3, 1, 1},
      47             :     {"RS_E1", 'L', 'A', OFTString, 31, 35, 5, 1, 1},
      48             :     {"RS_E2", 'L', 'A', OFTString, 36, 40, 5, 1, 1},
      49             :     {"PLACEEC", 'L', 'N', OFTInteger, 41, 45, 5, 1, 1},
      50             :     {"RS-E3", 'L', 'A', OFTString, 46, 50, 5, 1, 1},
      51             :     {"RS-E4", 'L', 'A', OFTString, 51, 54, 4, 1, 1},
      52             :     {"RS-E5", 'L', 'A', OFTString, 55, 55, 1, 1, 1},
      53             :     {"COMMREGEC", 'L', 'N', OFTInteger, 56, 56, 1, 1, 1},
      54             :     {"RS_E6", 'L', 'A', OFTString, 57, 73, 17, 1, 1}};
      55             : static const TigerRecordInfo rtE_info = {
      56             :     rtE_fields, sizeof(rtE_fields) / sizeof(TigerFieldInfo), 73};
      57             : 
      58             : /************************************************************************/
      59             : /*                           TigerPolygonEconomic()                           */
      60             : /************************************************************************/
      61             : 
      62           0 : TigerPolygonEconomic::TigerPolygonEconomic(
      63           0 :     OGRTigerDataSource *poDSIn, CPL_UNUSED const char *pszPrototypeModule)
      64           0 :     : TigerFileBase(&rtE_info, FILE_CODE)
      65             : {
      66           0 :     poDS = poDSIn;
      67           0 :     poFeatureDefn = new OGRFeatureDefn("PolygonEconomic");
      68           0 :     poFeatureDefn->Reference();
      69           0 :     poFeatureDefn->SetGeomType(wkbNone);
      70             : 
      71             :     /* -------------------------------------------------------------------- */
      72             :     /*      Fields from type E record.                                      */
      73             :     /* -------------------------------------------------------------------- */
      74             : 
      75           0 :     AddFieldDefns(psRTInfo, poFeatureDefn);
      76           0 : }

Generated by: LCOV version 1.14