LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/tiger - tigerspatialmetadata.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 TigerSpatialMetadata, providing access to .RTM files.
       5             :  * Author:   Frank Warmerdam, warmerdam@pobox.com
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2005, Frank Warmerdam <warmerdam@pobox.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "ogr_tiger.h"
      14             : #include "cpl_conv.h"
      15             : 
      16             : static const char M_FILE_CODE[] = "M";
      17             : 
      18             : static const TigerFieldInfo rtM_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             :     {"SOURCEID", 'L', 'A', OFTString, 19, 28, 10, 1, 1},
      24             :     {"ID", 'L', 'A', OFTString, 29, 46, 18, 1, 1},
      25             :     {"IDFLAG", 'R', 'A', OFTString, 47, 47, 1, 1, 1},
      26             :     {"RS-M1", 'L', 'A', OFTString, 48, 65, 18, 1, 1},
      27             :     {"RS-M2", 'L', 'A', OFTString, 66, 67, 2, 1, 1},
      28             :     {"RS-M3", 'L', 'A', OFTString, 68, 90, 23, 1, 1}};
      29             : static const TigerRecordInfo rtM_info = {
      30             :     rtM_fields, sizeof(rtM_fields) / sizeof(TigerFieldInfo), 90};
      31             : 
      32             : /************************************************************************/
      33             : /*                        TigerSpatialMetadata()                        */
      34             : /************************************************************************/
      35             : 
      36           0 : TigerSpatialMetadata::TigerSpatialMetadata(
      37           0 :     OGRTigerDataSource *poDSIn, CPL_UNUSED const char *pszPrototypeModule)
      38           0 :     : TigerFileBase(&rtM_info, M_FILE_CODE)
      39             : 
      40             : {
      41           0 :     poDS = poDSIn;
      42           0 :     poFeatureDefn = new OGRFeatureDefn("SpatialMetadata");
      43           0 :     poFeatureDefn->Reference();
      44           0 :     poFeatureDefn->SetGeomType(wkbNone);
      45             : 
      46             :     /* -------------------------------------------------------------------- */
      47             :     /*      Fields from record type H                                       */
      48             :     /* -------------------------------------------------------------------- */
      49             : 
      50           0 :     AddFieldDefns(psRTInfo, poFeatureDefn);
      51           0 : }

Generated by: LCOV version 1.14