refactor: MultiCOGLayer extends RasterTileLayer#499
Open
kylebarron wants to merge 3 commits intomainfrom
Open
Conversation
Refs #417. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a protected hook returning [] by default. Subclasses (next commit: MultiCOGLayer) override it to render per-tile overlays that depend on the fetched DataT, without overriding _renderSubLayers itself. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops ~165 lines of duplicated wiring (globe/mercator branching, signal combining, RasterLayer construction, RasterTileset2D factory subclass) that RasterTileLayer already provides. Multi-source fetch + stitch logic stays in _getTileData (now consuming options.signal); rich per-band debug overlay moves to the new _renderExtraSubLayers hook on the base class. Public API unchanged. Refs #417. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
MultiCOGLayerto extendRasterTileLayerinstead ofCompositeLayer. Drops ~165 lines of duplicated wiring (globe/mercator branching, signal combining,RasterLayerconstruction,RasterTileset2Dfactory subclass) — all already provided byRasterTileLayer.MultiCOGLayer._getTileData(now consuming the base's combinedoptions.signalinstead of recomposing)._renderExtraSubLayers(tile, data)hook onRasterTileLayerthat subclasses can override; default returns[].MultiCOGLayerPropsand runtime behavior unchanged.Spec:
dev-docs/specs/2026-05-01-multi-cog-layer-extends-raster-tile-layer-design.mdRefs #417. First of three planned PRs (this one is the mechanical refactor; follow-ups will add the new
getTileData/renderTileextension points and an NLCD animation example).Test plan
pnpm -r --filter '!docs' typecheckpassespnpm --filter @developmentseed/deck.gl-raster --filter @developmentseed/deck.gl-geotiff --filter @developmentseed/deck.gl-zarr testpasses (currently 79 + 4 + 11)examples/sentinel-2renders correctly with default band presetexamples/sentinel-2swaps composite cleanly with no console errors_renderExtraSubLayershook is wired correctlysignalaborts in-flight fetches when toggling sources🤖 Generated with Claude Code