feat: stream municipality vectors by viewport
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-14 10:47:23 +02:00
parent 4933284890
commit 1ba479b50b
19 changed files with 465 additions and 38 deletions
+36
View File
@@ -7474,3 +7474,39 @@ Open:
layering additional municipality-wide reference classes. Then acquire and
tile georeferenced imagery only for an explicitly selected Mol analysis zone
and run configured-YOLO plus QA/QC against the persisted GRB reference.
# Sprint 182 - Municipality viewport delivery and bounded AI handoff
## Implementation
- Added `useViewportVectorLayer` with centralized feature threshold, minimum
zoom, response limit and debounce policy. Vector datasets above 5,000
features now use the existing canonical PostGIS bbox-selection endpoint from
zoom level 14 instead of downloading the full stored GeoJSON file.
- Added MapLibre `moveend` viewport reporting, stale-request protection and
disabled automatic fit for viewport slices. AOI changes still frame the map;
small vectors and persisted analysis/evidence layers retain their existing
complete-layer fit behavior.
- Added explicit low-zoom, loading, visible/total, truncation and error states.
A selected large database layer is no longer presented as an empty or missing
layer before the first detail request.
- Extended the real-data detection/QA workflow with validated existing-project
reuse, safe distinct upload filenames and actual Area linkage for the raster
and matching reference vector. The workflow still consumes operator-provided
files and an existing local model asset; it performs no provider fetch or
model download.
## Local validation
- `python -m compileall backend/app` passed.
- Full backend suite passed: `500` tests.
- `npm run typecheck` and `npm run build` passed; the production build contains
85 transformed modules and preserves the dedicated MapLibre chunk.
- `bash scripts/run_readiness_check.sh` passed with the 81-route API contract
audit, one Alembic head `202606120900`, shell syntax checks and full frontend
build.
- Internal browser validation against the local frontend and live Tower API
selected `mol_grb_gbg_buildings.geojson`, showed the zoom-14 PostGIS delivery
guard, suppressed the incorrect empty-layer state and loaded an actual
viewport slice with `2 visible of 36,941 total features`. No browser warnings
or errors were recorded.