Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .claude/features/regional-road-surfaces/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Regional road surfaces — gispulse #464

## Scope
Acquisition of official regional road footprints and axes in gispulse. Preserve
raw classification, geometry, levels and provenance. MILOU owns material mapping,
source priority, road-crossing decisions and EUR/m costing (MILOU PR #1401).

Base: integration/v2.4 (consumer dependency), isolated branch feat/regional-road-surfaces.
No geodata committed. No changes to consumer canonical configuration or routing cache.

## First milestone: PICC vector access
- [x] PICC MapServer layer 24 road polygons and layer 21 axes.
- [x] Explicit mandatory WGS84 bbox, bounded counted pagination, identity checks.
- [x] ArcGIS spatial-window semantics, including short/empty pages.
- [x] Reject older core implementations lacking required pagination.
- [x] Dry-run local export; raw fields, EPSG:31370, per-layer report/checksum.
- [x] Independent review and targeted regressions.
- [x] Live small-area fetch of both layers with page size 2.

## Remaining milestones
- [x] Verify PICC NIVEAU semantics and matching of road axes to footprints against official source contracts. Verified 2026-09-11 against the PICC conceptual data model: `NIVEAU` is relative on `VOIRIE_AXE` (layer 21, domain `{-2,-1,0,1,2}`) but **absolute** on `VOIRIE_SURFACE` (layer 24, 0=ground/+=bridge/-=tunnel) — same field name, two reference frames, documented in the plugin README. The model defines an official axis↔footprint join table (`VOIRIE_SURF_AXE_REL`), but it is not reachable through the currently wired ArcGIS REST channel (`PICC_VDIFF` MapServer advertises no tables; the FeatureServer variant errors server-side) — matching is not implemented, only the gap is documented.
- [x] Extend GRB source: WBN/WGO/Wegsegment/Wegknoop/KNW/WGA, native INTERSECTS and counted XML hits.
- [x] Reproducible GRB candidate partition bundle with topology diagnostics.
- [x] Classify reconstructed GRB faces from explicit upstream evidence (`classify_grb_faces`, PR #496). Axis-evidence-only, fail-closed, evidence-cited; validated live on the Gand bbox after **three rounds** of adversarial review — 22 `carriageway_paved` / 99 `unmapped` of 121 faces (see plugin README `## Validation`). Round 1 fixed an axis-graze false positive and unsplit corridors wrongly excluded; round 2 found that a two-pass Wcz-based `sidewalk` design (round 1's fix for the same inversion bug) was itself invertible — a carriageway split by a transversal Wcz line reads as `sidewalk` on its uncovered half — and that a symmetric numerator/denominator "fix" introduced a worse regression than the asymmetry it corrected, so `sidewalk` was removed entirely rather than patched a third time (see "Why there is no `sidewalk` class yet" in the plugin README); round 3, re-reviewing the simplified module, found that `VERH`/`STATUS` alone were insufficient — real Gand `voetgangerszone`/`wandel- of fietsweg` (pedestrian/cycling) axes are commonly in-service and paved, and were being labelled `carriageway_paved` — so Wegsegment `MORF` (already acquired, never read) became required evidence, gated to documented motor-traffic codes (101–112), plus a width guard for `unsplit` corridors an axis alone cannot vouch for (see "MORF" in the plugin README). Coverage went 36/121 → 89/121 (broken `sidewalk`) → 36/121 (removed) → 22/121 (MORF filter) across the three rounds — every drop a deliberate, fail-closed response to a specific adversarially-proven false positive, not a regression.
- [x] Reconcile axes with KNW structures (bridges/tunnels) before costing (`reconcile_knw_structures`, diagnostic only; PR review found the first cut's test suite failed to lock in 4 of 6 introduced mutations — corridor-vs-face propagation, the tolerance parameter, the dwithin predicate, and the TYPE filter — all now covered, plus a corrected `structures_matching_no_corridor` counter and `structure_evidence` column). Flags every face in a WBN corridor whose boundary touches a KNW polygon typed bridge (1) or tunnel entrance (12) — verified on real Gand data (and a wider 3.5 km sample: 91/92 bridges touch at distance exactly 0) that this is the right filter, since the much more numerous non-structure `pijler` (TYPE=5, which per the handbook can also be a bridge pier, not just unrelated street furniture as first assumed) also touches WBN constantly. Never changes `functional_class` or `ready_for_costing`; corridor-level contact, not a per-face distance measurement (flagged corridors can extend past 300 m from the structure on the wider sample) — documented as such, not oversold. Live on Gand: 3 bridges (2 touching corridors with faces, 1 touching only an out-of-coverage corridor with none — now counted, not dropped), 3 flagged corridors, 17/121 faces flagged, **2 of the 22 `carriageway_paved` faces among them** — a real face this module would otherwise treat as a confirmed carriageway sits in a corridor leading into a bridge. No tunnel (`TYPE=12`) present in this bbox; that path is unit-tested only.
- [x] UrbIS source acquisition (StreetSurfaces, StreetAxes, Bridges, Tunnels), counted WFS and live small-area validation.
- [x] Validate UrbIS level/axis/footprint reconciliation contract. Verified 2026-09-11 against the official ISO 19131 product specs (Paradigm.brussels): `lvl` is relative everywhere it appears (never absolute, unlike PICC surface `NIVEAU`), `StreetSurfaces.TYPE` is exhaustively enumerated (`SW`=sidewalk confirmed), and no segment-level foreign key exists between `StreetAxes` and `StreetSurfaces` — only a street-*name*-level `streetId`. Documented in the plugin README; reconciliation itself stays geometric/level-aware and unimplemented.
- [~] Prepare representative consumer artifacts and validate coverage/GC reconciliation in MILOU. Contract plumbing validated live 2026-09-11: real PICC (Namur, 17 surfaces), classified GRB (Gand, 121 faces) and UrbIS (Brussels, 29 surfaces) bundles run through MILOU's actual `scripts/prepare_regional_surfaces.py` against `config/surface_sources.yaml` and `cost_model.yaml` (branch `fix/surface-corridor-width-guard`), with a minimal synthetic OSM stand-in (the real 2GB `osm_surface_layers.geoparquet` was not loaded — MILOU's `read_geoparquet` crops by bbox only after a full in-memory read, unsafe to run unattended). Result (re-run 2026-09-11 after each of the GRB classifier's three correction rounds, most recently the MORF filter): PICC 17/17 mapped, GRB 121→22 accepted (all `heavy_pavement`, 99 correctly left unmapped), UrbIS 29→28 mapped (1 `P`/Place correctly unmapped, out of contract) — `classify_grb_faces`'s `functional_class` output needed zero adaptation to satisfy MILOU's consumer contract across all three rounds. **Not done**: the actual GC/CapEx coverage comparison (`scripts/reconcile_surface_capex.py`) against the real 1564-site production catalogue — deliberately deferred, it is heavy (2GB artifact, hours of runtime) and its outcome is a recette decision for MILOU/Simon, not a technical check to run unattended.
- [ ] Full regional acquisition, consumer activation, then routing cache regeneration.

Issue #464 stays open: first milestone does not complete regional coverage.
Loading
Loading