You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
p7-s4: OSM road-network extraction + scale targets #244
Perf harness: there is no perf/bench job in CI today — this sprint creates the first; state the runner-variance policy.
Import metadata is Layer 2 (ADR-0008). No golden workflow covers import (the pre-reset GS-2 analogue was retired without replacement) — the biggest import feature in the product currently has no hand-run gate.
An OSM district imports into an editable network meeting the perf targets; diagnostics enumerate the fitting compromises.
Met, with one number reported honestly rather than flattered — see the perf section.
An .osm extract becomes a real, editable network: ways classified onto the four road classes, split at OSM's own shared nodes, joined as links or generated junctions, in one undoable command.
Diagnostics-first fitting is a contract in the type system, not a promise. FitCompromise carries the measured node counts and the actual deviation in metres, and the diagnostic is a rendering of it — so a build that stopped warning would also have to stop being able to answer max_deviation_m, which a test asks directly.
The contract cuts both ways: a way imported without compromise produces no diagnostic at all. Warning about everything says exactly as much as warning about nothing.
The decision (ADR-0012): .osm XML in-house, .pbf refused — on zlib, not protobuf
The obvious argument — Protocol Buffers is a heavyweight dependency — is true of the library and irrelevant, because we would not take the library: the OSM PBF schema is varints and length-delimited fields, a few hundred lines of exactly the character ADR-0011 chose to write for ASPRS LAS. On that axis .pbfpasses ADR-0011's test.
It fails because every .osm.pbf in circulation stores its blobs as zlib_data, and zlib is deliberately absent (deps.cmake:195 turns it off for libtiff — the reason Deflate sits in ADR-0010's refused column). zlib's arrival is already scoped as #484. Third instance of the same ruling, and cmake/deps.cmake did not change at all — the first import sprint of three for which that is true.
What the tests and the bench found, none of which this issue named
1. The import produced no junctions at all. OSM states a crossing by sharing a node, so every arm runs to exactly the same point — and a connecting road between two arms meeting at a point has zero length and nowhere to curve. A 7×7 lattice planned 25 junctions and built zero, every turn reporting "clothoid fit failed" — and it still looked plausible in the road count, because the authored roads were all there. Fixed by pulling junction arms back 12 m (never link arms, whose ends must stay coincident); the same lattice now builds 45 junctions and drops no turns. No unit test found this — the scale bench did, because it was the first thing to inspect the built network rather than the plan.
2. for_each_road does not yield creation order. It walks slots ascending and reuses freed ones, so the first id-recovery design — an arena diff paired with the plan positionally — produced two roads carrying each other's geometry, exactly the "welds the wrong ends together, silently" failure it existed to prevent. Fixed by deleting the assumption: edit::create_road gained an optional odr_id, and the joint stage builds one O(n) map. Order-independent by construction.
3. Four of my own tests were vacuous, each caught by sabotage or by running the example. The most instructive asserted only that every planned odr_id was findable — which a permutation preserves perfectly. A pairing must be checked as a pairing. And one sabotage was itself incoherent: it patched one of three key-construction sites, leaving the code neither correct nor consistently broken, so its "pass" meant nothing.
4. lossless is about the shape, not the vertex count. Running python/examples/osm_import.py showed every road reported as compromised at 0.000 m deviation. A way traced along a constant latitude is a curve once projected, so three collinear nodes deviate ~1 mm from their own chord and a micron-scale epsilon calls clean data compromised.
A new scale targets CI job runs roadmaker_scale_bench — a separate executable ctest never runs, because ctest -j 4 starts ~1 800 processes on a four-core runner and a timing test inside that set measures the scheduler. It uploads scale-metrics.json, the repository's first metrics artifact, and the job asserts every key is present before uploading: a bench that quietly did not run is otherwise indistinguishable from a green one.
metric
measured (dev, 420 segments → 3 064 roads)
parse + plan
0.7 ms
network build
19 102 ms
.xodr load (4.6 MB)
140 ms
one-road remesh
0.081 ms
peak RSS
110 MB
parse+plan growth ratio
3.84 (quadratic ≈ 16)
Node-drag latency is flat — 0.068 ms on 1 624 roads, 0.081 ms on 3 064 — which is the answer that metric exists to give.
The build number is bad, and it is reported rather than hidden. The step is super-linear: 84 segments cost 92 ms and 420 cost 19 200 — five times the roads for two hundred times the time. Filed as #502, with the suspect named and "confirm before fixing" stated. The CI job therefore runs a smaller district and the ceiling sits deliberately far above where it belongs, both facts stated in the code. Shrinking the district permanently and reporting a flattering number was the alternative, and it would have dodged the only question #54 asked.
test_osm_scale.cpp runs the same code at reduced size in the ordinary suite, so the scale path is compiled and exercised on all three platforms every PR while only the numbers are Linux-gated.
Follow-ups filed, labelled, milestoned and on the board
#454 stays open for its second half (stamping <type> from the road class at create_road), with a comment explaining exactly what landed and why the rest was held back.
Out of scope, as stated
Building-footprint extrusion, terrain (p5-s4) and imagery (p7-s2).
Activity
JArmandoAnaya commentedon Jul 27, 2026
2026-07-27 roadmap review — corrections and cross-references (issue written before recent landings; body stands, read with these):
highway=*classes must map ontoroadmaker::defaults::RoadClass(freeway/arterial/collector/local, p2-s11: road-class cross-section & marking defaults per realism spec + CI divergence guard #413) and derive widths/markings from the registry — an own width table trips thetest_defaults_registry.cppdivergence gate. Related: roads:<type>and<speed>records are silently dropped — model them and write them from the road class #454 now proposes modeling OpenDRIVE<type>/<speed>from the road class; OSM import should write them through that path.@value+@unit(mph deliberately bypasses the units layer) — reuse it, don't re-decide.roadmaker::signs::catalog()+ controllers/phases +auto_signal_facing— p6-s12: US sign pack — designated signs with baked text/symbol faces #414 explicitly killed the last hard-coded identity tables; don't reintroduce one..osm.pbfreader (a new dependency review).docs(decisions): OSM ingest reads .osm XML in-house, and .pbf turns o…
feat(xodr): model road <type> and <speed>, so a speed limit survives …
feat(osm): read an OSM extract, and say what each way becomes
test(geometry): repair the segment-vs-line test, which the sabotage r…
feat(osm): read an OSM extract, and say what each way becomes (p7-s4) (…
fix(scale): take the district size from --blocks, not the environment
fix(scale): <windows.h> defines 'small' as char, and the bench used it
feat(osm): turn an OSM extract into an editable network, and measure …
feat(editor): import an OSM district into the scene, in one undo entry (
JArmandoAnaya commentedon Jul 29, 2026
Closed by five PRs
0bb0c48docs/domain/osm_mapping.md2feb75a<type>/<speed>(#454's modelling half)ffe8d79.osmreader, tag mapping, polyline simplifiere480b4eAcceptance
Met, with one number reported honestly rather than flattered — see the perf section.
.osmextract becomes a real, editable network: ways classified onto the four road classes, split at OSM's own shared nodes, joined as links or generated junctions, in one undoable command.FitCompromisecarries the measured node counts and the actual deviation in metres, and the diagnostic is a rendering of it — so a build that stopped warning would also have to stop being able to answermax_deviation_m, which a test asks directly.The decision (ADR-0012):
.osmXML in-house,.pbfrefused — on zlib, not protobufThe obvious argument — Protocol Buffers is a heavyweight dependency — is true of the library and irrelevant, because we would not take the library: the OSM PBF schema is varints and length-delimited fields, a few hundred lines of exactly the character ADR-0011 chose to write for ASPRS LAS. On that axis
.pbfpasses ADR-0011's test.It fails because every
.osm.pbfin circulation stores its blobs aszlib_data, and zlib is deliberately absent (deps.cmake:195turns it off for libtiff — the reason Deflate sits in ADR-0010's refused column). zlib's arrival is already scoped as #484. Third instance of the same ruling, andcmake/deps.cmakedid not change at all — the first import sprint of three for which that is true.What the tests and the bench found, none of which this issue named
1. The import produced no junctions at all. OSM states a crossing by sharing a node, so every arm runs to exactly the same point — and a connecting road between two arms meeting at a point has zero length and nowhere to curve. A 7×7 lattice planned 25 junctions and built zero, every turn reporting "clothoid fit failed" — and it still looked plausible in the road count, because the authored roads were all there. Fixed by pulling junction arms back 12 m (never link arms, whose ends must stay coincident); the same lattice now builds 45 junctions and drops no turns. No unit test found this — the scale bench did, because it was the first thing to inspect the built network rather than the plan.
2.
for_each_roaddoes not yield creation order. It walks slots ascending and reuses freed ones, so the first id-recovery design — an arena diff paired with the plan positionally — produced two roads carrying each other's geometry, exactly the "welds the wrong ends together, silently" failure it existed to prevent. Fixed by deleting the assumption:edit::create_roadgained an optionalodr_id, and the joint stage builds one O(n) map. Order-independent by construction.3. Four of my own tests were vacuous, each caught by sabotage or by running the example. The most instructive asserted only that every planned
odr_idwas findable — which a permutation preserves perfectly. A pairing must be checked as a pairing. And one sabotage was itself incoherent: it patched one of three key-construction sites, leaving the code neither correct nor consistently broken, so its "pass" meant nothing.4.
losslessis about the shape, not the vertex count. Runningpython/examples/osm_import.pyshowed every road reported as compromised at 0.000 m deviation. A way traced along a constant latitude is a curve once projected, so three collinear nodes deviate ~1 mm from their own chord and a micron-scale epsilon calls clean data compromised.Scale targets (supersedes #54)
A new
scale targetsCI job runsroadmaker_scale_bench— a separate executablectestnever runs, becausectest -j 4starts ~1 800 processes on a four-core runner and a timing test inside that set measures the scheduler. It uploadsscale-metrics.json, the repository's first metrics artifact, and the job asserts every key is present before uploading: a bench that quietly did not run is otherwise indistinguishable from a green one..xodrload (4.6 MB)Node-drag latency is flat — 0.068 ms on 1 624 roads, 0.081 ms on 3 064 — which is the answer that metric exists to give.
The build number is bad, and it is reported rather than hidden. The step is super-linear: 84 segments cost 92 ms and 420 cost 19 200 — five times the roads for two hundred times the time. Filed as #502, with the suspect named and "confirm before fixing" stated. The CI job therefore runs a smaller district and the ceiling sits deliberately far above where it belongs, both facts stated in the code. Shrinking the district permanently and reporting a flattering number was the alternative, and it would have dodged the only question #54 asked.
test_osm_scale.cppruns the same code at reduced size in the ordinary suite, so the scale path is compiled and exercised on all three platforms every PR while only the numbers are Linux-gated.Follow-ups filed, labelled, milestoned and on the board
.osm.pbf(blocked on #484's zlib) #494 — read.osm.pbf(blocked on p7-f1: GeoTIFF Deflate and JPEG-in-TIFF decoding #484's zlib)bridge/tunnel/layer(the correctness half — refusing to weld across a layer discontinuity — landed here)decimate_ringonto the new public simplifier#454 stays open for its second half (stamping
<type>from the road class atcreate_road), with a comment explaining exactly what landed and why the rest was held back.Out of scope, as stated
Building-footprint extrusion, terrain (p5-s4) and imagery (p7-s2).