Route runs along an imported street or duct graph #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/street-routing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this changes
Issue #7: auto-design measured every run as straight-line distance ×
routeFactor. It now routesalong an imported street or duct network, and draws it there.
The router (
engine/street.js)joinToleranceM(1.5 m) are merged.matters — a side street drawn from the main road has no shared vertex with it, so merging only
coincident vertices leaves two disconnected components and every property on the side street comes
back unreachable. That bug was found by the API test and is now pinned by its own case.
spurM— the droplength. A property is not on the centreline and the design says so.
the edges that serve one. Walking 40 pairwise routes and adding them up counts the shared trunk 40
times; the union counts it once. It is not the optimal Steiner tree, and that is stated in the docs.
the geometry kept as the span's
routeand the length as one number.Refactor
Every builder is now a tree over a routing provider (straight-line or street), so both paths share
the tree shape, the cable taper, the budget and the ranking.
runs[]gainedmethodandroute;routeMethodreports the network it routed on.Refusals, not guesses
An address more than
maxSnapM(default 250 m) from the network, or disconnected from the head-end,makes that candidate infeasible naming the address ids —
"2 address(es) are not on the street network or not reachable along it: d7, d19"— instead of being joined by a straight line. A head-end off thenetwork is refused the same way.
How it was verified
Route lengths are asserted against hand arithmetic on a T-shaped network: 69.59 m along the main road
total ≈ 203 m where walking the three routes separately would be ~350 m.
The UI was driven end to end: KML imported through the file input (
3 edges, 0.361 km), design run(
street-graph (3 edges, 0.361 km)), winner applied (18 nodes / 17 spans), and the canvas drawing thedetour as a polyline — 507 m straight-line against 577 m routed on the earlier 10-house case, which is
almost exactly the trip to the junction.
What it deliberately does not do
No map download (the graph is what you import — the server makes no outbound requests), no geocoding,
and no turn-by-turn directions.
runs[].routeis geometry, not navigation.Closes #7