Search in sources :

Example 11 with GraphHopperServerTestConfiguration

use of com.graphhopper.application.util.GraphHopperServerTestConfiguration in project graphhopper by graphhopper.

the class SPTResourceTest method createConfig.

private static GraphHopperServerConfiguration createConfig() {
    GraphHopperServerTestConfiguration config = new GraphHopperServerTestConfiguration();
    config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car|turn_costs=true").putObject("graph.encoded_values", "max_speed,road_class").putObject("datareader.file", "../core/files/andorra.osm.pbf").putObject("graph.location", DIR).setProfiles(Arrays.asList(new Profile("car_without_turncosts").setVehicle("car").setWeighting("fastest"), new Profile("car_with_turncosts").setVehicle("car").setWeighting("fastest").setTurnCosts(true)));
    return config;
}
Also used : GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) Profile(com.graphhopper.config.Profile)

Example 12 with GraphHopperServerTestConfiguration

use of com.graphhopper.application.util.GraphHopperServerTestConfiguration 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;
}
Also used : GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) Profile(com.graphhopper.config.Profile)

Example 13 with GraphHopperServerTestConfiguration

use of com.graphhopper.application.util.GraphHopperServerTestConfiguration 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;
}
Also used : GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) Profile(com.graphhopper.config.Profile)

Example 14 with GraphHopperServerTestConfiguration

use of com.graphhopper.application.util.GraphHopperServerTestConfiguration 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;
}
Also used : GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) Profile(com.graphhopper.config.Profile)

Example 15 with GraphHopperServerTestConfiguration

use of com.graphhopper.application.util.GraphHopperServerTestConfiguration in project graphhopper by graphhopper.

the class RouteResourceCustomModelLMTest method createConfig.

private static GraphHopperServerConfiguration createConfig() {
    GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
    config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car,foot").putObject("datareader.file", "../core/files/andorra.osm.pbf").putObject("graph.location", DIR).putObject("graph.encoded_values", "surface").setProfiles(Arrays.asList(// give strange profile names to ensure that we do not mix vehicle and profile:
    new CustomProfile("car_custom").setCustomModel(new CustomModel()).setVehicle("car"), new Profile("foot_profile").setVehicle("foot").setWeighting("fastest"), new CustomProfile("foot_custom").setCustomModel(new CustomModel()).setVehicle("foot"))).setLMProfiles(Arrays.asList(new LMProfile("car_custom"), new LMProfile("foot_custom")));
    return config;
}
Also used : GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) CustomProfile(com.graphhopper.routing.weighting.custom.CustomProfile) LMProfile(com.graphhopper.config.LMProfile) CustomModel(com.graphhopper.util.CustomModel) CustomProfile(com.graphhopper.routing.weighting.custom.CustomProfile) Profile(com.graphhopper.config.Profile) LMProfile(com.graphhopper.config.LMProfile)

Aggregations

GraphHopperServerTestConfiguration (com.graphhopper.application.util.GraphHopperServerTestConfiguration)19 Profile (com.graphhopper.config.Profile)19 GraphHopperServerConfiguration (com.graphhopper.application.GraphHopperServerConfiguration)17 CHProfile (com.graphhopper.config.CHProfile)8 LMProfile (com.graphhopper.config.LMProfile)6 CustomProfile (com.graphhopper.routing.weighting.custom.CustomProfile)2 CustomModel (com.graphhopper.util.CustomModel)2 File (java.io.File)1