Add governed DHMV terrain analysis
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-15 18:13:05 +02:00
parent 0e36d750c0
commit 5d8b46ed60
36 changed files with 1936 additions and 44 deletions
+43
View File
@@ -219,6 +219,49 @@ dimensions, EPSG:4326/EPSG:31370 bounds, sampling resolution, attribution,
cache reuse and limitation text. Historical products also persist their
observation/validity period and a spatially scoped temporal-series key.
### GET `/api/v1/projects/{project_id}/datasets/dhmv/products`
Returns the fixed official DHMV II product registry in the canonical envelope.
The registry contains only `dtm_1m` (`DHMVII_DTM_1m`) and `dsm_1m`
(`DHMVII_DSM_1m`). Each item records native 1 m resolution, EPSG:31370, TAW,
the 2013-2015 acquisition period, attribution, catalogue and limitations.
### POST `/api/v1/projects/{project_id}/datasets/dhmv/acquire`
Runs a bounded WCS 2.0.1 `GetCoverage` request behind the existing synchronous
Job abstraction. Arbitrary coverage identifiers are rejected.
```json
{
"bbox": {"min_x": 5.0, "min_y": 51.1, "max_x": 5.2, "max_y": 51.3, "crs": "EPSG:4326"},
"area_id": "optional-project-area-uuid",
"product_key": "dtm_1m",
"resolution_m": 5.0,
"force_refresh": false
}
```
The service extracts the GeoTIFF from the official multipart response, clips
to the exact persisted Area when supplied, validates EPSG:31370, one band,
resolution, nodata and valid cells, then persists through `DatasetService`.
The default 5 m file is an analysis copy of the retained 1 m source product;
both resolutions and all request/response/output checksums remain provenance.
### POST `/api/v1/projects/{project_id}/datasets/{dataset_id}/raster/terrain/select`
Accepts an EPSG:4326 rectangle and optional Area id. It reads only a governed,
ready DHMV Dataset and returns a canonical envelope with valid-cell coverage,
mean/min/max/P10/P90 height in `m TAW`, relief in metres and mean/P90/max slope
in degrees. Area geometry is an exact mask, not only a bounding box.
The response always lists `water_depth_m` and `water_volume_m3` under
`unsupported_metrics`. Drainage is not calculated by this endpoint.
### GET `/api/v1/projects/{project_id}/datasets/{dataset_id}/raster/terrain/image`
Returns a browser-safe PNG colour relief for the persisted governed DHMV
Dataset. This binary MapLibre source never accepts an arbitrary file path.
Safety contract:
- every side must measure between 128 m and 1,024 m in EPSG:31370;
+33
View File
@@ -8684,3 +8684,36 @@ Next:
- Implement P4 Digitaal Hoogtemodel Vlaanderen with a governed DTM/DSM product,
vertical reference, bounded raster storage and measured elevation/slope
statistics. Do not infer water depth or volume from terrain height alone.
## Sprint 207 - Governed DHMV II terrain foundation (2026-07-15)
Implemented:
- Added a fixed `dtm_1m`/`dsm_1m` product registry for the official Digitaal
Vlaanderen production WCS and rejected arbitrary coverage identifiers.
- Added bounded WCS scaling, multipart GeoTIFF extraction, exact persisted-Area
clipping and validation of EPSG:31370, one Float32 band, resolution, nodata
and valid cells before canonical DatasetService persistence.
- Retained response, coverage and normalized-output SHA256 evidence plus native
1 m resolution, default 5 m analysis resolution, TAW and period 2013-2015.
- Added exact masked terrain selection with governed height, relief and slope
metrics. DTM and DSM semantics remain separate; water depth/volume remain
explicit unsupported metrics and drainage is not calculated.
- Added the `Hoogte & reliëf` map theme, MapLibre colour-relief overlay,
readable period/source labels and raster-aware rectangle/full-Area queries.
- Added `scripts/provision_mol_dhmv.py`, Docker/Unraid settings and documentation.
Initial validation:
- Focused acquisition, raster, GIS metric, API, frontend and packaging tests
pass with deterministic synthetic GeoTIFF fixtures.
- No migration, direct raster database write, LiDAR point-cloud processing or
water-volume inference was introduced.
Known limitations:
- DHMV II represents acquisition period 2013-2015 and is not a current or
annual height series. Exact flight-day contours are not yet joined.
- The 5 m analysis copy is operationally bounded; sub-5 m detail requires an
explicit smaller acquisition. DSM-DTM building height remains future work.
Next:
- Complete the full readiness and live Mol operator/browser validation, then
audit P5 bathymetry sources before enabling any water depth or volume metric.
+20 -7
View File
@@ -220,9 +220,10 @@ until a governed operator import, provenance record and validation pass exist.
- Buildings and Addresses Register (Digitaal Vlaanderen): continuously updated
building status, life cycle and address linkage; complementary to GRB
geometry and not yet imported.
- DHMV II DTM/DSM (Digitaal Vlaanderen): 1 m/5 m elevation based on 2013-2015
LiDAR, suitable for elevation, slope and drainage. It does not provide water
depth.
- DHMV II DTM/DSM (Digitaal Vlaanderen): governed bounded WCS acquisition is
implemented below. The official 1 m source and 5 m analysis copy are suitable
for measured elevation, relief and slope. Drainage remains an interpretation;
the products do not provide water depth.
## Governed BWK and Natura 2000 state 2025
@@ -322,10 +323,22 @@ quality metrics.
- Naam: Digitaal Hoogtemodel Vlaanderen
- Type: raster/hoogte
- Gebruik: DEM, DSM, helling, laagste punten
- Toegang: Vlaamse open data, download/WCS nader te bepalen
- Cache: raster storage
- Prioriteit: V3
- Gebruik: DTM/DSM hoogte, reliëf, helling en laagste punten
- Toegang: productie-WCS `https://geo.api.vlaanderen.be/DHMV/wcs`
- Coverages: `DHMVII_DTM_1m`, `DHMVII_DSM_1m`
- Native raster: 1 m Float32, EPSG:31370, nodata `-9999`, hoogte in TAW
- Opnameperiode: 2013-2015; geen uniforme recente peildatum
- Cache: canonical raster Dataset plus WCS request/response/output checksums
- Operator: `scripts/provision_mol_dhmv.py`
- Prioriteit: P4 uitgevoerd voor Mol
The operator requests a bounded 5 m analysis copy by default so a complete
municipality remains operationally manageable while retaining the official
1 m native resolution in source metadata. The response is clipped to the exact
persisted Area before `DatasetService` stores it. DTM is bare-earth terrain;
DSM includes buildings and vegetation. Neither is exposed as water depth,
water volume or a directly measured building-height product. A drainage model
would require a separately governed hydrological processing pass.
## Gebouwenregister
+18 -7
View File
@@ -159,12 +159,23 @@ Hoogtedata voor terrein- en watergevoeligheidsanalyse.
### Gebruik
- DEM
- DSM
- helling
- laagste punten
- hoogteprofiel
- gebouwhoogte-inschatting indien DSM + gebouwpolygonen beschikbaar zijn
- DTM-maaiveldhoogte in meter TAW
- DSM-oppervlaktehoogte in meter TAW
- reliëf en helling in graden uit geldige rastercellen
- laagste punten als terreinindicator
- gebouwhoogte-inschatting alleen in een latere, gevalideerde DSM-DTM/gebouwketen
### Governed product
- Digitaal Vlaanderen DHMV II, DTM/DSM raster 1 m
- WCS coverages `DHMVII_DTM_1m` en `DHMVII_DSM_1m`
- EPSG:31370, Float32, nodata `-9999`, verticale referentie TAW
- opnameperiode 2013-2015
- standaard GeoIntel-analysekopie 5 m, exact geclipt op Area
Waterdiepte, waterinhoud, actuele toestand en afstroming zijn geen directe
DHMV-metingen. Zij blijven onbeschikbaar tot een afzonderlijke bron en
gevalideerde methode bestaan.
### Type
@@ -172,7 +183,7 @@ Raster / afgeleid van LiDAR.
### Prioriteit
V3.
P4 operationeel voor Mol; regionale uitrol volgt dezelfde operatorgrenzen.
## LAS/LAZ LiDAR
+9
View File
@@ -109,6 +109,15 @@ product/layer, request/spatial hash, temporal validity and limitations are held
in source/provenance metadata. Browser PNG rendering is derived on request and
does not replace the stored GeoTIFF.
DHMV II DTM/DSM outputs are also normal raster Dataset files. The provider WCS
returns multipart coverage data; GeoIntel retains response and extracted
coverage SHA256 values in provenance, then stores one normalized, compressed,
Area-clipped GeoTIFF with its ordinary Dataset/DatasetVersion checksum. Source
metadata records the 1 m native product, 5 m default analysis grid, EPSG:31370,
`-9999` nodata, TAW and acquisition period 2013-2015. Colour-relief PNGs are
derived browser views and are never authoritative. No raster binary is stored
in PostgreSQL and no DHMV file is treated as water depth or volume.
BWK/Natura 2000 evidence lives under
`storage/operator-evidence/bwk-natura2000-2025/mol/`. The `raw/` directory
contains immutable WFS pages; the adjacent manifest records their URLs,
+4 -4
View File
@@ -60,10 +60,10 @@ pass live Mol validation before regional expansion.
### P4 - Digitaal Hoogtemodel Vlaanderen
- [ ] Select official DTM/DSM product, service and native resolution; retain acquisition date and vertical reference.
- [ ] Add bounded raster acquisition/clip storage with nodata, CRS, resolution and checksum validation.
- [ ] Implement governed elevation, relief and slope statistics in metres/degrees; keep drainage interpretation explicitly derived.
- [ ] Do not label terrain/surface height as water depth and do not enable volume from DHMV alone.
- [x] Select official DTM/DSM product, service and native resolution; retain acquisition date and vertical reference.
- [x] Add bounded raster acquisition/clip storage with nodata, CRS, resolution and checksum validation.
- [x] Implement governed elevation, relief and slope statistics in metres/degrees; keep drainage interpretation explicitly derived.
- [x] Do not label terrain/surface height as water depth and do not enable volume from DHMV alone.
### P5 - Water depth / bathymetry