Repository navigation
fix: In RasterTileLayer, allow renderTile to return null to avoid rendering a layer - #489
Merged
Merged
Conversation
RasterTileLayer, allow renderTile to return null to avoid rendering a layer
kylebarron
added a commit
that referenced
this pull request
May 6, 2026
* docs: add design for NLCD category-filter example Captures the agreed approach for adding a category-filter UI to the land-cover example, including the switch to r8uint upload and three example-local shader modules wired via custom getTileData/renderTile. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(land-cover): extract NLCD legend data into shared module Move the NLCD category list out of Legend.tsx so the upcoming CategoryFilter UI and colormap-texture builder can share a single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): add integer-aware shader modules Three example-local shader modules for the upcoming category-filter pipeline: - CreateTextureUint samples an r8uint source via usampler2D and introduces an `ivec4 icolor` function-local for downstream modules. - FilterCategory discards via a 256-byte LUT texture indexed by icolor.r. - PaletteColormap maps icolor.r to RGBA via texelFetch into a 256x1 colormap texture and writes it to color. The framework macro signature is unchanged. Integer pixel data flows between modules through a function-local `ivec4 icolor` declared by the producer module and consumed by the rest. luma.gl concatenates all fs:DECKGL_FILTER_COLOR injections into one function body, so the declaration is in scope for every subsequent injection. A future, typed shader-module abstraction can supersede this convention; tracked in the spec as an open follow-up. Adds @luma.gl/shadertools as a dependency of the example. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): add colormap and filter-LUT texture builders Pure helpers for constructing the two textures the integer-aware pipeline expects: a 256x1 RGBA colormap (alpha=0 at nodata, via parseColormap) and a 256x1 r8 boolean LUT for the active category selection. Adds @developmentseed/geotiff as a direct dependency of the example for parseColormap. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): add custom getTileData and renderTile callbacks getTileData uploads tiles as r8uint instead of the inferred r8unorm. makeRenderTile composes the integer-aware shader pipeline once the colormap and filter-LUT textures are available; until then it returns null so the layer renders nothing. Adds @developmentseed/deck.gl-raster as a direct dependency of the example for the RenderTileResult type. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): add CategoryFilter UI component Controlled checkbox tree mirroring the existing legend's grouping. Each heading toggles every leaf beneath it and renders indeterminate when its leaves are partially selected. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): wire integer-aware pipeline and category filter UI App captures the luma.gl Device on first tile load, builds the colormap texture once the GeoTIFF metadata is parsed, and rebuilds the filter LUT texture whenever the user changes the category selection. CategoryFilter replaces the read-only Legend. Also widens COGLayer's user-facing renderTile prop type to allow returning null, matching the underlying RasterTileLayer capability added in #489. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): add master toggle and per-heading collapse - "All categories" master checkbox toggles every leaf, with the indeterminate state (the "minus" box) shown when partial. - Each heading is independently expandable/collapsible so the panel stays compact while the user drills into specific groups. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(land-cover): discard nodata fragments in PaletteColormap The colormap entry for the nodata index already has alpha=0 (set by parseColormap). Convert that signal into an explicit discard so the fragment is skipped entirely rather than relying on alpha-blended-to- zero, which would still pollute the depth buffer and consume blend bandwidth for invisible pixels. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * reword * feat(land-cover): link to USGS Annual NLCD data source in info panel Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * set to higher max requests from source.coop * Swap back to direct s3 url * refactor(land-cover): use onDeviceInitialized to capture luma.gl Device Replaces the getTileData wrapper that captured the Device on first tile load with the cleaner onDeviceInitialized callback on DeckGLOverlay, matching the pattern used in dynamical-zarr-ecmwf and naip-mosaic. Drops the customGetTileData useCallback entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * nits --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.
Change list
nullfromrasterTile. Useful for lonboard in https://github.com/developmentseed/lonboard/pull/1183/changes#diff-749baf2a232827f928a56f2acbb4b7b7c6c72968818900cc34f05a66b5d49d18R167-R169