How to set routing between two countries? Load two “*-gh” folders

203 Views Asked by At

I want to get route between two neighborhood countries, I converted pbf files to grapphopper format:

./graphhopper.sh -a import -i germany.osm.pbf
./graphhopper.sh -a import -i moldova.osm.pbf

But when I try to load those countries I get next error:

GraphHopper graphHopper = new GraphHopper().forMobile();
graphHopper.load(new File(mOSMData, "germany-gh").getAbsolutePath());
graphHopper.load(new File(mOSMData, "moldova-gh").getAbsolutePath());

Caused by: java.lang.IllegalStateException: graph is already successfully loaded at com.graphhopper.GraphHopper.load(GraphHopper.java:725)

Is there any solution for that or GraphHopper can work only with one OSM data at the same time and there is no way to connect two countries or two cities if there are different folders?

0

There are 0 best solutions below