feat: Add polar projection support to RasterReprojector#270
Open
espg wants to merge 4 commits intodevelopmentseed:mainfrom
Open
feat: Add polar projection support to RasterReprojector#270espg wants to merge 4 commits intodevelopmentseed:mainfrom
espg wants to merge 4 commits intodevelopmentseed:mainfrom
Conversation
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.
3 tasks
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.
Ported from #266. Needed for default globe discussed on source-cooperative/source.coop#230.
Summary
RasterReprojectormaxTrianglesparameter torun()to cap mesh refinement for polar tiles where convergence is slow due to extreme longitude variation near the poleDepends on #269 — rebase onto
mainafter that merges so the diff only shows polar changes.Closes #172
Test plan
pnpm testinraster-reproject)