Skip to content

render: write a dredged area's depth in the mariner's unit - #41

Merged
beetlebugorg merged 1 commit into
mainfrom
fix/dredged-area-units
Jul 31, 2026
Merged

render: write a dredged area's depth in the mariner's unit#41
beetlebugorg merged 1 commit into
mainfrom
fix/dredged-area-units

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

DredgedArea composes its label as "%gm" — the depth and a literal m — and appends the dredged date when the cell carries one. The value is metres only, so on a chart shown in feet it disagreed with the soundings beside it.

Surface gains an optional draw_depth_text. The emitter passes the raw metres and whatever followed the depth, and the surface writes the number, the unit and the trailer. The pixel, vector and GPU surfaces declare it. Feet read as whole feet, truncated down, the rule the soundings and contour labels already follow.

The bake keeps the metric string as the feature's text and stores the feet twin as text_ft beside the raw metres, so a tile reads in either unit and a consumer that knows nothing of depth units renders what it always did. The style's text-field reads text_ft in feet and falls back to text.

A label is rewritten only when its leading depth token matches the feature's DRVAL1, so a class whose label merely opens with a number keeps its own text.

DredgedArea composes its label as "%gm" — the depth and a literal m — and
appends the dredged date when the cell carries one. The value is metres only, so
on a chart shown in feet it disagreed with the soundings beside it.

Surface gains an optional draw_depth_text. The emitter passes the raw metres and
whatever followed the depth, and the surface writes the number, the unit and the
trailer. The pixel, vector and GPU surfaces declare it. Feet read as whole feet,
truncated down, the rule the soundings and contour labels already follow.

The bake keeps the metric string as the feature's text and stores the feet twin
as text_ft beside the raw metres, so a tile reads in either unit and a consumer
that knows nothing of depth units renders what it always did. The style's
text-field reads text_ft in feet and falls back to text.

A label is rewritten only when its leading depth token matches the feature's
DRVAL1, so a class whose label merely opens with a number keeps its own text.
@beetlebugorg
beetlebugorg merged commit dfffa38 into main Jul 31, 2026
5 checks passed
@beetlebugorg
beetlebugorg deleted the fix/dredged-area-units branch July 31, 2026 15:53
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