Feature/light labels#18
Merged
Merged
Conversation
Light characteristic strings (S-52 LITDSN, a CSP) were produced two ways:
the S-101 rule LITDSN02 for the rendered single-light label, and a separate
Go reimplementation (lightchar.go / BuildLightCharacteristic) for the
inspector tag and the co-located-light merge — which overwrote the Lua text.
The Go copy had drifted from the catalogue and emitted wrong strings:
spurious single group "Fl(1)R" (vs "Fl R"), missing category prefixes
("Aero "), and divergent LITCHR/COLOUR tables for higher codes.
Harvest the LITDSN02 DrawText the portrayal already produces (lightCharText)
for both the inspector and the co-located merge, and delete lightchar.go.
The catalogue is now the single source of truth for the characteristic.
Add TestLightTagFromCatalogue: bakes the golden cell and asserts the baked
`light` tags carry catalogue strings (no "(1)" artifact, aero prefix present).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
HostSpatialGetAssociatedFeatureIDs was bound to emptyArray, so the catalogue's SpatialAssociation:GetAssociatedFeatures() always returned nothing — the spatial co-location queries the LIGHTS06 rules rely on were dead. The 45° flare-fan (LightFlareAndDescription) and the co-located description stacking (GetColocatedTextCount -> TextVerticalOffset) could never fire. Index mapped point features by exact node position in Portray, and answer HostSpatialGetAssociatedFeatureIDs from it: a point spatial "<id>#P" resolves the feature, then returns everything sharing its node. Curve and surface spatials carry no node here, so they stay empty (no change). The baker keeps its own co-located-light merge (one flare + one deduped stacked label), which is cleaner than the catalogue's verbatim per-light stacking for NOAA's sectored/duplicate encodings — but the flare-fan and other spatial queries now behave per spec. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.