Constrain selections to active work areas
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 12:58:38 +02:00
parent a29c787238
commit d652db6a1e
20 changed files with 329 additions and 71 deletions
+10 -6
View File
@@ -776,7 +776,11 @@ Rules:
- Only vector/GeoJSON datasets are supported.
- Coordinates are EPSG:4326 longitude/latitude.
- `area_id` is optional and must belong to the route project. When present, the bbox remains the bounded preview extent but PostGIS filtering and configured aggregations use the persisted Area geometry exactly. This prevents a municipal or regional full-work-area query from counting objects in the surrounding bbox corners.
- `area_id` is optional and must belong to the route project. When present,
PostGIS filtering and configured aggregations use `bbox ∩ Area`. A bbox that
encloses the complete Area therefore produces the exact full-work-area
result, while a drawn rectangle that crosses a municipality boundary is
clipped to that official boundary.
- Results are generated from persisted PostGIS `vector_features`, not from client-side map data.
- `feature_count` is the number of GeoJSON features returned in the bounded preview. `total_feature_count` is the exact number of persisted rows intersecting the requested bbox or persisted Area geometry.
- `summary` keeps one backwards-compatible primary metric and exposes all relevant measurements in `metrics`. Known themes use metric PostGIS calculations: building/forest/water/parcel surfaces in hectares, road and watercourse lengths in kilometres, population in inhabitants and intersecting feature counts as supporting evidence.
@@ -1735,7 +1739,7 @@ Map vector selection export request:
{
"export_kind": "vector_selection",
"dataset_id": "uuid",
"area_id": "optional-uuid-for-an-exact-full-work-area-export",
"area_id": "optional-uuid-used-as-an-official-area-constraint",
"bbox": {
"min_x": 5.0,
"min_y": 51.0,
@@ -1789,10 +1793,10 @@ existing Detection/Segmentation GeoJSON conversion services. Vector selection
exports query persisted PostGIS `vector_features` with the supplied EPSG:4326
bbox, write the selected FeatureCollection as a `vector_selection_geojson`
artifact, and persist bbox/feature-count metadata in the export record. When
`area_id` is present, the persisted Area geometry is the exact export scope;
the frontend only sends this for the explicit `Volledig werkgebied` action.
Drawn or manually entered rectangles omit `area_id` and remain exact bbox
queries. Raster
`area_id` is present, the export scope is `bbox ∩ Area`. The frontend sends the
active Area for drawn, manual and full-work-area selections so no result can
leak outside the chosen official boundary. A bbox enclosing the complete Area
still resolves to the exact Area geometry. Raster
datasets are rejected for dataset and selection GeoJSON export.
### POST `/api/v1/exports/map-result`