I have set up a local server of GraphHopper for Navigation/Routing on a virtual machine running Ubuntu 15.10 as the Guest OS.
To initialise the server, one needs to specify the following command (in a terminal): java -jar graphhopper-web-0.5.0-with-dep.jar jetty.resourcebase=webapp config=config-example.properties osmreader.osm={osmFileName}.osm.pbf
, which I will refer to as the GHServerCommand from here on.
My Question: Can I load multiple OSM files to this server?
I have attempted this in two ways both of which were unsucessful:
Attempt 1:
Server started on port 8989
Attempt 2:
java -jar graphhopper-web-0.5.0-with-dep.jar jetty.resourcebase=webapp config=config-example.properties osmreader.osm={osmFileName1}.osm.pbf,{osmFileName2}.osm.pbf
Seeing that both attempts were unsucessful, I am unsure whether this will work at all. Is there a way to load multiple osm.pbf files to a self-hosted GraphHopper server?
GraphHopper currently only supports to import one PBF, although there is no problem to support multiple if they don't overlap. If they would overlap or be adjacency to each other then it will be more complex to implement that.
But you can easily merge two PBFs in both cases:
osmconvert some.osm.pbf --out-o5m | osmconvert - other.osm.pbf -o=merged.pbf
See about the documentation and installation of osmconvert here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With