Skip to content

Routing · Matrix · In development

Matrix: times and distances from every source to every target

/sources-to-targets returns the travel time and distance from each source to each target in Valhalla’s body. It is the input a dispatch or route-planning tool needs. On Berlin the responses were byte-identical to Valhalla 3.9.1 on 60/60 matrices.

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.

Berlin · same data, same requests

Against the reference engine

Measured on geolith/routing main. Only sets that were run are shown; no speed or cost is measured.

Matrix · /sources-to-targets · Berlin, byte-identical to Valhalla 3.9.1
SetRequests Byte-identical
Matrices60

Detail

Request

sources and targets are lists of points; costing is auto, pedestrian or bicycle. The path is kebab-case: Valhalla’s /sources_to_targets is /sources-to-targets here.

Request shape (no hosted endpoint)
curl -X POST "https://ROUTER_HOST/sources-to-targets" \
  -H "Content-Type: application/json" \
  -d '{
    "sources": [{ "lat": 52.5163, "lon": 13.3777 }],
    "targets": [
      { "lat": 52.5079, "lon": 13.3376 },
      { "lat": 52.5200, "lon": 13.4050 }
    ],
    "costing": "auto"
  }'

Detail

Response

Valhalla’s sources_to_targets: one row per source, one cell per target, each with time, distance, from_index and to_index.

Detail

What it is not

The matrix gives the costs; it does not choose a visiting order. A route optimizer (your own, or an open-source solver) takes the matrix and returns the order.

Routing · In development

More on routing

Sources

  1. Routing API (planned), geolith docs (read 2026-11-08)
  2. 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.