gap: a crossing is sized for a 7 m road, so its booms stop short and its masts stand in the carriageway #274

Merged
viberfox-agent merged 1 commit from fix/233-crossing-boom-road-width into main 2026-09-02 08:06:37 +00:00
Collaborator

Closes #233

Merged by the autopilot (docs/direction.md) after every Actions job passed on the branch head.

Closes #233 Merged by the autopilot (docs/direction.md) after every Actions job passed on the branch head.
fix(crossings): size a level crossing for the road it bars
All checks were successful
CI / test cartopolis (pull_request) Successful in 19m17s
CI / wasm & android targets (pull_request) Has been skipped
b2b92339d4
`CrossingKind::spec` returned a constant half-carriageway per form, and every
form but the mini one used 3.5 m — a 7 m road, for every AHOB, HAHOB, AOB and
lights installation in the country. The Peizerweg is OSM `highway=secondary`,
which `road_texture::road_width_m` answers 11 m for, and that is the ribbon this
client draws: both masts stood about a metre and a half inside the kerb, on the
asphalt, and each 4 m boom covered well under half the carriageway. It was wrong
the other way for the commonest small form — AHOB-MINI assumed 1.6 m where a
cycleway is 2.2 m wide and a footway 1.8 m.

The width was already within reach of the lookup that gives the yaw. `WayField`
now carries a half-carriageway per segment and `direction_and_width` returns it
beside the direction, so the installation is sized for the *same* segment it is
turned to — asking twice could pick two different roads, and a crossing sized
for one and turned to another is worse than either mistake alone. The number is
`vector_tiles::drawn_street`'s own, which is where the ribbon's width comes
from, so the two cannot drift.

`WayFilter::All` still reads no tags: it answers no width at all, which is why
the width is per-filter rather than per-field. That is the furniture's path over
every streamed cell and the rule its doc comment states.

Everything across the road now derives from that one half-width: the mast stands
`half + VERGE_M` from the centre (the bare 0.5 given a name), a half barrier's
boom reaches back `half + VERGE_M` so its tip meets the centreline, and a full
barrier's reaches `2 × half + VERGE_M` so its tip meets the far kerb. Where the
field cannot answer — no `kind`, a kind `road_class` refuses, a tunnel — the
form's old constant is the fallback and the placement is exactly what it was.
The one number that moved there is the full barrier's reach, 7.5 m against a
tabulated 7.6: the 10 cm is the accepted cost of deriving it rather than writing
it down.

BOOM_BANDS is unchanged, so a longer boom costs no extra vertices and
CROSSING_MAX_BYTES does not move.

Refs #233
viberfox-agent deleted branch fix/233-crossing-boom-road-width 2026-09-02 08:06:37 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jeroen/cartopolis!274
No description provided.