Skip to content

Commit 4c57002

Browse files
beetlebugorgclaude
andcommitted
fix(s101): centre the M_NSYS direction-of-buoyage arrow on its area
DIRBOY01/A1/B1 carry their catalogue pivot at the arrow tail (SVG 0,0, bottom-centre), so anchoring the pivot at the region centre pushed the whole arrow ~30 mm north and out the top of the small demo regions. Set CentreOnArea so the client centres the glyph on the representative point instead (S-52 §8.5.1), keeping the arrow inside its box. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent aac9265 commit 4c57002

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/engine/portrayal/build.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,13 @@ func navSystemBuild(f *s57.Feature) FeatureBuild {
705705
arrow = "DIRBOYB1"
706706
}
707707
if a, ok := areaSurfacePoint(coordsToLatLon(exteriorRing(g))); ok {
708+
// Centre the arrow on the area's representative point: DIRBOY's catalogue
709+
// pivot sits at the arrow's tail (SVG 0,0, bottom-centre), so honouring it
710+
// would push the whole arrow ~30 mm north of the centre and out of a small
711+
// region. CentreOnArea centres the glyph instead (S-52 §8.5.1).
708712
prims = append(prims, SymbolCall{
709713
Anchor: a, SymbolName: arrow, RotationDeg: float32(orient), RotationTrueNorth: true,
710-
Scale: DefaultPxPerSymbolUnit, SoundingDepthM: nan32, DangerDepthM: nan32,
714+
CentreOnArea: true, Scale: DefaultPxPerSymbolUnit, SoundingDepthM: nan32, DangerDepthM: nan32,
711715
})
712716
}
713717
}

0 commit comments

Comments
 (0)