Repository navigation
refactor(deck.gl-raster)!: remove CutlineBbox in favor of deck.gl's ClipExtension - #739
Merged
Merged
Conversation
…lipExtension CutlineBbox duplicated deck.gl's ClipExtension and loses precision at high zoom: it compares only the float32 high part of an absolute common-space position, so east-west cut edges drift by a few metres at z15+. ClipExtension compares camera-relative positions that include the fp64 low part. The usgs-topo-cutline example now clips with ClipExtension. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
commented
Oct 21, 2026
| bbox: [number, number, number, number], | ||
| ): RenderTileResult { | ||
| /** Render pipeline that only uploads the tile texture. */ | ||
| function renderTile(tileData: TextureDataT): RenderTileResult { |
Member
Author
There was a problem hiding this comment.
In a follow up PR we can simplify this example. It shouldn't need any custom render pipeline. And we can change the example name to just usgs-topo
kylebarron
added a commit
that referenced
this pull request
Oct 21, 2026
… default pipeline (#741) > [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. Renames the `usgs-topo-cutline` example to `usgs-topo` and removes its custom tile pipeline. - **Default pipeline:** the example's `getTileData` padded RGB to RGBA and uploaded a texture, and its `renderTile` returned only `CreateTexture`. `COGLayer`'s inferred pipeline does the same for these JPEG-compressed RGB sheets and destroys its own textures, so the custom `getTileData`, `renderTile`, `onTileUnload`, the `rgbToRgba` helper and the `../../../packages/deck.gl-geotiff/dist` type import are gone. Since #739 the collar is cut with `ClipExtension`, which doesn't need a render-pipeline module. - **Rename:** updated the folder, the package name (`deck.gl-usgs-topo-example`), the `publish` script, the vite `base`, the page title and the control panel's source link. - **Dependencies:** dropped `@developmentseed/deck.gl-raster` and `@developmentseed/geotiff`, which the example no longer imports. What's left matches `cog-basic`. The deployed URL moves from `/examples/usgs-topo-cutline/` to `/examples/usgs-topo/`. The old URL will 404. Nothing on the docs site links to it. I checked the example in Chrome. With the default pipeline, the Emigrant Gap (1955) and Moab (1885) sheets render with the same colours as before, and the cutline on/off toggle still works. Closes #740 🤖 Written by [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
kylebarron
added a commit
that referenced
this pull request
Oct 21, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. Bumps `version` to `0.9.0-beta.2` in the root `package.json` and in every `packages/*/package.json`, ready for a second beta release. The publish workflow sees `beta` in the version and publishes to npm under the `beta` dist-tag, so `latest` stays on 0.8.1. `CHANGELOG.md` gets a `v0.9.0-beta.2` section listing the 7 PRs merged since v0.9.0-beta.1. One of them is breaking: #739 removes `CutlineBbox` and `CutlineBboxProps` from `@developmentseed/deck.gl-raster/gpu-modules` in favor of deck.gl's `ClipExtension`. Once this is merged, tag the merge commit `v0.9.0-beta.2` and push the tag. 🤖 Written by [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
4 tasks done
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.
We originally created the
CutlineBboxmodule in order to clip a collar from a GeoTIFF. But I didn't realize that this was actually totally unnecessary because upstream already has aClipExtensionmodule.Beyond the duplication, the
ClipExtensionis also higher precision at higher zooms.Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Removes the
CutlineBboxGPU module and itsCutlineBboxPropstype from@developmentseed/deck.gl-raster/gpu-modules. deck.gl'sClipExtensiondoes the same job and is more precise at high zoom:CutlineBboxcompares only the float32 high part of an absolute common-space position, so its east-west cut edges drift by several metres from z15 on (measurements in #561).ClipExtensioncompares camera-relative positions that include the fp64 low part.Breaking:
CutlineBboxandCutlineBboxPropsare no longer exported. To migrate, pass the same common-space bbox toClipExtension:Other changes:
usgs-topo-cutlineexample now usesClipExtension, and itsrenderTileis justCreateTexture.CutlineBboxdocs cross-links (and a stalelngLatToMercatorlink to a function that no longer exists).CutlineBboxfromdev-docs/gpu-modules.md.I checked the example in Chrome. With the cutline on, the collar is clipped, and turning it off brings the collar back. At z17, centred on the quad's north edge, the cut lands exactly on the centre row.
Closes #561
🤖 Written by Claude Code