Skip to content

feat: Add polar projection support to RasterReprojector#270

Open
espg wants to merge 4 commits intodevelopmentseed:mainfrom
englacial:feat/polar-projections
Open

feat: Add polar projection support to RasterReprojector#270
espg wants to merge 4 commits intodevelopmentseed:mainfrom
englacial:feat/polar-projections

Conversation

@espg
Copy link

@espg espg commented Feb 26, 2026

Ported from #266. Needed for default globe discussed on source-cooperative/source.coop#230.

Summary

  • Detect tiles near geographic poles (|lat| > 75° combined with antimeridian crossing) in RasterReprojector
  • Add maxTriangles parameter to run() to cap mesh refinement for polar tiles where convergence is slow due to extreme longitude variation near the pole
  • Add 7 new unit tests for polar projection handling

Depends on #269 — rebase onto main after that merges so the diff only shows polar changes.

Closes #172

Test plan

  • All unit tests pass (pnpm test in raster-reproject)

espg added 4 commits February 26, 2026 13:15
Detect when a tile's output positions span the ±180° meridian and
normalize longitudes to a continuous range (e.g., [170, 190] instead
of [170, -170]). This prevents mesh triangles from spanning 340° of
longitude and ensures correct GPU-side interpolation for tiles near
the date line.
Detect tiles containing or near a geographic pole (|lat| > 75° with
antimeridian crossing). Add a maxTriangles safety cap to run() to
prevent infinite refinement near poles, where the extreme longitude
variation can require many more triangles to converge.

The existing antimeridian normalization handles the longitude wrapping
for polar tiles — the mesh refines around the remaining discontinuity.
deck.gl's GlobeView renders the resulting mesh correctly since
projectPosition handles arbitrary (lng, lat) values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support images over the North/South poles

1 participant