chore(deps): bump maplibre-gl-raster to ^0.3.1 (fixes COG rendering #444)#447
Conversation
0.3.1 ships the fix for global EPSG:3857 COGs whose extent reaches the antimeridian (opengeos/maplibre-gl-raster#16). Such COGs previously rendered as garbage with a flood of "RasterReprojector: mesh refinement did not converge" warnings, because deck.gl-geotiff reprojected an already-3857 source through proj4, whose mercator round-trip wraps longitude past ±180° to the opposite hemisphere and breaks the per-tile reprojection mesh. 0.3.1 draws a Web Mercator source with an identity source→3857 reprojection. Verified end-to-end: loading the reported COG (viirs_ntl_2021_global.tif, EPSG:3857) in the app now renders correctly geo-aligned with zero convergence warnings and zero errors. Closes #444.
✅ Deploy Preview for geolibre-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Changesmaplibre-gl-raster Dependency Bump
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| "maplibre-gl-overture-maps": "^0.3.0", | ||
| "maplibre-gl-planetary-computer": "^0.3.0", | ||
| "maplibre-gl-raster": "^0.3.0", | ||
| "maplibre-gl-raster": "^0.3.1", |
There was a problem hiding this comment.
Nit (low confidence): raster-symbology-texture.ts in this package accesses undocumented private members of maplibre-gl-raster (_layerManager, _renderTileFor, _colormapTexture, _deps) and has an explicit reminder at the top:
"re-verify these names AND the 'colormap' module name when bumping either dependency" (currently says "verified against v0.2.0")
This PR bumps the dep but doesn't update that version annotation or confirm the private-API surface is unchanged in 0.3.1. Since this is a patch-only bump and all tests pass, the private members almost certainly didn't change — but the comment should be updated to reflect the now-tested version so the next bump starts from the right baseline.
| "maplibre-gl-raster": "^0.3.1", | |
| "maplibre-gl-raster": "^0.3.1", |
(No code change needed here; the suggestion is to update the // verified against v0.2.0 annotation in raster-symbology-texture.ts:25 to v0.3.1.)
Code reviewThis is a minimal, well-scoped dependency bump ( BugsNone found. SecurityNone found. The updated package is fetched from the npm registry with a new, correctly-formatted SRI hash. PerformanceNet positive — identity reprojection (no proj4 round-trip) is faster and exact for EPSG:3857 COGs. Quality
CLAUDE.mdNo violations. Change is in a branch / PR (not committed directly to Overall: LGTM for the intended fix. The two quality notes above are follow-up suggestions, not blockers. |
What
Bumps
maplibre-gl-raster^0.3.0→^0.3.1inapps/geolibre-desktopandpackages/plugins, and refreshespackage-lock.jsonto0.3.1.Why
Closes #444. A global COG already in EPSG:3857 whose extent reaches the antimeridian (e.g. VIIRS nighttime lights, X bounds ±20038000 m, just past the valid ±20037508.34 m) rendered as garbage with a flood of:
Root cause was upstream in
@developmentseed/deck.gl-geotiff: it reprojected the source→EPSG:3857 through proj4 even when the source was already 3857, and proj4's mercator round-trip normalizes longitude into (−180°, 180°], wrapping the COG's edge (and every padded partial edge tile) to the opposite hemisphere. The per-tile Delatin reprojection mesh then spanned ~40,000 km and never converged.maplibre-gl-raster@0.3.1(opengeos/maplibre-gl-raster#16) fixes this by drawing a Web Mercator source with an identity source→3857 reprojection — exact, wrap-free, and faster.Verification
npm run buildgreen;npm run test:frontend1078 pass / 0 fail.https://storage.googleapis.com/spatialthoughts-public-data/ntl/viirs/viirs_ntl_2021_global.tif) → renders correctly geo-aligned (nighttime-light clusters over the right continents), zero "did not converge" warnings, zero console errors.Summary by CodeRabbit