Repository navigation
Description
Part of #3096. Related to #3484 (deck ends). Found by the owner in the plan view (ground=plan).
Fault
Where a short bridge crosses a way, the plan view can draw no deck. The way below then ends at a concrete wall, about 5 m high, across the passage. Where the way below has the higher rank, the fault shows the other way: the way below cuts a notch through the railway or the road on top.
The owner's view: lat=46.970405&lon=8.421964&heading=344.8&pitch=-33.3&alt=495.3 (a side road below the two carriageways of a motorway). The fault is on develop. The tunnel slices do not change it.
Pictures on the owner's PC: /media/timo/OSM1/tmp/ground-plan/tunnels/underbridge/pics/ (INDEX.md; clearest: r1/o1-eye.jpg, r1/o1-owner.jpg, r1/p3-rail-over-track.jpg). State and census: tunnels/underbridge/STATE.md.
Cause (in the bake)
- The two carriageways cross the side road on bridge features 11.9 m and 11.7 m long (
bridge=yes,layer=1), with 5.35 m and 5.04 m of room. The bake writeslevels=O: each bridge becomes a ground way. graph/levels.rsplace_aputs each A line where the end line of the deck is clear of the arms at its end (Ctx::clear: the distance less the half-width of the arm). The arms include the straight continuation of the bridge way itself. Its stroke counts with a round end. Thus each A line moves in from each end by the half-width of the way (6 m for the motorway). The deck that remains is shorter thandeck_min_m(2 m), and the way becomes ground.- The wall is a step slot of storey 0 between the side road (484.45 m) and the carriageway on the ground (489.3 m to 489.5 m). It is drawn as concrete because the stretch is a bridge feature on the ground (
BRIDGE_GROUND).
Scope (test box B, census of graph::levels over all 9,108 cells)
- 2,111 bridge features cross a way or water with room for a deck.
- 74 get no deck: 12 over a way (8 places; motorway 4, trunk 2, rail 4, narrow gauge 1, tertiary 1, residential 1; lengths 2.9 m to 13.9 m) and 62 over streams.
- 65 of the 74 have less than 2 m between the A lines. 8 have 2.2 m to 4.3 m between them but no sample point in that length, so no deck run. 1 has an A line past
A_MAX_M. - A second group: 69 crossings (51 over a way) where the bridge keeps a deck, but the way below passes below the ground stub between the bridge end and the A line.
Rules (prototype counts from the census)
- Square end at the node. The paved stroke of an arm ends square at the node that it shares with the deck. A straight continuation then does not move the A line in; side arms still do. No deck: 74 → 4 (0 over a way). Stub crossings: 69 → 9. The A lines move on about 92 % of the deck ways (median 1.7 m out, 6 m at most), so most decks become longer.
- Keep the passage. An A line is never on the stroke of a way that passes below the deck with room for a deck. No deck: 74 → 2 (0 over a way). Stub crossings: 69 → 1. The A lines move on about 17 % of the deck ways (median 1.0 m).
Decision of the orchestrator: build rules 1 and 2 together. Rule 1 removes the cause, rule 2 guards the passage. The change is visible at most bridges, so the owner sees bridge pictures (before and after, many places, his flagged bridge views included) before the merge.
Work
- The rules in
graph/levels.rs, one focused test for each invariant. - A new features revision, a rebake of test box B for pictures, a rebake of the repo fixture. The off digests of cells with bridges change; list them.
- The 62 short bridges over streams: check the result against the culvert look.
- Before a production update: today's app before and after on the new data.
Separate fault seen at the same place, not traced: the motorway has no lane lines in the plan view along the full view (pics/r3/o1-along.jpg).
Requirements: none
Generated by Claude Code
Activity
timohueser commentedon Nov 19, 2026
This issue is item P0 of the epic #3651 (tunnel openings, underpasses and level crossing equipment as parts that the data bake places). The epic adds one thing to the rules here, and states one fact for the work:
deck_min_mdoes not turn a bridge over a way or water into a ground way.ground=plan) reads the taglevels, so the new revision of the feature tiles changes nothing that today's app draws. The pictures before | after are of the new roads; the rule of the epic for a production update stays (today's app pictured before and after on the new tiles at bridges).P0 does not depend on the other items of the epic and can merge at any time.
Generated by Claude Code
timohueser commentedon Nov 19, 2026
P0: the algorithm and its invariants (before the code)
Branch
claude/trailview-3639-bridge-passage, fromorigin/develop. All changes are inhost/obc-ground-plan/src/graph/levels.rs.Words. A passage of a deck way is the lower way of a crossing whose ladder gives step Full or Thin, under a deck way of the same deck group (
WayGraph::decks). A way and water are the same here. A culvert (step Closed over water) is no passage.A line from one tag end. The search goes from the tag end into the deck, as today. The A line is the nearer of two points:
The search for rule 2 reads the samples of the way and the stations of its own crossings, then steps of
A_STEP_Mand a bisection, asplace_adoes now. PastA_MAX_Mrule 1 finds no point. With a passage, rule 2 still gives one, so the way keeps a deck. With no passage the way is ground there, as today.deck_min_m. It turns a deck way into a ground way only when the way keeps no passage. A bridge over a way or water with room is a deck however short. A deck way with a passage cannot have zero length between its A lines: each A line stops before the passage stroke.Culvert. A deck way over a culvert is ground only when it keeps no passage. (I count how many ways have both and report it.)
Deck groups (
merge_a). The A lines of one group move in together, as today, but a line does not move onto the stroke of a passage.Checks.
deck_min_mbetween its end lines.Case distinctions that remain, and why.
There is no case by class, angle, length or junction type.
Tests (one per invariant). (a) A short bridge with straight approaches over a road has a deck from tag end to tag end (rule 1). (b) A bridge with a side arm at its end over a road near that end has its A line before the road's stroke, not inside the side arm's stroke (rule 2). (c) A bridge 1.5 m long over a stream with room keeps its deck (no lower limit).
Generated by Claude Code
timohueser commentedon Nov 19, 2026
P0: what is built, and rule 1 is parked
The branch
claude/trailview-3639-bridge-passagebuilds rule 2 only, with two additions. Rule 1 (square end at the node) is parked onclaude/trailview-3639-rule1-parked.Why rule 1 is parked. Rule 1 moves the deck end on 93 % of all bridge ways and brings the deck to the joint almost everywhere. The deck mesh cannot yet end a deck open at a joint with a bend. On the repo fixture the storeys guards then fail: decks put parapets or railings across the mouth of the way that goes on (3 places), and the edge triangles on stubs at their joints rise from 25 to 78. Rule 1 comes back with the mesh work for an open deck end at a joint.
What the branch does (
graph/levels.rs).deck_min_mand the culvert rule do not make it a ground way.MIN_STEP_M / 2(6.25 cm) from its tag end lies at the tag end: the graph that the tiles split cuts no shorter stretch at a vertex (curve::insert).Census of test box B (2,111 bridges over a way or water with room).
The way below a stub that remains is a footbridge 2.19 m over a primary road next to it (step 3): it is hidden over the road. That is not a placement of an A line.
Generated by Claude Code
Merge pull request #3708 from timohueser/claude/trailview-3639-bridge…
timohueser commentedon Nov 19, 2026
Fixed by #3708 (merged): a bridge over a way keeps its passage. Test box B: bridges without a deck 74 → 4 (stream bridges), none over a way. Rule 1 of this issue (square end at the node) is parked on the branch
claude/trailview-3639-rule1-parkeduntil the mesh can end a deck at a joint.Generated by Claude Code