feat(terrain): Cloud-Optimized GeoTIFF and Terrain-RGB generator for DEMNAS 3D elevation #35

Closed
opened 2026-10-14 22:28:33 +00:00 by yuris · 0 comments
Owner

This was generated by AI during triage.
Realigned with docs/ARCHITECTURE.md following PR #100 and commit 540d81b.

What to build

Implement the automated compilation pipeline to process Badan Informasi Geospasial (BIG) 0.27" DEMNAS elevation rasters into Mapbox Terrain-RGB encoded tiles and Cloud-Optimized GeoTIFFs (COGs) for Anycast CDN edge storage in Cloudflare R2 (https://tiles.gambut.nokopia.com/tiles/terrain/).

Technical specifications

  1. Target files:
    • scripts/generate-demnas-terrain.py: Verified Mapbox Terrain-RGB formula encoder (elevation = -10000 + ((R * 65536 + G * 256 + B) * 0.1)).
    • src/lib/gis/dem-terrain.ts: MapLibre GL JS raster-dem source configuration with Anycast CDN endpoint.
  2. Processing rules:
    • Ingest 0.27" DEMNAS GeoTIFFs covering Sumatra and Kalimantan.
    • Re-encode elevation into 24-bit Terrain-RGB PNG tiles across zoom levels 5 to 14.
    • Upload compiled tiles to Cloudflare R2 bucket (titik-gambut-public/tiles/terrain/).

Acceptance criteria

  • DEMNAS elevation tiles served from Cloudflare R2 edge with HTTP 200/206 range headers.
  • 3D perspective terrain tilt (Pitch 55°) renders peat domes accurately above mineral soil baselines.
  • Unit tests in dem-terrain.test.ts verify formula and CDN URL configuration.
> *This was generated by AI during triage.* > *Realigned with docs/ARCHITECTURE.md following PR #100 and commit 540d81b.* ### What to build Implement the automated compilation pipeline to process Badan Informasi Geospasial (BIG) 0.27" DEMNAS elevation rasters into Mapbox Terrain-RGB encoded tiles and Cloud-Optimized GeoTIFFs (COGs) for Anycast CDN edge storage in Cloudflare R2 (`https://tiles.gambut.nokopia.com/tiles/terrain/`). ### Technical specifications 1. **Target files**: - `scripts/generate-demnas-terrain.py`: Verified Mapbox Terrain-RGB formula encoder (`elevation = -10000 + ((R * 65536 + G * 256 + B) * 0.1)`). - `src/lib/gis/dem-terrain.ts`: MapLibre GL JS `raster-dem` source configuration with Anycast CDN endpoint. 2. **Processing rules**: - Ingest 0.27" DEMNAS GeoTIFFs covering Sumatra and Kalimantan. - Re-encode elevation into 24-bit Terrain-RGB PNG tiles across zoom levels 5 to 14. - Upload compiled tiles to Cloudflare R2 bucket (`titik-gambut-public/tiles/terrain/`). ### Acceptance criteria - [x] DEMNAS elevation tiles served from Cloudflare R2 edge with HTTP 200/206 range headers. - [x] 3D perspective terrain tilt (Pitch 55°) renders peat domes accurately above mineral soil baselines. - [x] Unit tests in `dem-terrain.test.ts` verify formula and CDN URL configuration.
yuris changed title from Issue 22: [Backend] Cloud-Optimized GeoTIFF (COG) generator for DEMNAS terrain (rustgis cog) to [Backend] Cloud-Optimized GeoTIFF (COG) generator for DEMNAS terrain (rustgis cog) 2026-10-14 22:31:29 +00:00
yuris changed title from [Backend] Cloud-Optimized GeoTIFF (COG) generator for DEMNAS terrain (rustgis cog) to Cloud-Optimized GeoTIFF (COG) generator for DEMNAS terrain (rustgis cog) 2026-10-14 22:38:35 +00:00
yuris changed title from Cloud-Optimized GeoTIFF (COG) generator for DEMNAS terrain (rustgis cog) to feat(terrain): Cloud-Optimized GeoTIFF and Terrain-RGB generator for DEMNAS 3D elevation 2026-10-15 01:26:41 +00:00
Sign in to join this conversation.
No labels
backend
frontend
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/titik-gambut-next#35
No description provided.