Coverage Report

Created: 2026-03-30 09:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/ogr/ogrsf_frmts/tiger/tigerzipplus4.cpp
Line
Count
Source
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
TigerZipPlus4::TigerZipPlus4(OGRTigerDataSource *poDSIn,
33
                             CPL_UNUSED const char *pszPrototypeModule)
34
8
    : TigerFileBase(&rtZ_info, Z_FILE_CODE)
35
8
{
36
8
    poDS = poDSIn;
37
8
    poFeatureDefn = new OGRFeatureDefn("ZipPlus4");
38
8
    poFeatureDefn->Reference();
39
8
    poFeatureDefn->SetGeomType(wkbNone);
40
41
    /* -------------------------------------------------------------------- */
42
    /*      Fields from type Z record.                                      */
43
    /* -------------------------------------------------------------------- */
44
8
    AddFieldDefns(psRTInfo, poFeatureDefn);
45
8
}
46
47
8
TigerZipPlus4::~TigerZipPlus4() = default;