Skip to content

chore(deps): bump maplibre-gl-raster to ^0.3.1 (fixes COG rendering #444)#447

Merged
giswqs merged 1 commit into
mainfrom
chore/bump-maplibre-gl-raster-0.3.1
Jun 17, 2026
Merged

chore(deps): bump maplibre-gl-raster to ^0.3.1 (fixes COG rendering #444)#447
giswqs merged 1 commit into
mainfrom
chore/bump-maplibre-gl-raster-0.3.1

Conversation

@giswqs

@giswqs giswqs commented Jun 17, 2026

Copy link
Copy Markdown
Member

What

Bumps maplibre-gl-raster ^0.3.0^0.3.1 in apps/geolibre-desktop and packages/plugins, and refreshes package-lock.json to 0.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:

RasterReprojector: mesh refinement did not converge after 10001 iterations (maxError=0.125, currentError=2503.938561250837)

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 build green; npm run test:frontend 1078 pass / 0 fail.
  • End-to-end in the real app (Playwright): loaded the exact reported COG (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

  • Chores
    • Updated maplibre-gl-raster dependency to the latest patch version.

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.
@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for geolibre-app ready!

Name Link
🔨 Latest commit 4678672
🔍 Latest deploy log https://app.netlify.com/projects/geolibre-app/deploys/6a331b91f4422200084d9635
😎 Deploy Preview https://deploy-preview-447--geolibre-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 855f6af7-05f2-4f2f-8544-cb97b413562a

📥 Commits

Reviewing files that changed from the base of the PR and between f9e2cae and 4678672.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • apps/geolibre-desktop/package.json
  • packages/plugins/package.json

📝 Walkthrough

Walkthrough

The maplibre-gl-raster dependency is bumped from ^0.3.0 to ^0.3.1 in two package manifests: apps/geolibre-desktop/package.json and packages/plugins/package.json. No other changes are made.

Changes

maplibre-gl-raster Dependency Bump

Layer / File(s) Summary
maplibre-gl-raster ^0.3.1 in both package manifests
apps/geolibre-desktop/package.json, packages/plugins/package.json
maplibre-gl-raster version constraint updated from ^0.3.0 to ^0.3.1 in both the desktop app and plugins package.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐇 A tiny bump, a patch so small,
The raster render fixed for all,
No more mesh errors in the night,
COG lights now render right!
Hop hop, the version's here to stay~ 🌍

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-maplibre-gl-raster-0.3.1

Comment @coderabbitai help to get the list of available commands and usage tips.

@giswqs giswqs merged commit 0f21498 into main Jun 17, 2026
14 of 16 checks passed
@giswqs giswqs deleted the chore/bump-maplibre-gl-raster-0.3.1 branch June 17, 2026 22:12
"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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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.)

@github-actions

Copy link
Copy Markdown
Contributor

Code review

This is a minimal, well-scoped dependency bump (maplibre-gl-raster ^0.3.0^0.3.1) with good context in the PR description. The lock-file changes are consistent across all three locations (both workspace entries + the resolved node_modules block), and the SRI integrity hashes are well-formed 88-char base64 SHA-512 values.

Bugs

None found.

Security

None found. The updated package is fetched from the npm registry with a new, correctly-formatted SRI hash.

Performance

Net positive — identity reprojection (no proj4 round-trip) is faster and exact for EPSG:3857 COGs.

Quality

Finding Confidence
raster-symbology-texture.ts:25 annotates "verified against v0.2.0" and explicitly asks to re-verify private member names on every dependency bump. This PR bumps the package but doesn't update the annotation or note in the description that re-verification was done. Since it's a patch release and all 1078 tests pass, the private API surface almost certainly didn't change — but the version annotation should be advanced to v0.3.1 so the next reviewer starts from the right baseline. Low
The antimeridian / convergence fix is in maplibre-gl-raster itself and covers COGs loaded via control.addRaster(…). The STAC-search path in maplibre-components.ts imports COGLayer from @developmentseed/deck.gl-geotiff directly (line ~4181) and is not covered by this fix — the same proj4 wrap issue would still appear there for EPSG:3857 COGs that reach the antimeridian. This is pre-existing and not a regression introduced here, but worth tracking as a follow-up. Medium

CLAUDE.md

No violations. Change is in a branch / PR (not committed directly to main); no tile/style hosts added; no i18n strings touched; package-lock.json is updated consistently with package.json.


Overall: LGTM for the intended fix. The two quality notes above are follow-up suggestions, not blockers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rendering errors for a COG

1 participant