RustGIS-compiled static peat and KHG vector tile pipeline #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Build a preprocessing script using the RustGIS CLI / tippecanoe to convert
khg_layer37.geojson(16 MB) andlahan_gambut_layer6.geojson(31 MB) into high-performance.pmtilesvector archives. Serve the PMTiles statically and render them as toggleable vector layers in MapLibre with graduated symbology for peat depth.Technical specifications
Target files:
scripts/build-pmtiles.sh: CLI batch compilation script converting GeoJSON into.pmtiles.src/lib/gis/pmtiles-protocol.ts: Custom MapLibre PMTiles protocol registration utility.src/components/map/layers/peat-soil-layer.tsx: MapLibre fill and outline layer definitions.src/components/map/layers/khg-layer.tsx: MapLibre boundary line layer definitions.src/components/controls/layer-toggles.tsx: Glassmorphism toggle switch panel.public/tiles/peat_soil.pmtiles: Compiled peat soil polygon tile pyramid.public/tiles/khg.pmtiles: Compiled KHG boundary tile pyramid.Compilation parameters:
tippecanoe/pmtiles/rustgis-cli.tippecanoe -z 12 -Z 3 --drop-densest-as-needed -l peat_soil -o public/tiles/peat_soil.pmtiles .cache/lahan_gambut_layer6.geojson.tippecanoe -z 12 -Z 3 --coalesce-densest-as-needed -l khg -o public/tiles/khg.pmtiles .cache/khg_layer37.geojson.Graduated depth symbology:
peat_depthor extracted numerical depth in centimeters.<50 cm(Sangat Dangkal):#fef08a(amber-200, opacity 0.5)50-100 cm(Dangkal):#fde047(amber-300, opacity 0.55)100-200 cm(Sedang):#fbbf24(amber-400, opacity 0.6)200-300 cm(Dalam):#f59e0b(amber-500, opacity 0.65)300-500 cm(Sangat Dalam):#d97706(amber-600, opacity 0.7)>500 cm(Kubah Gambut / Ekstrem):#7c2d12(amber-900, opacity 0.8)#38bdf8(sky-400), line-width1.2px, dasharray[3, 2].HTTP Range serving:
pmtiles.Protocol()in MapLibre.Accept-Ranges: bytesandContent-Rangeheaders for single-digit millisecond tile fetches.Acceptance criteria
.pmtilesarchives.curl -r 0-1023 -I http://localhost:3000/tiles/peat_soil.pmtilesreturnsHTTP 206 Partial Content.Blocked by
Issue 2: RustGIS-compiled static peat and KHG vector tile pipelineto RustGIS-compiled static peat and KHG vector tile pipeline