Skip to content

fix(bake): stop coarse lines double-drawing across bands#12

Merged
beetlebugorg merged 1 commit into
mainfrom
fix/resare-cross-band-double-draw
Jun 25, 2026
Merged

fix(bake): stop coarse lines double-drawing across bands#12
beetlebugorg merged 1 commit into
mainfrom
fix/resare-cross-band-double-draw

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

Cross-band best-available suppression used one whole-tile (centre + 4 corners) test for every non-point prim. That relaxation exists so opaque area FILLS don't get seam holes — a finer fill is drawn on top and occludes the coarse one. But LINES don't occlude: each per-band archive is a separate client source with no maxzoom cap on the fine bands, so a coarse line kept in any partially-covered seam tile draws twice — the finer band redraws the same RESARE/CTNARE boundary, depth contour or coastline beside it (the reported doubled restricted-area outline at the approach/harbor overlap zoom).

Split the suppression by geometry: lines suppress by the tile centre (yield only where the centre has no finer cell); fills keep the 5-corner whole-tile test. Fills are unchanged; line double-draw drops to at most ~1-tile seam slivers where the finer cell genuinely has no data.

Add TestCrossBandLineNoDoubleDraw (real US4MD81M+US5MD1MC pair): asserts no tile carrying a line in both bands has its centre covered by a finer cell — fails on the old code (interior double-draws), passes now.

Cross-band best-available suppression used one whole-tile (centre + 4
corners) test for every non-point prim. That relaxation exists so opaque
area FILLS don't get seam holes — a finer fill is drawn on top and
occludes the coarse one. But LINES don't occlude: each per-band archive
is a separate client source with no maxzoom cap on the fine bands, so a
coarse line kept in any partially-covered seam tile draws twice — the
finer band redraws the same RESARE/CTNARE boundary, depth contour or
coastline beside it (the reported doubled restricted-area outline at the
approach/harbor overlap zoom).

Split the suppression by geometry: lines suppress by the tile centre
(yield only where the centre has no finer cell); fills keep the 5-corner
whole-tile test. Fills are unchanged; line double-draw drops to at most
~1-tile seam slivers where the finer cell genuinely has no data.

Add TestCrossBandLineNoDoubleDraw (real US4MD81M+US5MD1MC pair): asserts
no tile carrying a line in both bands has its centre covered by a finer
cell — fails on the old code (interior double-draws), passes now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beetlebugorg beetlebugorg merged commit 61eae96 into main Jun 25, 2026
4 checks passed
@beetlebugorg beetlebugorg deleted the fix/resare-cross-band-double-draw branch June 25, 2026 11:20
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