use of com.graphhopper.util.CmdArgs in project graphhopper by graphhopper.
the class ChangeGraphServletIT method setUp.
@Before
public void setUp() {
CmdArgs args = new CmdArgs().put(Parameters.CH.PREPARE + "weightings", "no").put("graph.flag_encoders", "car").put("graph.location", DIR).put("datareader.file", "../core/files/andorra.osm.pbf");
setUpJetty(args);
}
use of com.graphhopper.util.CmdArgs in project graphhopper by graphhopper.
the class GraphHopperServletIT method setUp.
@Before
public void setUp() {
CmdArgs args = new CmdArgs().put("config", "../config-example.properties").put("datareader.file", "../core/files/andorra.osm.pbf").put("graph.location", DIR);
setUpJetty(args);
}
use of com.graphhopper.util.CmdArgs in project graphhopper by graphhopper.
the class NearestServletIT method setUp.
@Before
public void setUp() {
CmdArgs args = new CmdArgs().put("config", "../config-example.properties").put("datareader.file", "../core/files/andorra.osm.pbf").put("graph.location", dir);
setUpJetty(args);
}
use of com.graphhopper.util.CmdArgs in project graphhopper by graphhopper.
the class Import method main.
public static void main(String[] strs) throws Exception {
CmdArgs args = CmdArgs.read(strs);
GraphHopper hopper = new GraphHopperOSM().init(args);
hopper.importOrLoad();
hopper.close();
}
use of com.graphhopper.util.CmdArgs in project graphhopper by graphhopper.
the class GraphHopperOSMTest method testLoadOSMNoCH.
@Test
public void testLoadOSMNoCH() {
GraphHopper gh = new GraphHopperOSM().setStoreOnFlush(true).setCHEnabled(false).setEncodingManager(new EncodingManager("car")).setGraphHopperLocation(ghLoc).setDataReaderFile(testOsm);
gh.importOrLoad();
assertFalse(gh.getAlgorithmFactory(new HintsMap("fastest")) instanceof PrepareContractionHierarchies);
GHResponse rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
assertFalse(rsp.hasErrors());
assertEquals(3, rsp.getBest().getPoints().getSize());
gh.close();
gh = new GraphHopperOSM().setStoreOnFlush(true).setCHEnabled(false).setEncodingManager(new EncodingManager("car"));
assertTrue(gh.load(ghLoc));
rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
assertFalse(rsp.hasErrors());
assertEquals(3, rsp.getBest().getPoints().getSize());
gh.close();
gh = new GraphHopperOSM().setGraphHopperLocation(ghLoc).setDataReaderFile(testOsm).init(new CmdArgs().put("graph.flag_encoders", "car").put(Parameters.CH.PREPARE + "weightings", "no"));
assertFalse(gh.getAlgorithmFactory(new HintsMap("fastest")) instanceof PrepareContractionHierarchies);
gh.close();
}
Aggregations