Point Code Grouping Rules

Purpose

This note consolidates how HAPI groups survey records into linear strings, rectangles, and polygonal features.

Source Priority

  1. HAPI User Manual.pdf
  2. HAPI Quick Start Guide.pdf
  3. Point Code and Style Code.md
  4. Feature Catalogue Specification.md

High-Level Rule

Grouping behaviour depends on both:

  1. Feature_Type
  2. 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.

RecordsResult
KX, KX, KX, point number break, KXTwo lines.
KX01, KX01, G1, KX01One line.
KX01, KX02Two 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.

RecordsResult
FB, FB, FB, FB, FB, FBTwo three-point rectangle groups.
FB, FB, FB, FB, then TEOne four-sided polygon before the sequence break.
FB01 repeated across non-sequential pointsOne irregular polygon.
FB01, then FB02Two 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:

  • GroupSurveyRecords
  • GroupLinearRecords
  • GroupPolygonRecords
  • BuildLinearClusterKey
  • BuildPolygonClusterKey
  • SplitSequentialGroups
  • ResolveSupplementaryFeature

Recommended grouping key components:

Feature TypeGrouping Key
LINEAR without clusterresolved Feature Code + consecutive Point Number run
LINEAR with clusterresolved Feature Code + Clustering Number
POLYGON without clusterPoint Code + consecutive run + catalogue grouping length
POLYGON with sizingFeature Code + Sizing Number + consecutive run
POLYGON with clusterFeature Code + Clustering Number

Open Questions

  • Confirm how exactly the four-point polygon exception should interact with features whose catalogue grouping length is not three.
Built with LogoFlowershow