Live SiPongi active hotspots ingestion and clustering #3
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
Create a server-side API route (
/api/hotspots) that fetches active hotspot points from the KLHK SiPongi+ GeoJSON API, filters by satellite and confidence level, and delivers a typed lightweight GeoJSON response. Render active hotspots on the MapLibre canvas with dynamic clustering and glowing confidence badges.Technical specifications
Target files:
src/app/api/hotspots/route.ts: Server-side proxy and normalization handler with caching.src/types/hotspot.ts: Domain models and GeoJSON FeatureCollection TypeScript interfaces.src/lib/services/sipongi.ts: Upstream HTTP fetcher with gzip decompression and timeout handling.src/components/map/layers/hotspots-layer.tsx: Clustered and unclustered circle layers.src/components/map/popups/hotspot-hover-card.tsx: Rich hover card for single hotspots.Upstream contract & caching:
https://opsroom.sipongidata.my.id/api/hotspot/filtergeojsonwilayah=IN,filterperiode=false,late=24,satelit=NASA-SNPP,NASA-NOAA20,NASA-MODIS,confidence=high,medium,low.Cache-Control: public, s-maxage=900, stale-while-revalidate=60).MapLibre clustering configuration:
map.addSource("hotspots", { type: "geojson", data: "/api/hotspots", cluster: true, clusterMaxZoom: 14, clusterRadius: 45 }).< 10 hotspots: radius18px, color#eab308(amber-500)10 - 50 hotspots: radius24px, color#f97316(orange-500)> 50 hotspots: radius30px, color#dc2626(red-600)high:#ef4444,medium:#f97316,low:#eab308) with 2px white stroke.getClusterExpansionZoom().Acceptance criteria
GET /api/hotspots?late=24returns a valid, typed GeoJSON FeatureCollection.Blocked by
Issue 3: Live SiPongi active hotspots ingestion and clusteringto Live SiPongi active hotspots ingestion and clustering