Zooming in shows a checkerboard of placeholder tiles when overview tiles are smaller than full-resolution tiles

Aperta
#873 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@kylebarron ci sta già lavorando.

Dal 9/11/2026.

  • #875 di @kylebarron — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start with getParentIndex in packages/deck.gl-raster/src/raster-tileset/raster-tileset-2d.ts, which picks a single parent per tile, and with crsBoundsToTileRange, which the tile traversal already uses for children. Reproduce with the two-level AffineTileset in the issue (4x4 overview tiles, 2x2 full-resolution tiles) and check that only 4 of 16 overview tiles stay visible. Done when every overlapped coarser tile is kept as a parent and the reproduction keeps all 16 visible. Open PR #875 already targets this, so coordinate with it before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

[!NOTE]
This issue was written by Claude (Claude Code), not by @kylebarron.

When you zoom in on a COG whose overviews use smaller tiles than its full-resolution image, the placeholders shown while the full-resolution tiles load form a checkerboard. Only one in four of the previous level's tiles stays on screen until the new tiles arrive.

Every USGS historical topo GeoTIFF we've looked at has this layout, so it shows up in the usgs-topo example, here with Emigrant Gap on a throttled (about 6 Mbps) connection:

https://github.com/user-attachments/assets/3a8d3213-a956-4b6f-b69c-e6618faed42a

With the COG's reads paused right after zooming from z12 to z12.6 (DPR 2), the placeholders stay put:

Before zooming (z12, finest overview) After zooming (z12.6, full-resolution tiles loading)
Image Image

Cause

Emigrant Gap's full-resolution image is 4992 × 6204 px in 512 px tiles, and its finest overview is 2496 × 3102 px in 128 px tiles. Going to full resolution halves the pixel size but quadruples the tile size, so each full-resolution tile covers a 2 × 2 block of overview tiles. Eight randomly sampled USGS topo GeoTIFFs all use 512 px tiles at full resolution and 128 px tiles in every overview.

RasterTileset2D.getParentIndex assumes each tile lies inside one tile of the next coarser level. Here its decimation is about 0.5, so floor((x + 0.5) / decimation) makes (2x + 1, 2y + 1) the parent of full-resolution tile (x, y). That's only one of the four overview tiles it covers. deck.gl's tile tree allows one parent per tile, so best-available keeps only that tile as a placeholder and hides the other three.

Zooming out across the same switch leaves gaps too. Each full-resolution tile is a child of just one of the four overview tiles it covers. Once that overview tile loads, the full-resolution tile is hidden, while the other three overview tiles can still be loading.

This isn't new in 0.10. Before #841, the same math picked (2x, 2y), the top-left tile instead of the bottom-right one.

Minimal reproduction

A two-level AffineTileset over the same square: a 512 px overview in 128 px tiles (4 × 4 tiles), then a 1024 px full-resolution image in 512 px tiles (2 × 2 tiles). Load all 16 overview tiles, then select the 4 full-resolution tiles and leave them loading. The overview tiles that stay visible (#) are:

. . . .
. # . #
. . . .
. # . #

With 128 px tiles at both levels, all 16 stay visible. With deck.gl's default cache, the 12 hidden tiles are still cached; with maxCacheSize: 0, they are evicted as well.

Proposed fix

Make RasterTileset2D's best-available treat every tile of the coarser level that a tile overlaps as its parent, wherever a level's tiles are larger than the coarser level's. It can find them with the level's crsBoundsToTileRange, as the tile traversal already does for children. Tilesets whose tiles nest keep deck.gl's tree unchanged. A PR will follow.


🤖 Written by Claude Code

Lingua principale
TypeScript
Stelle
240
Fork
34
Merge medio
17h 24m
PR unite (30g)
62

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di developmentseed/deck.gl-raster

Tutte le issue di developmentseed/deck.gl-raster

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.