From 3b919adc564b30a6c1e85ff27261850400d2c485 Mon Sep 17 00:00:00 2001 From: grabowski Date: Mon, 10 Aug 2026 16:14:34 +0700 Subject: [PATCH] feat: vector flood-zone polygons replace the scanned-map overlay Digitize the 7 Chiang Mai inundation zones from the municipal map into geojson polygons: pixels classified by legend color, vectorized via marching squares, and georeferenced by a 6-parameter affine fitted least-squares to the OSM Ping centerline (109 m median residual after outlier-filtered refits - the scanned image overlay could never scale correctly and is removed). The dashboard renders the zones as a Leaflet geoJSON layer styled live from the forecast: fill opacity scales with each zone's 24 h exceedance probability, zones whose trigger level the river has already reached get a solid red border, and each polygon's popup shows its trigger level and live probability. Zone styles refresh with every forecast load. --- src/static/dashboard.html | 77 +++++++++++++++++++++++++----- src/static/flood-zones-p1.geojson | 1 + src/static/flood-zones-p1.jpg | Bin 150778 -> 0 bytes 3 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 src/static/flood-zones-p1.geojson delete mode 100644 src/static/flood-zones-p1.jpg diff --git a/src/static/dashboard.html b/src/static/dashboard.html index f9dce15..9f6da51 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -247,7 +247,7 @@