feat(web): enable the S-52 overscale pattern AP(OVERSC01) at scale bo…#32
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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.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.