Point Code Grouping Rules
Point Code Grouping Rules
Purpose
This note consolidates how HAPI groups survey records into linear strings, rectangles, and polygonal features.
Source Priority
- HAPI User Manual.pdf
- HAPI Quick Start Guide.pdf
- Point Code and Style Code.md
- Feature Catalogue Specification.md
High-Level Rule
Grouping behaviour depends on both:
- Feature_Type
- presence or absence of Numeric_Suffix
Linear Feature Grouping
Without Clustering Number
Default linear grouping uses the Sequential Connection Rule.
A line continues only while records:
- share the same Feature Code or resolved linear feature identity
- have consecutive Point Numbers
Any interruption by another Feature Code or by non-consecutive Point Numbers terminates the current feature and starts a new one.
With Clustering Number
Clustered linear grouping uses the Bridging Interrupted Sequences Rule.
All records sharing the same resolved Feature Code and Clustering Number are connected into one continuous line, even if unrelated codes appear between them.
Explicit Separation
Changing the Clustering Number creates a separate linear feature.
| Records | Result |
|---|---|
KX, KX, KX, point number break, KX | Two lines. |
KX01, KX01, G1, KX01 | One line. |
KX01, KX02 | Two lines. |
Polygonal Feature Grouping
Without Clustering Number
Default polygonal grouping uses the Sequential Subdivision Rule.
The system groups consecutive records with the same Point Code into predefined increments, normally three points, to calculate an enclosing rectangle. A four-point exception may form a four-sided polygon where exactly four consecutive records are supplied before the sequence is broken.
With Sizing Number
A one-digit Sizing_Number explicitly defines how many points are grouped to construct the enclosing rectangle.
With Clustering Number
A two-digit Clustering_Number changes polygon behaviour from rectangle fitting to irregular polygon enclosure.
All records sharing the same Feature Code and Clustering Number are grouped into a single polygonal feature, even if non-sequential.
| Records | Result |
|---|---|
FB, FB, FB, FB, FB, FB | Two three-point rectangle groups. |
FB, FB, FB, FB, then TE | One four-sided polygon before the sequence break. |
FB01 repeated across non-sequential points | One irregular polygon. |
FB01, then FB02 | Two separate polygon clusters. |
Supplementary Suffix Handling
Supplementary Suffixes should not break the parent feature grouping. For example, KX01G should still contribute to the KX01 geometry while also creating the compound feature indicated by G.
Implementation Notes
Preferred planned functions:
GroupSurveyRecordsGroupLinearRecordsGroupPolygonRecordsBuildLinearClusterKeyBuildPolygonClusterKeySplitSequentialGroupsResolveSupplementaryFeature
Recommended grouping key components:
| Feature Type | Grouping Key |
|---|---|
LINEAR without cluster | resolved Feature Code + consecutive Point Number run |
LINEAR with cluster | resolved Feature Code + Clustering Number |
POLYGON without cluster | Point Code + consecutive run + catalogue grouping length |
POLYGON with sizing | Feature Code + Sizing Number + consecutive run |
POLYGON with cluster | Feature Code + Clustering Number |
Related Notes
Open Questions
- Confirm how exactly the four-point polygon exception should interact with features whose catalogue grouping length is not three.