use of com.graphhopper.application.GraphHopperServerConfiguration in project graphhopper by graphhopper.
the class PtIsochroneTest method createConfig.
private static GraphHopperServerConfiguration createConfig() {
GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "foot").putObject("graph.location", GRAPH_LOC).putObject("gtfs.file", "../reader-gtfs/files/sample-feed").setProfiles(Collections.singletonList(new Profile("foot").setVehicle("foot").setWeighting("fastest")));
Helper.removeDir(new File(GRAPH_LOC));
return config;
}
use of com.graphhopper.application.GraphHopperServerConfiguration in project graphhopper by graphhopper.
the class RouteResourceCustomModelTest method createConfig.
private static GraphHopperServerConfiguration createConfig() {
GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "bike,car,foot,wheelchair,roads").putObject("prepare.min_network_size", 200).putObject("datareader.file", "../core/files/north-bayreuth.osm.gz").putObject("graph.location", DIR).putObject("graph.encoded_values", "max_height,max_weight,max_width,hazmat,toll,surface,track_type").putObject("custom_model_folder", "./src/test/resources/com/graphhopper/application/resources").setProfiles(Arrays.asList(new Profile("wheelchair"), new CustomProfile("roads").setCustomModel(new CustomModel()).setVehicle("roads"), new CustomProfile("car").setCustomModel(new CustomModel()).setVehicle("car"), new CustomProfile("bike").setCustomModel(new CustomModel().setDistanceInfluence(0)).setVehicle("bike"), new Profile("bike_fastest").setWeighting("fastest").setVehicle("bike"), new CustomProfile("truck").setVehicle("car").putHint("custom_model_file", "truck.yml"), new CustomProfile("cargo_bike").setVehicle("bike").putHint("custom_model_file", "cargo_bike.yml"), new CustomProfile("json_bike").setVehicle("bike").putHint("custom_model_file", "json_bike.json"), new Profile("foot_profile").setVehicle("foot").setWeighting("fastest"), new CustomProfile("car_no_unclassified").setCustomModel(new CustomModel(new CustomModel().addToPriority(If("road_class == UNCLASSIFIED", LIMIT, 0)))).setVehicle("car"), new CustomProfile("custom_bike").setCustomModel(new CustomModel().addToSpeed(If("road_class == PRIMARY", LIMIT, 28)).addToPriority(If("max_width < 1.2", MULTIPLY, 0))).setVehicle("bike"), new CustomProfile("custom_bike2").setCustomModel(new CustomModel(new CustomModel().addToPriority(If("road_class == TERTIARY || road_class == TRACK", MULTIPLY, 0)))).setVehicle("bike"), new CustomProfile("custom_bike3").setCustomModel(new CustomModel(new CustomModel().addToSpeed(If("road_class == TERTIARY || road_class == TRACK", MULTIPLY, 10)).addToSpeed(If("true", LIMIT, 40)))).setVehicle("bike"))).setCHProfiles(Arrays.asList(new CHProfile("truck"), new CHProfile("car_no_unclassified")));
return config;
}
use of com.graphhopper.application.GraphHopperServerConfiguration in project graphhopper by graphhopper.
the class RouteResourceWithEleTest method createConfig.
private static GraphHopperServerConfiguration createConfig() {
GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
config.getGraphHopperConfiguration().putObject("graph.elevation.provider", "srtm").putObject("graph.elevation.cache_dir", "../core/files/").putObject("prepare.min_network_size", 0).putObject("graph.flag_encoders", "car").putObject("datareader.file", "../core/files/monaco.osm.gz").putObject("graph.location", dir).setProfiles(Collections.singletonList(new Profile("profile").setVehicle("car").setWeighting("fastest")));
return config;
}
use of com.graphhopper.application.GraphHopperServerConfiguration in project graphhopper by graphhopper.
the class IsochroneResourceTest method createConfig.
private static GraphHopperServerConfiguration createConfig() {
GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car|turn_costs=true").putObject("datareader.file", "../core/files/andorra.osm.pbf").putObject("graph.location", DIR).setProfiles(Arrays.asList(new Profile("fast_car").setVehicle("car").setWeighting("fastest").setTurnCosts(true), new Profile("short_car").setVehicle("car").setWeighting("shortest").setTurnCosts(true), new Profile("fast_car_no_turn_restrictions").setVehicle("car").setWeighting("fastest").setTurnCosts(false)));
return config;
}
use of com.graphhopper.application.GraphHopperServerConfiguration in project graphhopper by graphhopper.
the class PtRouteResourceTest method createConfig.
private static GraphHopperServerConfiguration createConfig() {
GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
config.getGraphHopperConfiguration().putObject("datareader.file", "../reader-gtfs/files/beatty.osm").putObject("gtfs.file", "../reader-gtfs/files/sample-feed").putObject("graph.location", DIR).setProfiles(Collections.singletonList(new Profile("foot").setVehicle("foot").setWeighting("fastest")));
return config;
}
Aggregations