Search in sources :

Example 16 with GraphHopperServerTestConfiguration

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

the class RouteResourceIssue1574Test method createConfig.

private static GraphHopperServerConfiguration createConfig() {
    GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
    // this is the reason we put this test into an extra file: we can only reproduce the bug of issue 1574 by increasing the one-way-network size
    config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car").putObject("prepare.min_network_size", 0).putObject("datareader.file", "../core/files/andorra.osm.pbf").putObject("graph.location", DIR).setProfiles(Collections.singletonList(new Profile("car_profile").setVehicle("car").setWeighting("fastest"))).setCHProfiles(Collections.singletonList(new CHProfile("car_profile")));
    return config;
}
Also used : CHProfile(com.graphhopper.config.CHProfile) GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) CHProfile(com.graphhopper.config.CHProfile) Profile(com.graphhopper.config.Profile)

Example 17 with GraphHopperServerTestConfiguration

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

the class RouteResourceTurnCostsLegacyTest method createConfig.

private static GraphHopperServerConfiguration createConfig() {
    GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
    config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car|turn_costs=true").putObject("prepare.min_network_size", 0).putObject("datareader.file", "../core/files/moscow.osm.gz").putObject("graph.encoded_values", "road_class,surface,road_environment,max_speed").putObject("graph.location", DIR).setProfiles(Arrays.asList(new Profile("my_car_turn_costs").setVehicle("car").setWeighting("fastest").setTurnCosts(true), new Profile("my_car_no_turn_costs").setVehicle("car").setWeighting("fastest").setTurnCosts(false))).setCHProfiles(Arrays.asList(new CHProfile("my_car_turn_costs"), new CHProfile("my_car_no_turn_costs"))).setLMProfiles(Arrays.asList(new LMProfile("my_car_no_turn_costs"), // no need for a second LM preparation: we can just cross query here
    new LMProfile("my_car_turn_costs").setPreparationProfile("my_car_no_turn_costs")));
    return config;
}
Also used : CHProfile(com.graphhopper.config.CHProfile) GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) LMProfile(com.graphhopper.config.LMProfile) CHProfile(com.graphhopper.config.CHProfile) Profile(com.graphhopper.config.Profile) LMProfile(com.graphhopper.config.LMProfile)

Example 18 with GraphHopperServerTestConfiguration

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

the class GraphHopperLandmarksTest method createConfig.

private static GraphHopperServerConfiguration createConfig() {
    GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
    config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car").putObject("datareader.file", "../core/files/belarus-east.osm.gz").putObject("prepare.min_network_size", 0).putObject("graph.location", DIR).putObject("prepare.lm.min_network_size", 2).setProfiles(Collections.singletonList(new Profile("car_profile").setVehicle("car").setWeighting("fastest"))).setCHProfiles(Collections.singletonList(new CHProfile("car_profile"))).setLMProfiles(Collections.singletonList(new LMProfile("car_profile")));
    return config;
}
Also used : CHProfile(com.graphhopper.config.CHProfile) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) LMProfile(com.graphhopper.config.LMProfile) CHProfile(com.graphhopper.config.CHProfile) Profile(com.graphhopper.config.Profile) LMProfile(com.graphhopper.config.LMProfile)

Example 19 with GraphHopperServerTestConfiguration

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

the class MvtResourceTest method createConfig.

private static GraphHopperServerConfiguration createConfig() {
    GraphHopperServerConfiguration config = new GraphHopperServerTestConfiguration();
    config.getGraphHopperConfiguration().putObject("graph.flag_encoders", "car").putObject("graph.encoded_values", "road_class,road_environment,max_speed,surface").putObject("prepare.min_network_size", 0).putObject("datareader.file", "../core/files/andorra.osm.pbf").putObject("graph.location", DIR).setProfiles(Collections.singletonList(new Profile("car").setVehicle("car").setWeighting("fastest")));
    return config;
}
Also used : GraphHopperServerConfiguration(com.graphhopper.application.GraphHopperServerConfiguration) GraphHopperServerTestConfiguration(com.graphhopper.application.util.GraphHopperServerTestConfiguration) Profile(com.graphhopper.config.Profile)

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