| 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Project: TIGER/Line Translator |
| 4 | * Purpose: Implements TigerAreaLandmarks, providing access to .RT8 files. |
| 5 | * Author: Frank Warmerdam, [email protected] |
| 6 | * |
| 7 | ****************************************************************************** |
| 8 | * Copyright (c) 1999, Frank Warmerdam |
| 9 | * |
| 10 | * SPDX-License-Identifier: MIT |
| 11 | ****************************************************************************/ |
| 12 | |
| 13 | #include "ogr_tiger.h"cxx . . $ `<file>/ogr/ogrsf_frmts/tiger/ogr_tiger.h`/ |
| 14 | #include "cpl_conv.h"cxx . . $ `<file>/port/cpl_conv.h`/ |
| 15 | |
| 16 | static const char EIGHT_FILE_CODEcxx . . $ EIGHT_FILE_CODE.[] = "8"; |
| 17 | |
| 18 | static const TigerFieldInfocxx . . $ TigerFieldInfo# rt8_fieldscxx . . $ 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 TigerRecordInfocxx . . $ TigerRecordInfo# rt8_infocxx . . $ rt8_info. = { |
| 29 | rt8_fieldscxx . . $ rt8_fields., sizeof(rt8_fieldscxx . . $ rt8_fields.) / sizeof(TigerFieldInfocxx . . $ TigerFieldInfo#), 36}; |
| 30 | |
| 31 | /************************************************************************/ |
| 32 | /* TigerAreaLandmarks() */ |
| 33 | /************************************************************************/ |
| 34 | |
| 35 | TigerAreaLandmarkscxx . . $ TigerAreaLandmarks#::TigerAreaLandmarkscxx . . $ TigerAreaLandmarks#TigerAreaLandmarks(3e8ae09481b96ce4).( |
| 36 | OGRTigerDataSourcecxx . . $ OGRTigerDataSource# *poDSIn, CPL_UNUSEDcxx . . $ `port/cpl_port.h:1040:9`! const char *pszPrototypeModule) |
| 37 | : TigerFileBasecxx . . $ TigerFileBase#(&rt8_infocxx . . $ rt8_info., EIGHT_FILE_CODEcxx . . $ EIGHT_FILE_CODE.) |
| 38 | { |
| 39 | poDScxx . . $ TigerFileBase#poDS. = poDSIn; |
| 40 | poFeatureDefncxx . . $ TigerFileBase#poFeatureDefn. = new OGRFeatureDefncxx . . $ OGRFeatureDefn#("AreaLandmarks"); |
| 41 | poFeatureDefncxx . . $ TigerFileBase#poFeatureDefn.->Referencecxx . . $ OGRFeatureDefn#Reference(b126dc7c1de90089).(); |
| 42 | poFeatureDefncxx . . $ TigerFileBase#poFeatureDefn.->SetGeomTypecxx . . $ OGRFeatureDefn#SetGeomType(f47ce3f1fe923726).(wkbNone); |
| 43 | |
| 44 | /* -------------------------------------------------------------------- */ |
| 45 | /* Fields from type 8 record. */ |
| 46 | /* -------------------------------------------------------------------- */ |
| 47 | |
| 48 | AddFieldDefnscxx . . $ TigerFileBase#AddFieldDefns(ee614af56e2f1db1).(psRTInfocxx . . $ TigerFileBase#psRTInfo., poFeatureDefncxx . . $ TigerFileBase#poFeatureDefn.); |
| 49 | } |
| 50 | |
| 51 | TigerAreaLandmarkscxx . . $ TigerAreaLandmarks#::~cxx . . $ TigerAreaLandmarks#`~TigerAreaLandmarks`(ced63f7c635d850d).TigerAreaLandmarkscxx . . $ TigerAreaLandmarks#() = default; |