Networks & routing

Street networks as graphs: shortest paths, travel time, isochrones and snapping.

A point snapped to the wrong carriageway, and the detour that follows from a 38-metre error. the snap is where the error enters a routenorthboundsouthbound38 mthe route that follows: 640 m, to move 38A street network is a graph, and every point that is not already a node has to be attached to one

A street network is a graph: nodes where streets meet, edges between them, and a cost on every edge. Once your data is in that shape, shortest path, travel time, isochrones and service areas are all the same algorithm with different stopping rules.

Getting into that shape is where the errors are. Every point that is not already a node has to be attached to one, and a snap of a few tens of metres onto the wrong side of a dual carriageway or the wrong end of a one-way street turns into hundreds of metres of route. The graph does not know it happened, and neither does the result — which is why so much of this topic is about the join between your points and the network rather than about routing itself.

The concepts cover graphs, impedance and what an isochrone really represents; the how-to guides build, snap and route; and the fixes are the distances that come back absurd and the reasons they do.

Learning paths run through this topic too — see the end of this page.

🧭 Start with the concepts

The ideas the how-to guides below assume you already have.

Show every concept in this topic

⚙️ Then do the task

Step-by-step walkthroughs with code you can copy and adapt.

Show every how-to guide in this topic

🔧 When it breaks

The errors this topic produces, with the cause explained rather than just the command.

Show every fix in this topic

Related topics

Subjects that keep coming up alongside this one, most overlap first.

Keep browsing

Networks & routing sits in Geometry & space. Every topic on the site is listed on the topics index.