Line data Source code
1 : /******************************************************************************
2 : *
3 : * Project: TIGER/Line Translator
4 : * Purpose: Implements TigerZeroCellID, providing access to .RTT 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 T_FILE_CODE[] = "T";
17 :
18 : static const TigerFieldInfo rtT_fields[] = {
19 : // fieldname fmt type OFTType beg end len bDefine bSet
20 : {"MODULE", ' ', ' ', OFTString, 0, 0, 8, 1, 0},
21 : {"FILE", 'L', 'N', OFTInteger, 6, 10, 5, 1, 1},
22 : {"TZID", 'R', 'N', OFTInteger, 11, 20, 10, 1, 1},
23 : {"SOURCE", 'L', 'A', OFTString, 21, 30, 10, 1, 1},
24 : {"FTRP", 'L', 'A', OFTString, 31, 47, 17, 1, 1}};
25 : static const TigerRecordInfo rtT_info = {
26 : rtT_fields, sizeof(rtT_fields) / sizeof(TigerFieldInfo), 47};
27 :
28 : /************************************************************************/
29 : /* TigerZeroCellID() */
30 : /************************************************************************/
31 :
32 0 : TigerZeroCellID::TigerZeroCellID(OGRTigerDataSource *poDSIn,
33 0 : CPL_UNUSED const char *pszPrototypeModule)
34 0 : : TigerFileBase(&rtT_info, T_FILE_CODE)
35 : {
36 0 : poDS = poDSIn;
37 0 : poFeatureDefn = new OGRFeatureDefn("ZeroCellID");
38 0 : poFeatureDefn->Reference();
39 0 : poFeatureDefn->SetGeomType(wkbNone);
40 :
41 : /* -------------------------------------------------------------------- */
42 : /* Fields from type T record. */
43 : /* -------------------------------------------------------------------- */
44 :
45 0 : AddFieldDefns(psRTInfo, poFeatureDefn);
46 0 : }
|