SPB Git

Repository Public BSD-3-Clause

0004-routing-engine.md 1.6 KB 22 lines markdown

1# ADR 0004 — Embedded routing engine written for ORIX Maps23Date: 2026-11-25 · Status: accepted45**Context.** Routing must work on the phone with no server (§10). The directive asks to evaluate Valhalla, GraphHopper6and OSRM and not to assume a server engine can be embedded.78| Engine | Licence | Language | On iOS |9|---|---|---|---|10| OSRM | BSD-2 | C++, Boost, TBB, Lua | Server design; contraction preprocessing needs tens of GB of RAM for large extracts; data files are large and tied to the binary version. No maintained iOS build. |11| GraphHopper | Apache-2.0 | Java | JVM only; not embeddable in an iOS app. |12| Valhalla | MIT | C++, Boost, protobuf, many dependencies | Runs on mobile (tiled graph, community wrappers exist), but adds a large C++ toolchain and dependency tree to audit, its own tile format and build pipeline, and tens of MB to the binary. A realistic option, at a high integration and maintenance cost. |1314**Decision.** `ORIXRouting` is an engine written in Swift for this product: a compact memory-mapped graph file15(`.orixgraph`) built by `Infrastructure/routing-builder` from the same OSM extract as the tiles, and a reference16shortest-path search (Dijkstra / A*) verified by tests, with speed-ups added only where measurements require them.17Valhalla remains the fallback if the engine cannot meet correctness or performance targets on country-sized graphs.1819**Consequences.** No third-party code in the routing path; the format, the profiles and the instruction texts (English,20French) are ours to evolve. Features such as time-dependent routing, truck profiles or isochrones are not available and21are not announced.22
Files main
Menu

Theme