LCOV - code coverage report
Current view: directory - ogr/ogrsf_frmts/tiger - tigerzerocellid.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 8 8 100.0 %
Date: 2011-12-18 Functions: 2 1 50.0 %

       1                 : /******************************************************************************
       2                 :  * $Id: tigerzerocellid.cpp 22961 2011-08-20 17:09:59Z rouault $
       3                 :  *
       4                 :  * Project:  TIGER/Line Translator
       5                 :  * Purpose:  Implements TigerZeroCellID, providing access to .RTT files.
       6                 :  * Author:   Mark Phillips, mbp@geomtech.com
       7                 :  *
       8                 :  ******************************************************************************
       9                 :  * Copyright (c) 2002, Frank Warmerdam, Mark Phillips
      10                 :  *
      11                 :  * Permission is hereby granted, free of charge, to any person obtaining a
      12                 :  * copy of this software and associated documentation files (the "Software"),
      13                 :  * to deal in the Software without restriction, including without limitation
      14                 :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      15                 :  * and/or sell copies of the Software, and to permit persons to whom the
      16                 :  * Software is furnished to do so, subject to the following conditions:
      17                 :  *
      18                 :  * The above copyright notice and this permission notice shall be included
      19                 :  * in all copies or substantial portions of the Software.
      20                 :  *
      21                 :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
      22                 :  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      23                 :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      24                 :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      25                 :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      26                 :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      27                 :  * DEALINGS IN THE SOFTWARE.
      28                 :  ****************************************************************************/
      29                 : 
      30                 : #include "ogr_tiger.h"
      31                 : #include "cpl_conv.h"
      32                 : 
      33                 : CPL_CVSID("$Id: tigerzerocellid.cpp 22961 2011-08-20 17:09:59Z rouault $");
      34                 : 
      35                 : #define FILE_CODE       "T"
      36                 : 
      37                 : static const TigerFieldInfo rtT_fields[] = {
      38                 :   // fieldname    fmt  type OFTType      beg  end  len  bDefine bSet bWrite
      39                 :   { "MODULE",     ' ', ' ', OFTString,     0,   0,   8,       1,   0,     0 },
      40                 :   { "FILE",       'L', 'N', OFTInteger,    6,  10,   5,       1,   1,     1 },
      41                 :   { "TZID",       'R', 'N', OFTInteger,   11,  20,  10,       1,   1,     1 },
      42                 :   { "SOURCE",     'L', 'A', OFTString,    21,  30,  10,       1,   1,     1 },
      43                 :   { "FTRP",       'L', 'A', OFTString,    31,  47,  17,       1,   1,     1 }
      44                 : };
      45                 : static const TigerRecordInfo rtT_info =
      46                 :   {
      47                 :     rtT_fields,
      48                 :     sizeof(rtT_fields) / sizeof(TigerFieldInfo),
      49                 :     47
      50                 :   };
      51                 : 
      52                 : /************************************************************************/
      53                 : /*                           TigerZeroCellID()                           */
      54                 : /************************************************************************/
      55                 : 
      56               7 : TigerZeroCellID::TigerZeroCellID( OGRTigerDataSource * poDSIn,
      57               7 :                               const char * pszPrototypeModule ) : TigerFileBase(&rtT_info, FILE_CODE)
      58                 : 
      59                 : {
      60               7 :     poDS = poDSIn;
      61               7 :     poFeatureDefn = new OGRFeatureDefn( "ZeroCellID" );
      62               7 :     poFeatureDefn->Reference();
      63               7 :     poFeatureDefn->SetGeomType( wkbNone );
      64                 : 
      65                 : /* -------------------------------------------------------------------- */
      66                 : /*      Fields from type T record.                                      */
      67                 : /* -------------------------------------------------------------------- */
      68                 : 
      69               7 :     AddFieldDefns( psRTInfo, poFeatureDefn );
      70                 : 
      71               7 : }

Generated by: LCOV version 1.7