LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/tiger - tigerzipcodes.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 TigerZipCodes, providing access to .RT6 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 SIX_FILE_CODE[] = "6";
      17             : 
      18             : static const TigerFieldInfo rt6_fields[] = {
      19             :     // fieldname    fmt  type OFTType     beg  end  len  bDefine bSet
      20             :     {"MODULE", ' ', ' ', OFTString, 0, 0, 8, 1, 0},
      21             :     {"TLID", 'R', 'N', OFTInteger, 6, 15, 10, 1, 1},
      22             :     {"RTSQ", 'R', 'N', OFTInteger, 16, 18, 3, 1, 1},
      23             :     {"FRADDL", 'R', 'A', OFTString, 19, 29, 11, 1, 1},
      24             :     {"TOADDL", 'R', 'A', OFTString, 30, 40, 11, 1, 1},
      25             :     {"FRADDR", 'R', 'A', OFTString, 41, 51, 11, 1, 1},
      26             :     {"TOADDR", 'R', 'A', OFTString, 52, 62, 11, 1, 1},
      27             :     {"FRIADDL", 'L', 'A', OFTInteger, 63, 63, 1, 1, 1},
      28             :     {"TOIADDL", 'L', 'A', OFTInteger, 64, 64, 1, 1, 1},
      29             :     {"FRIADDR", 'L', 'A', OFTInteger, 65, 65, 1, 1, 1},
      30             :     {"TOIADDR", 'L', 'A', OFTInteger, 66, 66, 1, 1, 1},
      31             :     {"ZIPL", 'L', 'N', OFTInteger, 67, 71, 5, 1, 1},
      32             :     {"ZIPR", 'L', 'N', OFTInteger, 72, 76, 5, 1, 1}};
      33             : static const TigerRecordInfo rt6_info = {
      34             :     rt6_fields, sizeof(rt6_fields) / sizeof(TigerFieldInfo), 76};
      35             : 
      36             : /************************************************************************/
      37             : /*                            TigerZipCodes()                           */
      38             : /************************************************************************/
      39             : 
      40           0 : TigerZipCodes::TigerZipCodes(OGRTigerDataSource *poDSIn,
      41           0 :                              CPL_UNUSED const char *pszPrototypeModule)
      42           0 :     : TigerFileBase(&rt6_info, SIX_FILE_CODE)
      43             : 
      44             : {
      45           0 :     poDS = poDSIn;
      46           0 :     poFeatureDefn = new OGRFeatureDefn("ZipCodes");
      47           0 :     poFeatureDefn->Reference();
      48           0 :     poFeatureDefn->SetGeomType(wkbNone);
      49             : 
      50             :     /* -------------------------------------------------------------------- */
      51             :     /*      Fields from type 6 record.                                      */
      52             :     /* -------------------------------------------------------------------- */
      53             : 
      54           0 :     AddFieldDefns(psRTInfo, poFeatureDefn);
      55           0 : }

Generated by: LCOV version 1.14