Repository navigation
fix: draw only the image part of MultiCOGLayer edge tiles - #755
Merged
Merged
Conversation
MultiCOGLayer fetched edge tiles with `boundless: true` and meshed every tile at full size, so the padding past the image's right and bottom edges drew as a band past the scene. The padding holds whatever the writer stored there, not necessarily nodata (0 in DEA's Sentinel-2 files, whose nodata is -999), so a nodata filter can't remove it. Fetch with `boundless: false`, as COGLayer does, and mesh the primary band's clipped texture. Coarser bands are stitched from clipped tiles: AffineTilesetLevel clips edge tile corners to the array (from #580), and resolveSecondaryTiles takes the stitched size from the far clipped corner, so it matches the UV transform from the clipped extents. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
commented
Oct 21, 2026
kylebarron
left a comment
Member
Author
There was a problem hiding this comment.
lgtm; just an overly verbose comment
Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
enabled auto-merge (squash)
October 21, 2026 15:02
kylebarron
disabled auto-merge
October 21, 2026 15:06
4 of 5 tasks
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.
before (black border):
after:
before:
after:
before and after for mollweide example (still broken 😄 )
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
MultiCOGLayernow fetches edge tiles withboundless: false, asCOGLayerdoes, and meshes only the part of each tile inside the image. Before, it drew every tile at full size, so the padding past the image's right and bottom edges showed as a band past the scene. That padding holds whatever the file's writer stored there, not necessarily nodata. In Digital Earth Australia's Sentinel-2 files (nodata -999) it is 0, which a nodata filter can't remove.Coarser bands are stitched from clipped tiles too, which works because every step uses the same clipped geometry:
AffineTilesetLevel.projectedTileCornersclips the tiles in the last column and row to the array (the change from fix: clip AffineTilesetLevel tile corners to array extent #580).resolveSecondaryTilestakes the stitched texture's size from the far clipped corner, so it matches the UV transform it computes from the clipped extents.assembleTilesalready accepts clipped edge tiles (feat(geotiff): let assembleTiles stitch clipped edge tiles #753).Clipping the corners also affects
COGLayerandZarrLayer, which already drew only the clipped part: their cullingbbox, bounding volumes, Web Mercator pole clamp, and debug outlines now match what they draw. It also fixes #580's case, a full-world Mollweide COG whose padded corners fall outside the projection's domain, so every tile was culled. That file now selects and draws tiles, though its polar tiles still smear because pixels outside Mollweide's ellipse don't reproject, which is a separate problem.dev-docs/boundless-tiles.mdis rewritten to match.Closes #580, closes #651
🤖 Written by Claude Code