Skip to content

feat(sources): road-crossings level evidence for Wallonia and Brussels - #502

Merged
imagodata merged 2 commits into
mainfrom
feat/road-crossings-wallonia-brussels
Oct 1, 2026
Merged

imagodata merged 2 commits into
mainfrom
feat/road-crossings-wallonia-brussels

Conversation

@imagodata

Copy link
Copy Markdown
Owner

What

This PR follows #501. It implements Simon's D5 decision: road-crossings level evidence for Wallonia (PICC) and Brussels (UrbIS), with the same output contract as the GRB. That contract is one row per road unit, in EPSG:31370: footprint, a second axis geometry column, road_id, structure ∈ {ground, grade_separated, unknown}, complex_crossing, provenance. It also comes with a separate coverage polygon and an exclusions layer.

  • Shared engine: road_crossings_common.py, extracted from the GRB module. It covers axis clipping, fragment merging (degree-2 nodes only), accounting of every drivable axis, coverage exclusions and output assembly. grb_road_crossings is rebuilt on it, with its behaviour unchanged apart from the 120/125 decision.

  • Wallonia: picc_road_crossings, wired into export_picc.

    VOIRIE_SURFACE structure
    Ouvrage d'art, NIVEAU ≥ 1 grade_separated (bridge; the level is stated by the PICC conceptual model)
    Ouvrage d'art, NIVEAU ≤ −1 unknown (tunnel; see below)
    Ouvrage d'art, NIVEAU 0 ground (stated)
    Tronçon/Carrefour, empty NIVEAU ground (closed-world reading of the continuous inventory, D5)
    • Decks and tunnels take priority over the ground they cover.
    • An unreadable NIVEAU is never read as empty.
    • This departs from D5, which made tunnels grade_separated. PICC axes carry no level, so inside a tunnel footprint the tunnel's axis cannot be told from a street above it. Labelled grade_separated, a street above would count zero without an error. Left to the ground above, the tunnel's axis would be bored as a ground crossing; the review measured 674 m of such axes on Liège. unknown asks the consumer for proof instead.
  • Brussels: urbis_road_crossings, plus a new python -m gispulse_src_urbis.prepare command.

    • Road bridges ROB are grade_separated, and so are road tunnels ROT, with their axes below LVL 0.
    • Carriageway surfaces at LVL 0 are ground, with their LVL 0 axes only.
    • Railway, metro and pedestrian structures leave the road at ground.
    • A level that no structure explains leaves coverage.
  • GRB: MORF 120 dienstweg is now a carriageway and 125 aardeweg is not. This was Simon's costing decision; it is reported under axis_classes.

  • PICC fix: the source requests XY-only geometry (returnZ=false). Projected server-side to WGS84 with Z, some real surfaces came back self-intersecting, and export_picc failed with PICC_LAYER_INVALID on a 6 × 6 km tile at Liège.

Validation (live)

region tile units grade_separated unknown coverage time
Wallonia Liège 6 × 6 km 3 755 ground 77 bridges 16 tunnels 98.7 % 4 s
Brussels centre-east 5 × 5 km 7 774 ground 42 (20 ROB, 22 ROT) 0 93.8 % 5.4 s
Flanders Gand / Oudenaarde / Leuven unchanged unchanged unchanged 96.1 / 97.4 / 96.2 % (was 93.3 / 96.3 / 91.4) —
  • No billable footprints overlap, every axis is simple, and every artifact loads in MILOU's real load_road_crossings.
  • End-to-end runs of export_picc --write and prepare_urbis --write were done on the real services.
  • Tests: 282 pass across the GRB, PICC and UrbIS capability and plugin suites. The full unit suite with the CI extras gives 6 546 passed, plus the same 8 orchestration failures that main has.
  • Adversarial review (opus-reviewer):
    • no GRB regression from the refactor on real data;
    • tunnel ambiguity fixed: 674 m of tunnel axes on ground rows down to 0;
    • unreadable NIVEAU fixed;
    • empty PICC layers fixed;
    • axes on the inner boundary of merged fragments fixed.

Release note

