1

Hi Can any one please provide me some way to read more than one OSM file at a time ?

Actually I tried with this to read an osm file using Graph Hopper application API.

GraphHopperAPI instance = new GraphHopper().setInMemory(true, true)
                .setEncodingManager(em).setGraphHopperLocation(location)
                .setOSMFile("output.osm").disableCHShortcuts();
        GraphHopper hopper = (GraphHopper) instance;
        hopper.importOrLoad();

Is there a way on it to load more than one OSM files which will be helpful for me.

Thanks in advance

  • Please see the answers on the mailing list https://lists.openstreetmap.org/pipermail/graphhopper/2013-December/000596.html – Karussell Dec 12 '13 at 21:59

1 Answers1

2

At the moment you'll have to handle this before import. E.g. via osmosis as pointed out from Rodolphe.

Karussell
  • 17,085
  • 16
  • 97
  • 197
  • Can you do that in real time (e.g. in Android) or do you have to prepare/merge all map files and download it (for using it offline)? – Blehi Dec 10 '14 at 16:54
  • I have not tried it, and we exclude the import dependencies for Android, but as it is all in Java the import should be possible. Keep in mind that everything is limited by the CPU and memory restrictions of the phone. – Karussell Dec 10 '14 at 17:09
  • But the better solution would be a merge of the already prepared and separate areas. You can create an issue on github to keep track of this and share ideas etc – Karussell Dec 10 '14 at 17:10