-
Notifications
You must be signed in to change notification settings - Fork 40
draft: Generic tiling systems #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kylebarron
wants to merge
27
commits into
main
Choose a base branch
from
kyle/cog-layer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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.
Screen.Recording.2025-11-06.at.6.42.57.PM.mov
(this is actually not slowed down 😅 so we have some performance improvements to do!)
This PR is a draft, trying to implement support for managing a
TileLayerbased on an arbitrary tile layout, which in this case happens to be the internal tile layout of a generic COG image in an arbitrary coordinate system.The goal is that deck.gl will automatically fetch tiles as needed, based on the current viewport, from either internal overviews or the full resolution data. This will be generic enough that we can extend it to Zarr data later.
deck.gl exposes the
Tileset2Dclass, which we can pass into aTileLayerto override how it fetches tiles. So we need to implement a subclass ofTileset2Dwith custom behavior.The implementation tries to follow deck.gl's own traversal for OSM web mercator indexing as much as possible, and tries to infer where the important differences are between web mercator tiling and generic tiling.
COG Metadata Extraction
Tile Traversal
Coordinate Transformations
The implementation handles a complete transformation pipeline:
Implementation Details
Tile Bounds Calculation
Tile bounds are computed using the geotransform at 9 reference points across the tile surface:
[0, 512])Oriented Bounding Boxfrom common space points (which then should work with deck.gl's frustum culling implementation)This approach handles:
Current Status
Working ✅
In Progress⚠️
Not Yet Implemented ❌
References
affine: https://www.perrygeo.com/python-affine-transforms.html