com.graphhopper.custom_models.bus.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphhopper-core Show documentation
Show all versions of graphhopper-core Show documentation
GraphHopper is a fast and memory efficient Java road routing engine
working seamlessly with OpenStreetMap data.
// to use this custom model you need to set the following option in the config.yml
// profiles:
// - name: bus
// custom_model_files: [bus.json]
{
"distance_influence": 90,
"priority": [
{ "if": "max_weight < 5 || max_width < 3 || max_height < 4", "multiply_by": "0" },
{ "if": "bus_access && (road_class == MOTORWAY || road_class == TRUNK || road_class == PRIMARY || road_class == SECONDARY || road_class == TERTIARY || road_class == UNCLASSIFIED || road_class == LIVING_STREET || road_class == RESIDENTIAL || road_class == SERVICE || road_class == ROAD)",
"multiply_by": "1"
},
{ "else": "", "multiply_by": "0" }
],
"speed": [
{ "if": "bus_access && car_average_speed < 10", "limit_to": "10" },
{ "else": "", "limit_to": "car_average_speed * 0.9" },
{ "if": "true", "limit_to": "100" }
]
}