Skip to content

fix(portrayal): place centred area symbols per S-52 §8.5.1#15

Merged
beetlebugorg merged 1 commit into
mainfrom
bugfix/centred-area-symbol-placement
Jun 25, 2026
Merged

fix(portrayal): place centred area symbols per S-52 §8.5.1#15
beetlebugorg merged 1 commit into
mainfrom
bugfix/centred-area-symbol-placement

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

Centred area symbols (anchorages, restricted/cable/pipeline areas) were placed by putting the S-101 catalogue pivot on the area's point. For the "…RES" fan-out symbols that pivot is authored at the SVG corner, so the glyph hung ~100px off its area: misplaced (sometimes over a building), the tap at the area missed it, and it read as the symbol "moving around".

  • Anchor at the pole of inaccessibility (Mapbox polylabel), hole-aware, so the representative point stays inside concave areas and off holes (S-52 §8.5.3 representative point of an area).
  • Centre the PRIMARY centred symbol's glyph on that point "so it is evident which area the symbol applies to"; additional symbols keep the catalogue offset and fan out "to prevent overwriting" (S-52 §8.5.1 — a centred symbol plus offset extras). Baked as a pivot_center tag; the client selects a glyph-centred "ctr:" sprite variant for it.

Requires a re-bake. Not yet implemented: the §8.5.1 rule "if the centre of the symbol bounding box falls outside the area it must not be drawn" (zoom-dependent in a tiled renderer; needs a client render-time test).

Centred area symbols (anchorages, restricted/cable/pipeline areas) were
placed by putting the S-101 catalogue pivot on the area's point. For the
"…RES" fan-out symbols that pivot is authored at the SVG corner, so the
glyph hung ~100px off its area: misplaced (sometimes over a building),
the tap at the area missed it, and it read as the symbol "moving around".

- Anchor at the pole of inaccessibility (Mapbox polylabel), hole-aware, so
  the representative point stays inside concave areas and off holes
  (S-52 §8.5.3 representative point of an area).
- Centre the PRIMARY centred symbol's glyph on that point "so it is evident
  which area the symbol applies to"; additional symbols keep the catalogue
  offset and fan out "to prevent overwriting" (S-52 §8.5.1 — a centred
  symbol plus offset extras). Baked as a pivot_center tag; the client
  selects a glyph-centred "ctr:" sprite variant for it.

Requires a re-bake. Not yet implemented: the §8.5.1 rule "if the centre of
the symbol bounding box falls outside the area it must not be drawn"
(zoom-dependent in a tiled renderer; needs a client render-time test).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beetlebugorg beetlebugorg merged commit dbb3118 into main Jun 25, 2026
4 checks passed
@beetlebugorg beetlebugorg deleted the bugfix/centred-area-symbol-placement branch June 25, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant