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