03_Core_ConceptsFile_FormatsFile Format - PT2

File Format - PT2

Purpose

PT2 is a fixed-width ESCS point data format used by HAPI for ordinary survey record import and traverse diagram plotting.

General Architecture

PT2 is positional rather than delimited. The file should be interpreted using fixed-width substring slices. Whitespace should be stripped after slicing.

Positional Anatomy

SliceField
[0:2]Record Status and Type
[3:15]Northing
[16:28]Easting
[29:39]Reduced Level / Elevation
[40:50]Point Code or Point Name, depending on mode
[51:53]Link Code / Control ID
[54:60]Point Number or Traverse Node Type

Record Status and Type

First Digit - Record Status

DigitStatusTreatment
0ActiveProcess as a normal shot.
1DeleteIgnore the row.
2Non-contourableTreat as active.
8Suppress R.L.Treat as active.

Second Digit - Record Type

DigitTypeTreatment
0Normal Shot LevelProcess as standard survey point.
1Occupied StationProcess as Survey Control Station.

Mode A - Survey Record Mode

Used by A1a_Plot_Survey_Data_From_Point_Data_File.

CaseTreatment
Normal shotParse [40:50] as Point Code.
Occupied StationOverride Point Code to STN; parse [40:50] as Point Name.
Control ID MappingIf [51:53] is not 00 or blank, prepend it to Point Name.

Mode B - Traverse Diagram Mode

Used by A2_Plot_Traverse_Diagram_From_File.

CaseTreatment
NSTNNew Station node.
KSTNKnown Station node.
LEGLine-of-sight leg; group by pairing ID in [51:53].

Edge Cases

  • Occupied Stations may have blank or alphanumeric point number fields. The old implementation note describes a retrospective lookahead method for assigning inferred point numbers.
  • Blank coordinate slices should be interpreted safely rather than causing a fatal numeric-cast failure.
  • Long alphanumeric station names may bleed into the point number area and should be treated as non-integer station metadata rather than a valid point number.

Source Basis

  • HAPI User Manual.pdf, Sections 2.3.1, 2.3.3, and 2.3.4.
  • File Format - PT2 File.md.
Built with LogoFlowershow