Skip to content

wip: globe view#363

Draft
kylebarron wants to merge 14 commits intomainfrom
kyle/globe-view
Draft

wip: globe view#363
kylebarron wants to merge 14 commits intomainfrom
kyle/globe-view

Conversation

@kylebarron
Copy link
Member

Scratch work forked off of #268 since I can't push to that branch

Issue with background layer intersecting with the raster mesh:

Screen.Recording.2026-03-23.at.11.41.01.AM.mov

Issue with tile traversal when zoomed in:

Screen.Recording.2026-03-23.at.11.43.01.AM.mov

espg and others added 13 commits February 26, 2026 13:13
Expand __TEST_EXPORTS to expose helper functions (getOverlappingChildRange,
getMetersPerPixel, rescaleEPSG3857ToCommonSpace, sampleReferencePointsInEPSG3857)
and add 21 tests covering:

- computeProjectedTileBounds for WebMercatorQuad and UTM31
- rescaleEPSG3857ToCommonSpace coordinate mapping and clamping
- sampleReferencePointsInEPSG3857 interpolation
- getOverlappingChildRange parent-child tile relationships
- getMetersPerPixel zoom/latitude behavior
- RasterTileNode.insideBounds AABB overlap logic
- RasterTileNode.getBoundingVolume OBB computation (Mercator path)
- RasterTileNode.children quadtree traversal

Establishes regression baseline before globe view changes.
Remove the assert(false, "TODO") blocker in getBoundingVolume() and implement
full globe view support in the tile traversal code:

- Thread projectTo4326 through TileMatrixSetTileset → getTileIndices() →
  RasterTileNode (alongside existing projectTo3857)
- Add _getGlobeBoundingVolume() which samples reference points in WGS84 and
  projects them into globe common space via viewport.projectPosition
- Add sampleReferencePointsInWgs84() helper (parallel to the existing
  sampleReferencePointsInEPSG3857)
- Return centerLatitude from getBoundingVolume() so LOD computation works in
  both Mercator and Globe views without calling worldToLngLat()
- Handle globe-mode bounds conversion in getTileIndices() by projecting WGS84
  bounds corners through the globe project function instead of lngLatToWorld()
- Remove unused assert import

Closes #82
Provides a minimal example using deck.gl's GlobeView with COGLayer
for visualizing COG imagery on a 3D globe. Includes a dark background
sphere, debug mesh controls, and commented URLs for both mid-latitude
and polar datasets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants