diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 85204d76..510d8865 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -8502,3 +8502,58 @@ Live completion evidence: winter orthophoto as a MapLibre overlay. The UI retained its explicit warning that historical imagery is not validated against the current GRB state. - The browser console contained no warnings or errors after the complete flow. + +## Sprint 204 - Governed BWK and Natura 2000 for Mol (2026-07-15) + +Implemented: +- Added `provision_mol_bwk_natura2000.py` for the official INBO + `BWK:Bwkhab` state-2025 WFS. The explicit operator follows complete + pagination, retains every raw page with URL and SHA256 evidence, and refuses + silent replacement when a persisted checksum differs. +- Clipped source polygons against the exact persisted Mol Area in EPSG:31370, + transformed valid polygonal output to EPSG:4326 and imported only through + the canonical Dataset upload route. Original BWK evaluation, mapping-unit, + origin, habitat and PHAB fields remain present on persisted features. +- Added server-owned filtered PostGIS metrics for the official `EVAL` classes, + area-weighted Natura 2000 habitat, regionally important biotopes and + uncertain `ohab` knowledge gaps. PHAB-derived values remain labelled as + estimates. +- Added the Natuurwaarde map theme and source-inventory state. The 2025 product + is presented as one current map state and not as a fabricated annual trend. + +Validation evidence: +- The source fetch retained 11 checksummed WFS pages containing 10,332 bbox + features. Exact Mol clipping retained 4,668 features, rejected 5,664 outside + features, clipped 476 boundary-crossing features and found no duplicates. +- Full local readiness passed backend compilation, 637 backend tests, one + Alembic head, frontend TypeScript typecheck/build and shell syntax gates. +- Tower deployment passed container health, PostGIS 3.6 migration/schema smoke, + frontend proxy and icon verification. +- The first live upload correctly failed before persistence because + `observed_at` lacked the required `temporal_series_key`. The operator now + records `inbo-bwk-natura2000:mol` with snapshot granularity; the focused + regression suite passed and the corrected deployment imported exactly 4,668 + `vector_features`. A second operator run returned `existing` for the same + Dataset and checksum. +- A live exact-Area PostGIS selection measured 11,447.996 ha mapped BWK area: + 960.446 ha very valuable, 3,082.023 ha valuable, 4,697.797 ha less valuable + and 2,707.730 ha mixed. Source-faithful weighted results were 821.690 ha + Natura 2000 habitat, 143.565 ha regional biotope and 104.557 ha uncertain + habitat/knowledge gap. +- Browser validation at 1280x720 selected Mol, activated Natuurwaarde and ran + the full-work-area analysis. All seven available themes returned persisted + metrics, the MapLibre layer rendered, no horizontal document overflow was + present and the console contained no warnings or errors. The source inventory + reports one current BWK state and 4,668 loaded map polygons. + +Known limitations: +- The official state-2025 edition is the best available map state, not one + uniform 2025 field survey. Origin fields remain necessary for interpretation. +- PHAB percentages can be theoretical source allocations and may differ from + field reality. GeoIntel does not reinterpret them as exact field coverage. +- Regional Kempen coverage and historical comparison remain separate future + work; this sprint proves the governed Mol path only. + +Next: +- Implement P2 annual agricultural-use parcels, beginning with an edition and + code-list comparability audit before any import or trend is exposed. diff --git a/docs/TODO.md b/docs/TODO.md index e4c8fb2c..af621b61 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -24,7 +24,8 @@ - [ ] Add a governed depth/bathymetry source before exposing water volume; never infer volume from 2D GRB water geometry. - [x] Integrate governed Waterinfo/VMM annual station series without presenting point measurements as area-wide water volume. - [x] Add bounded historical orthophoto acquisition for official 1971-2025 products with a map overlay and no current-GRB QA on old imagery. -- [ ] Add BWK/Natura 2000 and annual agricultural-use parcels through explicit provider/operator contracts. +- [x] Add BWK/Natura 2000 through an explicit provider/operator contract. +- [ ] Add annual agricultural-use parcels through an explicit provider/operator contract. - [ ] Extend the official 1778/1873/1969 historical buildings, water and roads series from Mol to the approved regional scope with partitioned source audits. - [x] Connect a drawn rectangle to bounded official orthophoto acquisition, local configured-YOLO detection and persisted GRB QA. @@ -36,11 +37,11 @@ pass live Mol validation before regional expansion. ### P1 - Biologische Waarderingskaart / Natura 2000 -- [ ] Confirm the official downloadable service/layer/version and licence for the 2025 state. -- [ ] Define stable habitat/biotope/value fields and keep BWK valuation separate from Natura 2000 habitat classification. -- [ ] Clip in EPSG:31370 to Mol, transform to EPSG:4326 and persist valid polygonal `vector_features` with source feature ids. -- [ ] Add hectare metrics per governed class plus unknown/unmapped-class diagnostics; do not invent an annual trend from one state. -- [ ] Add source manifest, unit tests, live row/count/geometry audit and map/source-inventory presentation. +- [x] Confirm the official downloadable service/layer/version and licence for the 2025 state. +- [x] Define stable habitat/biotope/value fields and keep BWK valuation separate from Natura 2000 habitat classification. +- [x] Clip in EPSG:31370 to Mol, transform to EPSG:4326 and persist valid polygonal `vector_features` with source feature ids. +- [x] Add hectare metrics per governed class plus unknown/unmapped-class diagnostics; do not invent an annual trend from one state. +- [x] Add source manifest, unit tests, live row/count/geometry audit and map/source-inventory presentation. ### P2 - Annual agricultural-use parcels