Line data Source code
1 : /******************************************************************************
2 : *
3 : * Project: TIGER/Line Translator
4 : * Purpose: Implements TigerOverUnder, providing access to .RTU 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 U_FILE_CODE[] = "U";
17 :
18 : static const TigerFieldInfo rtU_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 : {"RTSQ", 'R', 'N', OFTInteger, 21, 21, 1, 1, 1},
24 : {"TLIDOV1", 'R', 'N', OFTInteger, 22, 31, 10, 1, 1},
25 : {"TLIDOV2", 'R', 'N', OFTInteger, 32, 41, 10, 1, 1},
26 : {"TLIDUN1", 'R', 'N', OFTInteger, 42, 51, 10, 1, 1},
27 : {"TLIDUN2", 'R', 'N', OFTInteger, 52, 61, 10, 1, 1},
28 : {"FRLONG", 'R', 'N', OFTInteger, 62, 71, 10, 1, 1},
29 : {"FRLAT", 'R', 'N', OFTInteger, 72, 80, 9, 1, 1},
30 : };
31 : static const TigerRecordInfo rtU_info = {
32 : rtU_fields, sizeof(rtU_fields) / sizeof(TigerFieldInfo), 80};
33 :
34 : /************************************************************************/
35 : /* TigerOverUnder() */
36 : /************************************************************************/
37 :
38 0 : TigerOverUnder::TigerOverUnder(OGRTigerDataSource *poDSIn,
39 0 : CPL_UNUSED const char *pszPrototypeModule)
40 0 : : TigerPoint(&rtU_info, U_FILE_CODE)
41 : {
42 0 : poDS = poDSIn;
43 0 : poFeatureDefn = new OGRFeatureDefn("OverUnder");
44 0 : poFeatureDefn->Reference();
45 0 : poFeatureDefn->SetGeomType(wkbNone);
46 :
47 0 : AddFieldDefns(psRTInfo, poFeatureDefn);
48 0 : }
49 :
50 0 : OGRFeature *TigerOverUnder::GetFeature(int nRecordId)
51 : {
52 0 : return TigerPoint::GetFeature(nRecordId, 62, 71, 72, 80);
53 : }
|