Skip to content

feat(web): enable the S-52 overscale pattern AP(OVERSC01) at scale bo…#32

Merged
beetlebugorg merged 1 commit into
mainfrom
feat/overscale-indication
Jun 27, 2026
Merged

feat(web): enable the S-52 overscale pattern AP(OVERSC01) at scale bo…#32
beetlebugorg merged 1 commit into
mainfrom
feat/overscale-indication

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

…undaries

Re-enable the vertical-line overscale hatch that marks grossly-overscaled coarse data at a chart-scale boundary (S-52 §10.1.10.2), which had been disabled because the old heuristic over-triggered.

The pattern paints client-side over a coarse band's already-baked areas, inserted right below finer bands' opaque fills — so the layering confines the hatch to the holes where a coarser ENC shows through (the "area compiled from the smaller-scale ENC"). The fix is the spec gate: a band hatches only when a strictly FINER band is loaded (a real scale boundary exists). The finest band present never hatches — plain zoom-in of best-available data is the ×N-only case (§10.1.10.1), already shown in the HUD status bar.

  • chart-style.mjs: re-enable _pushOverscale; add the bandsPresent-driven finerBandPresent() gate; thread it to the server + pmtiles call sites.
  • chart-sources.mjs: loadedBands() (server: active sets' bands; pmtiles: loaded archives).
  • chart-canvas.mjs: pass bandsPresent into buildChartLayers.
  • chart-style.overscale.test.mjs: gate tests (coarse hatches iff a finer band is present; finest/lone/none never hatch; paints pat:OVERSC01).

No re-bake: OVERSC01 is already in the pattern atlas (a catalogue AreaFill) and registers lazily via styleimagemissing.

Known limitation: the gate is "a finer band present in the loaded set", not "at this location", so a genuinely coarse-only region can still hatch when finer charts are loaded elsewhere. The exact fix needs a baked overscale_areas layer.

…undaries

Re-enable the vertical-line overscale hatch that marks grossly-overscaled
coarse data at a chart-scale boundary (S-52 §10.1.10.2), which had been
disabled because the old heuristic over-triggered.

The pattern paints client-side over a coarse band's already-baked `areas`,
inserted right below finer bands' opaque fills — so the layering confines
the hatch to the holes where a coarser ENC shows through (the "area
compiled from the smaller-scale ENC"). The fix is the spec gate: a band
hatches only when a strictly FINER band is loaded (a real scale boundary
exists). The finest band present never hatches — plain zoom-in of
best-available data is the ×N-only case (§10.1.10.1), already shown in the
HUD status bar.

- chart-style.mjs: re-enable _pushOverscale; add the bandsPresent-driven
  finerBandPresent() gate; thread it to the server + pmtiles call sites.
- chart-sources.mjs: loadedBands() (server: active sets' bands; pmtiles:
  loaded archives).
- chart-canvas.mjs: pass bandsPresent into buildChartLayers.
- chart-style.overscale.test.mjs: gate tests (coarse hatches iff a finer
  band is present; finest/lone/none never hatch; paints pat:OVERSC01).

No re-bake: OVERSC01 is already in the pattern atlas (a catalogue
AreaFill) and registers lazily via styleimagemissing.

Known limitation: the gate is "a finer band present in the loaded set",
not "at this location", so a genuinely coarse-only region can still hatch
when finer charts are loaded elsewhere. The exact fix needs a baked
overscale_areas layer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beetlebugorg beetlebugorg merged commit 1a10897 into main Jun 27, 2026
4 checks passed
@beetlebugorg beetlebugorg deleted the feat/overscale-indication branch June 27, 2026 01:15
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