The PICC and UrbIS plugins now import core modules that are not in 2.5.0 (picc_road_crossings, urbis_road_crossings, road_crossings_common). Their gispulse>=2.5.0 floor must be raised at the next release, as 2.5.0 did for #496.

MILOU side (unchanged, not fixed here)

These consumer findings still block activation:

  • longitudinal "crossings" bored over the whole run (36 more of them on the Liège tile);
  • ROAD_CROSSING_INCOMPLETE when a tracé ends inside a footprint;
  • an empty artifact is rejected;
  • the coverage polygon is not read yet. Simon decided D6 = mixed forage per edge, which is to be implemented in MILOU.

🤖 Generated with Claude Code

sducournau and others added 2 commits October 1, 2026 16:21
…eway, 125 not

Extract axis clipping, fragment merging (degree-2 nodes only), accounting of
every drivable axis, coverage exclusions and output assembly from
grb_road_crossings into road_crossings_common, so the PICC and UrbIS
producers behave identically. The GRB output is unchanged on the Gand,
Oudenaarde and Leuven samples (same road_id, structures, axes, footprints and
coverage), except that a merged unit now keeps a carriageway axis lying
exactly on its inner fragment boundary.

MORF 120 dienstweg becomes a carriageway and 125 aardeweg does not (Simon's
costing decision; reported under axis_classes). Coverage on the samples goes
from 93.3/96.3/91.4 % to 96.1/97.4/96.2 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: sducournau <simon@imago.dev>
Implements decision D5 with the GRB output contract.

PICC (export_picc now publishes road_crossings*.geoparquet): Ouvrage d'art
NIVEAU >= 1 decks are grade_separated (stated level) and take priority over
the ground under them; NIVEAU 0 surfaces and Tronçon/Carrefour surfaces with
an empty NIVEAU are ground (closed-world reading of the continuous
inventory); an unreadable NIVEAU is never read as empty. Tunnels (NIVEAU <=
-1) are unknown and leave coverage: PICC axes carry no level, so a tunnel's
axis cannot be told from a street above it.

UrbIS (new gispulse_src_urbis.prepare): ROB road bridges are grade_separated
with every axis inside, ROT road tunnels with their axes below LVL 0;
carriageway surfaces at LVL 0 are ground with their LVL 0 axes; a level no
structure explains leaves coverage.

Fix: the PICC source requests XY-only geometry. Projected to WGS84 with Z,
some real surfaces came back self-intersecting and export_picc failed with
PICC_LAYER_INVALID on a Liège tile.

Validated live: Liège 3755 ground / 77 bridges / 16 tunnels unknown, 98.7 %
coverage; Brussels 7774 ground / 42 grade_separated, 93.8 %. Artifacts load
in MILOU's load_road_crossings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: sducournau <simon@imago.dev>
@imagodata
imagodata merged commit 4893a46 into main Oct 1, 2026
8 of 10 checks passed
@imagodata
imagodata deleted the feat/road-crossings-wallonia-brussels branch October 1, 2026 14:45
@imagodata imagodata mentioned this pull request Oct 1, 2026
imagodata added a commit that referenced this pull request Oct 1, 2026
Bump gispulse to 2.5.1 (pyproject, QGIS plugin metadata, uv.lock) and
promote the changelog for #502 (road-crossings level evidence for
Wallonia and Brussels, GRB MORF 120/125 decision, PICC returnZ fix),
mirrored into docs-site FR and EN.

The PICC and UrbIS plugins import builders that first ship in 2.5.1, so
their floor is raised to gispulse>=2.5.1. They also move to 0.2.0: with
an unchanged version, pip skips reinstalling a git-tag install, and users
of the v2.5.0 plugins would keep the old code. The GRB plugin code is
unchanged and keeps gispulse>=2.5.0.

The notes document the consumer-visible side effects of the GRB MORF
change and how the PICC/UrbIS artifacts differ from GRB's (labels in
morf_codes, separate bridge/tunnel grouping, coverage not clipped to the
source territory).

Capability count unchanged (144).

Signed-off-by: sducournau <simon@imago.dev>
Co-authored-by: sducournau <simon@imago.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant