Point Code
Point Code
Purpose
This note defines the Point Code system used by HAPI to interpret survey data and route it into drafting or modelling behaviours.
Source Priority
- HAPI User Manual.pdf
- HAPI Quick Start Guide.pdf
- User-confirmed project corrections
- Old implementation Markdown notes
Definition
A Point Code is the descriptor embedded in field data to define the characteristics and processing behaviour of a surveyed feature.
In HAPI, Point Codes are used to:
- identify the surveyed feature
- route the record to the correct Feature_Type
- control geometric grouping
- distinguish straight and curved linear segments
- define rectangular sizing behaviour
- link non-sequential records into one feature
- represent compound features at a single surveyed coordinate
Anatomy
Point Code = Feature Code + optional Segment Type Indicator + optional Numeric Suffix + optional Supplementary Suffix
| Component | Required | Meaning |
|---|---|---|
| Feature_Code | Yes | Alphabetical identifier for the surveyed feature. |
| Segment_Type_Indicator | Conditional | Indicator for straight or curved portions of certain linear features. |
| Numeric_Suffix | No | Numeric override for sizing or clustering behaviour. |
| Supplementary_Suffix | No | Alphabetical suffix for compound features. |
Examples
| Point Code | Interpretation |
|---|---|
KX | Kerb Bottom, straight/default linear point, no explicit cluster. |
KC | Kerb Bottom, curve-segment point. |
KX01 | Kerb Bottom, straight segment, Clustering Number 01. |
KC01 | Kerb Bottom, curve segment, Clustering Number 01. |
CP3 | Catch Pit using three points to construct an enclosing rectangle. |
FB02 | Flower Bed cluster 02, used to form an irregular polygon. |
KX01G | Kerb Bottom cluster 01 with compound Grating suffix. |
Business Rules
Feature Code Is the Primary Key
The Feature Code is the principal identifier used to resolve the feature and query the Feature_Catalogue.
Numeric Suffix Is Digit-Count Sensitive
| Digit Count | Type | Effect |
|---|---|---|
| 1 | Sizing_Number | Defines how many surveyed points are grouped for an enclosing rectangle. |
| 2 | Clustering_Number | Links related survey records that may be non-sequential. |
Segment Type Indicator Applies to Linear Features
Certain linear Feature Codes use their final character to distinguish straight and curved portions. For example, KX and KC represent straight and curved Kerb Bottom records respectively.
Supplementary Suffix Requires a Clustering Number
The Supplementary Suffix is appended after a two-digit Clustering Number and is only valid for selected Feature Codes.
Implementation Notes
Planned parser functions should use PascalCase names, for example:
ParsePointCodeResolveFeatureCodeTokenResolveParsedPointCodeBuildSurveyRecordFromSeed
Downstream logic should consume parsed fields such as FeatureCode, FeatureType, NumericSuffix, and SupplementarySuffix; it should not repeatedly re-parse raw Point Code strings.
Related Notes
- Feature_Code
- Feature_Type
- Segment_Type_Indicator
- Numeric_Suffix
- Sizing_Number
- Clustering_Number
- Supplementary_Suffix
- Point_Code_Grouping_Rules
- Feature_Catalogue
Open Questions
- Confirm the complete list of Feature Codes where Supplementary Suffixes are valid beyond the currently documented
FXandKXexamples.