Search code examples
openstreetmaposrm

Launch OSRM server on large area


in the tutorial it is shown how to start an OSRM server with this example :

wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf

osrm-extract berlin-latest.osm.pbf -p profiles/car.lua
osrm-contract berlin-latest.osrm
osrm-routed berlin-latest.osrm

I would like to start a server not only on Berlin dataset, but on a full country dataset. For instance all German country roads. Maybe there is something to do with the contract, but i don't really know what king of .osrm i should put as argument to tell it to use a larger dataset that would be the combination of several dataset.

I think the answer should be really obvious when we know it, but it still feel a bit wooly.

Thank you.


Solution

  • According to an OSRM issue it is not possible to merge .osrm files. However you can merge multiple PBF files before generating your .osrm files.

    Merging of OSM XML or PBF files can be done with osmium:

    osmium merge file1.osm.pbf file2.osm.pbf -o merged.osm.pbf.

    Or with osmosis:

    osmosis --rb file1.osm.pbf --rb file2.osm.pbf --m --wb merged.osm.pbf