Skip to content

Routing · In development

Routing from one file, with a Valhalla-compatible API

geolith Routing is a routing engine with Valhalla-compatible endpoints: /route, /sources-to-targets, /isochrone, /trace-route, /trace-attributes, for auto, pedestrian and bicycle. It answers from the routing part of a .glx file that geolith's builder writes, read in ranges, so it needs no database. On Berlin its JSON responses are byte-identical to the reference engine (Valhalla 3.9.1) on every measured request.

Status · In development

In development, not deployed: there is no routing endpoint to call yet, on geolith.app or api.geolith.app, and no routing plan, price or key.

Definition

What is geolith Routing?

geolith Routing is a routing engine in development. The geolith builder turns OpenStreetMap into a road graph and writes it as the routing part of a .glx file; the router reads only the parts of that file a request touches and answers in Valhalla’s request and response shapes, on kebab-case paths. It is not deployed: there is no hosted endpoint, plan or key for it.

Detail

Status

Where routing stands on geolith/routing main. Nothing below is deployed.

Done: the builder. geolith --output-format routing writes the routing part of a .glx file from OpenStreetMap, with historical speeds from --routing-predicted-speeds.
Done: the router answers /route, /sources-to-targets, /isochrone, /trace-route, /trace-attributes for auto, pedestrian and bicycle, byte-identical to the reference on Berlin.
Done: traffic. Historical (predicted) speeds from the file, and live speeds and closures supplied by the program that runs the router.
In progress: a test Cloudflare Worker runs the router on a geolith-built Berlin file. It is not public and not ready to offer.
In progress: spoken (verbal_*) instructions.
Not started: a public deploy, a hosted API, plans and prices. Nothing is offered until a deployed server answers real requests from files geolith builds and passes the 100-route gate: route length within 2% and duration within 5% on at least 95 of 100 routes, and no route the reference finds that geolith does not.

Detail

Endpoints

Valhalla’s request and response bodies, on kebab-case paths (Valhalla’s /sources_to_targets is /sources-to-targets here).

/route: A route between two or more points.
/sources-to-targets: A matrix of times and distances between sources and targets.
/isochrone: The area reachable within a time or a distance.
/trace-route: Map matching: a GPS trace snapped to roads, as a route.
/trace-attributes: Map matching: the road attributes along a GPS trace.

Detail

How it works

One file, no database. The router keeps the tile index in memory and fetches only the blocks a request touches.

The geolith builder turns OpenStreetMap into routing graph tiles and writes them as the routing part of a .glx file.
Each graph tile is cut into 64 KiB blocks, each its own zstd frame, so a router reads only the blocks a search touches.
The router is pure Rust with no I/O of its own: built to WebAssembly for a Cloudflare Worker reading from R2, or run next to a local file.
The router and tile format are ported from Valhalla 3.9.1 (MIT).

Detail

How it fits with search and tiles

The same builder writes all three. A .glx file holds parts: a search part for geolith Search and a routing part for routing. Vector tiles ship as .pmtiles. Search and tiles (India tile set today; planet tiles in development) are live at api.geolith.app today; routing is not.

geolith Search answers from the search part of a .glx file (live).
Vector tiles are served from a .pmtiles file (live; India tile set today; planet tiles in development).
geolith Routing answers from the routing part of a .glx file (in development, not deployed).

Routing · In development · not deployed

Request shapes

Valhalla request bodies. ROUTER_HOST stands for a router you run; there is no hosted endpoint.

curl -X POST "https://ROUTER_HOST/route" \
  -H "Content-Type: application/json" \
  -d '{
    "locations": [
      { "lat": 52.5163, "lon": 13.3777 },
      { "lat": 52.5079, "lon": 13.3376 }
    ],
    "costing": "auto",
    "units": "kilometers"
  }'

Routing · In development

Endpoints, traffic, self-hosting and accuracy

Solutions · In development

What routing is for

Questions

Routing: questions

Sources

  1. Routing overview (in development), geolith docs (read 2026-11-08)
  2. Routing: status and roadmap, geolith docs (read 2026-11-08)
  3. Valhalla turn-by-turn API reference, Valhalla (open source, MIT) (read 2026-11-08)

Routing · In development

Follow routing progress.

Read how the router works today and what has to pass before it is deployed.