SPB Git

Repository Public BSD-3-Clause

0004-routing-engine.md 1.6 KB

# ADR 0004 — Embedded routing engine written for ORIX Maps

Date: 2026-11-25 · Status: accepted

Context. Routing must work on the phone with no server (§10). The directive asks to evaluate Valhalla, GraphHopper and OSRM and not to assume a server engine can be embedded.

Engine Licence Language On iOS
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.
GraphHopper Apache-2.0 Java JVM only; not embeddable in an iOS app.
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.

Decision. ORIXRouting is an engine written in Swift for this product: a compact memory-mapped graph file (.orixgraph) built by Infrastructure/routing-builder from the same OSM extract as the tiles, and a reference shortest-path search (Dijkstra / A*) verified by tests, with speed-ups added only where measurements require them. Valhalla remains the fallback if the engine cannot meet correctness or performance targets on country-sized graphs.

Consequences. No third-party code in the routing path; the format, the profiles and the instruction texts (English, French) are ours to evolve. Features such as time-dependent routing, truck profiles or isochrones are not available and are not announced.

Files main
Menu

Theme