Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

Thinking

What is an .osm.pbf file and how do you use one?

An .osm.pbf file is a compact OpenStreetMap extract. Route by Zaweba can turn any of them into an offline map region for routing, search and directions.

What is an .osm.pbf file and how do you use one?

An .osm.pbf file is an OpenStreetMap extract: the map data for an area, such as a county or a country, saved in a compact binary format. On its own it is not something you can look at. Route by Zaweba can turn one into a working offline map, using Map > Choose a region and then Use a map file I already have, and from then on you can plan routes, search addresses and get directions in that area without a connection.

OpenStreetMap is a free map of the world built by volunteers. Its full data is enormous, so sites such as Geofabrik cut it into regions and publish each as an .osm.pbf file. The name tells you what is inside: osm for OpenStreetMap, and pbf for the packed format that keeps the files small enough to download.

What is inside the file

An extract holds the raw material of a map: roads and paths with their types and restrictions, buildings, addresses where they have been mapped, named places, coastlines and much more. What it does not hold is anything ready to use. There is no routing graph to plan with, no search index for addresses and no drawn map. Those all have to be built from it, and that building is what Route calls preparation.

How Route uses one

When you choose a region from Route's own list, which is Geofabrik's list shown as a tree of continents, countries and counties, Route downloads the .osm.pbf for you and prepares it. Use a map file I already have does the same thing with a file you supply.

Either way the same preparation pipeline runs. It builds the address index, adds postcode and coastline data when needed, builds the routing graph and then draws the map tiles. A window shows the steps, a progress bar and the engine's latest line, and each finished step is recorded, so a stop or a power cut carries on from the first unfinished step. When it is done, the region is ready and works offline.

When you would use a file you already have

Most people never need to. Choosing from the list is simpler. A file of your own makes sense if you have already downloaded an extract, perhaps for another mapping program, or you keep extracts on a shared drive for several PCs, or you are on a slow connection and someone has handed you the file. Preparing from that file saves downloading the same data twice.

There is also a command line for the job. ZawebaRoute.exe --prepare followed by an .osm.pbf file prepares it without opening a window, and can write a log, which is handy for a big region you would rather build in the background.

Things to know before you start

Size matters. A county extract is a few megabytes, and prepares in seconds to minutes. Great Britain is about 2 GB to download and needs roughly 8 GB of free memory to prepare, so close other heavy programs before you begin. Coastal regions also download OpenStreetMap water outlines once, about 0.9 GB.

UK postcodes in Route come from OS Code-Point Open rather than from the extract, and cover Great Britain only. Northern Ireland postcodes are not open data, so they cannot be searched, although addresses and places there still can be.

The data is only as good as the volunteers have made it, which in Britain is very good indeed. If a new estate is missing, it may simply not have been mapped yet in the extract you used. A newer download of the same region will include whatever has been added since.

Credit where it is due

OpenStreetMap data comes with a request to credit it, and Route always does: the OpenStreetMap and OpenMapTiles credit is shown on the map, and OpenStreetMap and postcode credits appear on every page of a PDF route sheet. Nothing for you to remember.

So an .osm.pbf file is the raw map, and Route by Zaweba is one way to make it useful: a full route planner for the area it covers, on your own PC.