Line data Source code
1 : /******************************************************************************
2 : *
3 : * Project: TIGER/Line Translator
4 : * Purpose: Implements TigerPolygonCorrections, providing access to .RTB 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 B_FILE_CODE[] = "B";
17 :
18 : static const TigerFieldInfo rtB_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 : {"CENID", 'L', 'A', OFTString, 11, 15, 5, 1, 1},
23 : {"POLYID", 'R', 'N', OFTInteger, 16, 25, 10, 1, 1},
24 : {"STATECQ", 'L', 'N', OFTInteger, 26, 27, 2, 1, 1},
25 : {"COUNTYCQ", 'L', 'N', OFTInteger, 28, 30, 3, 1, 1},
26 : {"TRACTCQ", 'L', 'N', OFTInteger, 31, 36, 6, 1, 1},
27 : {"BLOCKCQ", 'L', 'A', OFTString, 37, 41, 5, 1, 1},
28 : {"AIANHHFPCQ", 'L', 'N', OFTInteger, 42, 46, 5, 1, 1},
29 : {"AIANHHCQ", 'L', 'N', OFTInteger, 47, 50, 4, 1, 1},
30 : {"AIHHTLICQ", 'L', 'A', OFTString, 51, 51, 1, 1, 1},
31 : {"AITSCECQ", 'L', 'N', OFTInteger, 52, 54, 3, 1, 1},
32 : {"AITSCQ", 'L', 'N', OFTInteger, 55, 59, 5, 1, 1},
33 : {"ANRCCQ", 'L', 'N', OFTInteger, 60, 64, 5, 1, 1},
34 : {"CONCITCQ", 'L', 'N', OFTInteger, 65, 69, 5, 1, 1},
35 : {"COUSUBCQ", 'L', 'N', OFTInteger, 70, 74, 5, 1, 1},
36 : {"SUBMCDCQ", 'L', 'N', OFTInteger, 75, 79, 5, 1, 1},
37 : {"PLACECQ", 'L', 'N', OFTInteger, 80, 84, 5, 1, 1},
38 : {"UACC", 'L', 'N', OFTInteger, 85, 89, 5, 1, 1},
39 : {"URCC", 'L', 'A', OFTString, 90, 90, 1, 1, 1},
40 : {"RS-B1", 'L', 'A', OFTString, 91, 98, 12, 1, 1},
41 : };
42 : static const TigerRecordInfo rtB_info = {
43 : rtB_fields, sizeof(rtB_fields) / sizeof(TigerFieldInfo), 98};
44 :
45 : /************************************************************************/
46 : /* TigerPolygonCorrections() */
47 : /************************************************************************/
48 :
49 0 : TigerPolygonCorrections::TigerPolygonCorrections(
50 0 : OGRTigerDataSource *poDSIn, const char * /* pszPrototypeModule */)
51 0 : : TigerFileBase(&rtB_info, B_FILE_CODE)
52 : {
53 0 : OGRFieldDefn oField("", OFTInteger);
54 :
55 0 : poDS = poDSIn;
56 0 : poFeatureDefn = new OGRFeatureDefn("PolygonCorrections");
57 0 : poFeatureDefn->Reference();
58 0 : poFeatureDefn->SetGeomType(wkbNone);
59 :
60 : /* -------------------------------------------------------------------- */
61 : /* Fields from type B record. */
62 : /* -------------------------------------------------------------------- */
63 0 : AddFieldDefns(psRTInfo, poFeatureDefn);
64 0 : }
|