Skip to content

Commit f976d32

Browse files
beetlebugorgclaude
andcommitted
fix(portrayal): map VERCSA → verticalClearanceSafe ("sf clr" labels)
The S-101 catalogue models a feature's safe vertical clearance as the complex attribute verticalClearanceSafe; CableOverhead (and the other overhead rules) already emit the "sf clr %4.1f" label from it. But our S-57→S-101 attribute bridge synthesized only VERCCL/VERCLR/VERCOP/HORCLR — VERCSA was never mapped, so verticalClearanceSafe was always nil and the rule's safe-clearance branches fell through. Overhead cables/pipes carrying VERCSA (no VERCLR) showed just the dashed line with no clearance text. Add verticalClearanceSafe ← VERCSA to the clearances map. Verified on S-64 cell AA5DBASE (§3.1 Base, ref p100): now emits "sf clr 15.0" ×3 alongside "clr 10.0" ×3, matching the reference plot. Same class of S-101-model gap as the bridge vertical-clearance fix. Needs a re-bake. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3e74e67 commit f976d32

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

internal/engine/s101/host.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,14 @@ func (e *Engine) bindHost() {
207207
}
208208

209209
// clearances maps each S-101 clearance complex attribute to the S-57 simple
210-
// attribute that backs it and the value sub-attribute the rules read. Bridges
211-
// carry clearances as S-57 simple attributes (VERCCL/VERCLR/HORCLR/VERCOP); the
212-
// S-101 catalogue models them as complex attributes wrapping a *Value field.
210+
// attribute that backs it and the value sub-attribute the rules read. Bridges and
211+
// overhead cables/pipes carry clearances as S-57 simple attributes
212+
// (VERCCL/VERCLR/VERCSA/HORCLR/VERCOP); the S-101 catalogue models them as complex
213+
// attributes wrapping a *Value field.
213214
var clearances = map[string]struct{ s57, value string }{
214215
"verticalClearanceClosed": {"VERCCL", "verticalClearanceValue"},
215216
"verticalClearanceFixed": {"VERCLR", "verticalClearanceValue"},
217+
"verticalClearanceSafe": {"VERCSA", "verticalClearanceValue"},
216218
"verticalClearanceOpen": {"VERCOP", "verticalClearanceValue"},
217219
"horizontalClearanceFixed": {"HORCLR", "horizontalClearanceValue"},
218220
}

0 commit comments

Comments
 (0)