Line data Source code
1 : /******************************************************************************
2 : *
3 : * Project: TIGER/Line Translator
4 : * Purpose: Implements TigerZipPlus4, providing access to .RTZ 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 Z_FILE_CODE[] = "Z";
17 :
18 : static const TigerFieldInfo rtZ_fields[] = {
19 : // fieldname fmt type OFTType beg end len bDefine bSet
20 : {"MODULE", ' ', ' ', OFTString, 0, 0, 8, 1, 0},
21 : {"TLID", 'R', 'N', OFTInteger, 6, 15, 10, 1, 1},
22 : {"RTSQ", 'R', 'N', OFTInteger, 16, 18, 3, 1, 1},
23 : {"ZIP4L", 'L', 'N', OFTInteger, 19, 22, 4, 1, 1},
24 : {"ZIP4R", 'L', 'N', OFTInteger, 23, 26, 4, 1, 1}};
25 : static const TigerRecordInfo rtZ_info = {
26 : rtZ_fields, sizeof(rtZ_fields) / sizeof(TigerFieldInfo), 26};
27 :
28 : /************************************************************************/
29 : /* TigerZipPlus4() */
30 : /************************************************************************/
31 :
32 0 : TigerZipPlus4::TigerZipPlus4(OGRTigerDataSource *poDSIn,
33 0 : CPL_UNUSED const char *pszPrototypeModule)
34 0 : : TigerFileBase(&rtZ_info, Z_FILE_CODE)
35 : {
36 0 : poDS = poDSIn;
37 0 : poFeatureDefn = new OGRFeatureDefn("ZipPlus4");
38 0 : poFeatureDefn->Reference();
39 0 : poFeatureDefn->SetGeomType(wkbNone);
40 :
41 : /* -------------------------------------------------------------------- */
42 : /* Fields from type Z record. */
43 : /* -------------------------------------------------------------------- */
44 0 : AddFieldDefns(psRTInfo, poFeatureDefn);
45 0 : }
|