Skip to content

fix: Render mesh from Web Mercator coordinates - #349

Merged
kylebarron merged 4 commits into
mainfrom
kyle/render-web-mercator
Mar 18, 2026
Merged

kylebarron merged 4 commits into
mainfrom
kyle/render-web-mercator

Conversation

@kylebarron

@kylebarron kylebarron commented Mar 18, 2026 •

Copy link
Copy Markdown
Member

Change list

  • In non-globe view, this projects GeoTIFFs to EPSG:3857 and renders directly from that.
    • Defines a modelMatrix for an affine transformation from Web Mercator EPSG:3857 meters into deck.gl world space.
  • In globe view, this projects GeoTIFFs to EPSG:4326 and renders from that coordinate system.

Closes #41, closes #153

@github-actions github-actions Bot added the fix label Mar 18, 2026
@kylebarron
kylebarron merged commit 6adddc4 into main Mar 18, 2026
4 checks passed
@kylebarron
kylebarron deleted the kyle/render-web-mercator branch March 18, 2026 20:10
@ds-release-bot ds-release-bot Bot mentioned this pull request Mar 18, 2026
yharby added a commit to walkthru-earth/objex that referenced this pull request Mar 18, 2026
… patches

Backport developmentseed/deck.gl-raster#349 which renders COG tile meshes
in EPSG:3857 with COORDINATE_SYSTEM.CARTESIAN + model matrix instead of
WGS84 linear interpolation. This eliminates per-vertex interpolation errors
visible at high latitudes and improves rendering performance.

Three pnpm patches applied until the next npm release:

- @developmentseed/deck.gl-geotiff: PR #349 changes (CARTESIAN rendering,
  inverseFrom3857, NaN guards on projection functions, TileLayer prop
  forwarding)
- @developmentseed/deck.gl-raster: clamp non-finite proj4 results in
  sampleReferencePointsInEPSG3857 to prevent "Invalid number null" crash
  when tile matrices extend beyond valid CRS domain
- @developmentseed/raster-reproject: add 5000-iteration safety cap to
  Delatin mesh refinement loop to prevent browser hang on tiles with
  extreme Mercator non-linearity

Also removes the old COGLayer.prototype.setState monkey-patch from
CogViewer.svelte — NaN handling is now in the library patches.
aboydnw added a commit to developmentseed/cng-sandbox that referenced this pull request Apr 21, 2026
…gl-geotiff 0.4 (#263)

* chore(frontend): bump @developmentseed/deck.gl-geotiff to 0.4.0

Pulls in upstream mesh-from-Mercator rendering
(developmentseed/deck.gl-raster#349) which projects source COGs to
EPSG:3857 internally, eliminating per-vertex warping artifacts for
non-Mercator sources. Also brings maxRequests, TileLayer refinement
strategies, and a proj4 fix. Peer deps stay on deck.gl 9.2.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(frontend): allow client COG rendering for any CRS

v0.4 of @developmentseed/deck.gl-geotiff (deck.gl-raster PR #349)
reprojects source COGs to EPSG:3857 internally and builds the mesh
from Mercator coordinates, so non-Mercator sources (e.g. EPSG:4326)
no longer warp visibly at zoom-out. Drops the CRS gate in
evaluateClientRenderEligibility so geographic and other projected
COGs can render client-side - which also unlocks the categorical
hover tooltip for those datasets.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs: update project documentation

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.

Perf: avoid any reprojection for input datasets in EPSG 4326 or web mercator Render mesh from Web Mercator coords, not WGS84 coords

1 participant