03_Core_ConceptsStyle Code

Style Code

Purpose

This note defines the Style Code system used by HAPI ECM workflows.

Source Priority

  1. HAPI User Manual.pdf
  2. HAPI Quick Start Guide.pdf
  3. Point Code and Style Code.md
  4. FeatureCatalogue.json

Definition

A Style Code is a specialised descriptor used to convert real-world street furniture and surveyed features into standardised strings that explicitly describe their physical appearance.

While Point Codes define the geometric and survey-processing characteristics of survey records, Style Codes define ECM object appearance and style selection.

Core Components

ComponentMeaningRequirement
Style Type KeyPrimary style category of the object.Required where an ECM style is needed.
Style Variant KeySpecific visual variation of the primary style.Optional.
Component KeyAdditional attachment, component, measurement, or metadata.Optional.

Standalone Style Codes

Standalone ECM objects are typically generated from 1POINT, 2POINT, or POLYGON features.

Example forms:

ExampleInterpretation
FH HD-TKMFire Hydrant using Heavy Draw-off Hydrant style with variant/component key.
G1 GA1-450Grating using type GA1 with a 450 specification.
TE T01:12.0,3.0,0.5Tree number T01, height 12.0, spread 3.0, DBH 0.5.

Linear Style Codes

Linear ECM objects represent continuous street furniture spanning multiple vertices, such as railings.

Linear Style Codes are vertex-based. They reside in the Raw Description of the COGO Point below the line vertex and define the visual style of the segment extending forward from that vertex.

ComponentMeaning
Segment IndicatorSection classification such as intermediate or terminal.
Component IndexWhich component should be loaded for the relevant segment.

Common segment indicators:

IndicatorMeaning
XIntermediate section.
TTerminal section.

Example forms:

ExampleInterpretation
RX01 T2R-SD-T1Railing cluster with Type 2 Railing, Standard variant, terminal component.
RX02 TUB-PLAIN-X1Tubular Railing, Plain variant, intermediate component.

Tree Style Code

Tree (TE) Style Codes use a specialised dimensional format:

TreeNumber:Height,Spread,DBH

Examples:

Style CodeMeaning
T01:12.0,3.0,0.5Tree number T01, height 12.0, spread 3.0, DBH 0.5.
TREE:12.0,3.0,0.5No assigned tree number, full dimensions supplied.
TREE:12.0,3.0DBH omitted.
TREE:12.0Spread and DBH omitted.
TREENo tree dimension data supplied.

Business Rules

  1. Style Code is ECM-oriented; it should not replace Point Code geometry rules.
  2. Point Code resolves what the feature is and how it is geometrically processed.
  3. Style Code resolves how the feature should be represented as an ECM object.
  4. Linear Style Codes are vertex-based and can propagate forward until a new Style Code is encountered.
  5. Style Code parsing should be resilient to commas inside valid style metadata, especially for tree data.

Implementation Notes

Preferred planned functions:

  • ParseStyleCode
  • ResolveStyleTypeKey
  • ResolveStyleVariantKey
  • ResolveStyleComponentKey
  • BuildStyleRecord
  • ApplyLinearStylePropagation

Style parsing should be performed after Point Code parsing and Feature Catalogue resolution.

Open Questions

  • Confirm the complete Style Type Key dictionary and whether it should be generated directly from style JSON files.
Built with LogoFlowershow