developmentseed / developmentseed/deck.gl-raster

Generalize reprojection clamping at Web Mercator bounds

Open
#575 1 comment 0 reactions 1 assignee Claimed by @kylebarron View on GitHub
Dominant language
TypeScript
Stars
228
Forks
29
Avg merge
12h 27m
Merged PRs (30d)
4

Description

#574 implements reprojection clamping for north-up images

---

> Written by Claude on behalf of @kylebarron

## Background

#574 added a Web Mercator pole-clamp: `webMercatorClampSeed` builds a `rectangleSeed` for the valid latitude band, piped through `getTileMetadata` → `_webMercatorReprojectorSeed` → `RasterLayer.initialTriangulation`. The `RasterReprojector` accepts an **arbitrary** `InitialTriangulation` (also #574), so the reprojection engine already supports non-rectangular seeds — nothing is missing there.

## Gap

The *seed builder* only handles the easy case: `webMercatorClampSeed` produces an axis-aligned rectangle, which is only valid for **north-up geographic** tiles. For **non-north-up** (rotated geotransform) or **non-geographic** tiles that reach past ±85.051°, the valid band isn't a UV rectangle, so the builder returns `undefined` and the tile falls back to the full mesh (pre-#574 degenerate polar triangles / non-convergence).

The work is to **compute the actual clamp region and pipe a non-rectangular seed through** for those tiles — e.g. delaunator over the clamped region's boundary points (with centroid-filtering if the region is concave). No reprojector changes needed.

## Shared with the antimeridian

The curved/slanted antimeridian cut needs the same thing — a non-rectangular seed built and piped for the crossing region (see `dev-docs/specs/2026-05-27-antimeridian-crossing-tile-design.md`). Same consumer-side construction, same engine.

Low priority — north-up global EPSG:4326 grids (the common near-polar case) are already handled by #574.

---
Written by Claude on behalf of @kylebarron

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.