← Back to ZMap
Per-road speeds
ZMap's internal database · how it is built and what it contains
🧭 Navigation feature. ZMap snaps every point of your
route to its actual road and reads its speed limit from a local database
covering all of Europe — then keeps it cached on your phone for offline
driving.
The idea
Most navigation apps need a connection to know the speed limit. ZMap
does it differently: a per-road speed-limit database is built from
OpenStreetMap data and lives on the server. When a route is computed,
each trip point is snapped to the nearest road and given its speed.
The full route — speeds included — is then cached on the phone: while
driving, no network request is needed.
90.5Msampled points
3.6M kmof roads with a known speed
5,104cells of 0.5° × 0.5°
370 MBcompressed grid (gzip)
40 msampling step along roads
5 Bper point (lon, lat, speed)
How it is built
-
Source: the OpenStreetMap Europe extract
(Geofabrik, 34.8 GB) contains 98.2 million roads
(
highway).
-
Filtering:
osmium tags-filter keeps
only the roads (8.5 GB), then only those carrying a speed
(maxspeed) are kept — about 13 million.
-
Sampling: a point is placed every 40 metres along
each road, with its speed in km/h.
-
Indexing: Europe is split into 0.5° cells
(≈ 55 km), each subdivided into 32 × 32. Every point is quantized
to ≈ 0.76 m and stored in 5 bytes, then the cell is gzip-compressed:
90.5 million points in 370 MB total.
It is fully reproducible: the build script
(build_maxspeed.py) runs end to end on a small server.
What is inside
Share of points by speed limit (most common values) :
| Limit | Share | |
| 50 km/h | 26.2% | |
| 30 km/h (30 zones) | 18.5% | |
| 90 km/h | 9.5% | |
| 80 km/h | 9.2% | |
| 70 km/h | 6.0% | |
| 60 km/h | 5.7% | |
| 100 km/h | 4.6% | |
| 40 km/h | 3.3% | |
| 48 km/h (30 mph, UK) | 2.8% | |
| 97 km/h (60 mph, UK) | 2.4% | |
| 32 km/h (20 mph, UK) | 2.1% | |
| 20 km/h (pedestrian zones) | 2.1% | |
| 120 km/h | 1.8% | |
| 130 km/h (motorways) | 1.7% | |
| 110 km/h | 1.4% | |
Numeric values found in OpenStreetMap. Actual limits may
differ (roadworks, temporary signs, weather). Roads with no limit
(e.g. some German sections) have no maxspeed: ZMap then
shows no speed.
In the app
The server returns, with every route, an array of speeds aligned with
the geometry points (one value per point). The phone stores
everything in its local cache: while driving, the current section's
limit is read without network, and offline mode keeps the whole trip.
Snapping a 4,500-point route takes about 170 ms on the server.
Accuracy and coverage
- Coverage: all of Europe, longitude −12° to 46°, latitude 27° to 72°.
- Snapping: the nearest road within 40 m of the point.
- Point location accuracy: ≈ 0.76 m.
- Data: OpenStreetMap, free (ODbL licence).