public GraphHopper importOrLoad() { if (!load(ghLocation)) { printInfo(); importOSM(ghLocation, osmFile); } else { printInfo(); } return this; }
private GraphHopper importOSM(String graphHopperLocation, String osmFileStr) { if (encodingManager == null) throw new IllegalStateException("No encodingManager was specified"); setGraphHopperLocation(graphHopperLocation); try { importOSM(osmFileStr); } catch (IOException ex) { throw new RuntimeException("Cannot parse OSM file " + osmFileStr, ex); } postProcessing(); cleanUp(); optimize(); prepare(); flush(); initIndex(); return this; }