feat: Initial work for MultiCOGLayer: cross-resolution tileset for sentinel/landsat#408
Merged
kylebarron merged 22 commits intomainfrom Apr 10, 2026
Merged
Conversation
Design for rendering multi-resolution satellite bands (e.g., Sentinel-2 10m/20m/60m) in a single shader pass. Primary tileset drives traversal, secondary tiles are fetched/stitched with UV transforms for GPU-side resampling. No CPU resampling needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6-task plan covering MultiTilesetDescriptor, secondary tile resolver, CompositeBands GPU module, MultiCOGLayer init/fetch/render, and integration smoke test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… add Sentinel-2 test - Tech stack: @developmentseed/geotiff (not geotiff.js) - Move multi-tileset files to src/multi-raster-tileset/ directory - Task 6 now uses real Sentinel-2 TileMatrixSet fixture from geozarr Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduces MultiTilesetDescriptor, createMultiTilesetDescriptor, selectSecondaryLevel, and tilesetLevelsEqual to support multi-resolution tileset composition for datasets like Sentinel-2 with mixed band resolutions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default "closest-finer" prefers the coarsest level that's still finer than the primary, avoiding unnecessary blur. "closest" picks by smallest absolute mpp difference for bandwidth optimization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements resolveSecondaryTiles() which finds which secondary tileset tiles cover a primary tile's CRS extent and computes the [offsetX, offsetY, scaleX, scaleY] UV transform for shader use. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ution z (zoom/overview level) is the same for all tiles in a resolution, so it belongs on the resolution result, not repeated per tile index. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Creates a factory function that builds a luma.gl shader module composing N named single-band textures into a vec4 output. Each band carries its own UV transform uniform so the GPU handles resolution-alignment automatically. Returns a concrete CompositeBandsModule type so callers need no casts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces MultiCOGLayer, a CompositeLayer that opens multiple COGs in parallel, builds TilesetDescriptors via TileMatrixSetAdaptor, and groups them into a MultiTilesetDescriptor. Tile fetching and rendering will be added in a subsequent task. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire up the full pipeline: - _getTileData: fetches primary + secondary tiles in parallel - _fetchPrimaryBand: direct fetch with identity UV transform - _fetchSecondaryBand: uses fetchTiles + assembleTiles for proper typed-array-preserving stitching (no Uint8Array casts) - _renderSubLayers: CompositeBands module binds all band textures - renderTileLayer: TileLayer with PrimaryTilesetFactory from primary grid Helper functions selectImage and createBandTexture extracted for clarity. Texture format is hardcoded to r8unorm for initial implementation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Visual example using MultiCOGLayer with individual Sentinel-2 band COGs. Includes presets for true color, false color NIR, SWIR composite, and vegetation — demonstrating cross-resolution rendering (10m + 20m bands). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sentinel-2 L2A bands are uint16. Infer texture format from the typed array type: Uint8Array -> r8unorm, Uint16Array -> r16unorm. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WebGL's UNPACK_ALIGNMENT requires each row to start on a 4-byte boundary. For 16-bit single-channel data with odd widths, rows are only 2-byte aligned. Use enforceAlignment (exported from render-pipeline.ts) to pad rows before texture upload. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Major changes: - CompositeBands: rewritten as static ShaderModule with 4 fixed sampler slots, uniform block for scalars (uvTransforms, channelMap), and buildCompositeBandsProps helper for mapping named bands to slots. Follows luma.gl pattern: textures via inject, scalars via fs uniform block + uniformTypes. - LinearRescale: new GPU module for [min,max] -> [0,1] color rescaling, using uniform block pattern for proper uniform binding. - RasterModule type widened to accept uniform values (vectors) alongside textures. - Sentinel-2 example app with true color and false color presets. - enforceAlignment exported from render-pipeline.ts for reuse. - Documentation: gpu-modules.md (luma.gl binding rules), multi-resolution-status.md (current status and known issues). Known issues: multi-resolution alignment (20m bands), tile cache invalidation on preset switch, texture format limited to uint8/uint16. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GPU modules (CompositeBands, LinearRescale, buildCompositeBandsProps) should only be imported from @developmentseed/deck.gl-raster/gpu-modules, not from the main package entry point. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MultiCOGLayer: cross-resolution tileset for sentinel/landsat
This was referenced Apr 10, 2026
Open
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.
For #142, related to #147
Change list
dev-docsgpu-modules.mdfrom claude's brainstormingCompositeBandsshader module that attempts to render textures across multiple resolutionsLinearRescaleshader module to rescale from a[min, max]range to[0, 1]MultiTilesetDescriptorinterface to manage multiple tilesets across the same extent but with different tile grids with different resolutions.primarydescriptor, which is the highest-resolution source, which defines the tile grid,Future work:
byteLengthnot defined in tile data errors (Fixed in fix: DefinebyteLengthon MultiCOG internal tile data #413)RasterTileLayerindeck.gl-rasterpackage #404