# 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, not deployed: there is no routing endpoint to call yet, on geolith.app or api.geolith.app, and no routing plan, price or key.

## 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.

## 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.

## 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.

## 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).

## 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).

## Questions

### Can I call geolith Routing today?

No. There is no routing endpoint on geolith.app or api.geolith.app, no routing plan and no routing key. The hosted API offers geocoding and vector tiles (India tile set today; planet tiles in development) only.

### When will it be offered?

There is no date. 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. Progress is tracked at https://docs.geolith.app/routing/status.

### Will my Valhalla client work?

That is the design: the request and response bodies are Valhalla’s. Two things change: the base URL, and the paths, which are kebab-case (/sources-to-targets, /trace-route, /trace-attributes).

## Sources

1. [Routing overview (in development)](https://docs.geolith.app/routing), geolith docs (read 2026-11-08)
2. [Routing: status and roadmap](https://docs.geolith.app/routing/status), geolith docs (read 2026-11-08)
3. [Valhalla turn-by-turn API reference](https://valhalla.github.io/valhalla/api/turn-by-turn/api-reference/), Valhalla (open source, MIT) (read 2026-11-08)

Routing is in development and not deployed; there is no endpoint to call yet, and no routing plan, price or key. Read the routing docs: https://docs.geolith.app/routing
