03_Core_ConceptsFile_FormatsFile Format - CSV

File Format - CSV

Purpose

CSV files provide comma-delimited point data for HAPI import and export workflows. HAPI supports ordinary mapped CSV files and a strict ECM-ready CSV mode.

General Architecture

CSV is not fixed-width. It must be parsed as a proper CSV file rather than by simple comma splitting, because Style Code fields may contain internal commas inside quoted strings, such as tree measurement strings.

Operating Modes

ModeTriggerBehaviour
Standard ModeUser selects a mapping pattern such as PNEZD or PENZ.Uses dynamic column mapping.
ECM Ready ModeUser explicitly selects ECM Ready.Uses strict seven-column extraction.

Standard CSV Data Keys

KeyFieldNotes
PPoint NumberUsed for downstream feature grouping.
NNorthingY-coordinate.
EEastingX-coordinate.
ZReduced LevelIf absent in a 2D mapping, Z should be treated as 0.000.
D / CPoint Code / DescriptionStores the raw Point Code / description string.

Rotation Handling

Standard survey CSV files do not normally include rotation data. Rotation should therefore be treated as zero unless supplied by ECM-ready mode or another explicit source.

ECM-ready CSV

For ECM-ready CSV details, use ECM_Ready_CSV_File_Format.

Edge Cases

Edge CaseRequired Treatment
Header rowDetect and skip text headers before processing data rows.
Quoted Style Code containing commasPreserve the quoted string as one field.
Mismatched mapping and column countTreat as invalid input rather than guessing missing columns.
Blank Style Code in ECM-ready modeDo not append a trailing space to the Raw Description.

Source Basis

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