diff --git a/core/src/main/resources/com/graphhopper/custom_models/foot.json b/core/src/main/resources/com/graphhopper/custom_models/foot.json index de22e38f87..32f0d7e7cc 100644 --- a/core/src/main/resources/com/graphhopper/custom_models/foot.json +++ b/core/src/main/resources/com/graphhopper/custom_models/foot.json @@ -1,6 +1,6 @@ // to use this custom model you need to set the following option in the config.yml // graph.elevation.provider: srtm # enables elevation -// graph.encoded_values: foot_access, hike_rating, foot_priority, foot_average_speed, average_slope +// graph.encoded_values: foot_access, hike_rating, mtb_rating, foot_priority, foot_average_speed, average_slope // profiles: // - name: foot // custom_model_files: [foot.json, foot_elevation.json] @@ -8,6 +8,7 @@ { "priority": [ { "if": "!foot_access || hike_rating >= 2", "multiply_by": "0" }, + { "if": "mtb_rating > 2", "multiply_by": "0" }, { "else": "", "multiply_by": "foot_priority"} ], "speed": [ diff --git a/docs/core/custom-models.md b/docs/core/custom-models.md index 52735921af..52e92c68ab 100644 --- a/docs/core/custom-models.md +++ b/docs/core/custom-models.md @@ -98,7 +98,9 @@ There are also some that take on a numeric value, like: - average_slope: a number for 100 * "elevation change" / edge_distance for a road segment; it changes the sign in reverse direction; see max_slope - curvature: "beeline distance" / edge_distance (0..1) e.g. a curvy road is smaller than 1 -- hike_rating, horse_rating, mtb_rating: a number from 0 to 6 for the `sac_scale` in OSM, e.g. 0 means "missing", 1 means "hiking", 2 means "mountain_hiking" and so on +- hike_rating: a number from 0 to 6 for the `sac_scale` in OSM, e.g. 0 means "missing", 1 means "hiking", 2 means "mountain_hiking", 3 means demanding_mountain_hiking, 4 means alpine_hiking, 5 means demanding_alpine_hiking, and 5 means difficult_alpine_hiking +- mtb_rating: a number from 0 to 7 for the `mtb:scale` in OSM, e.g. 0 means "missing", 1 means `mtb:scale=0`, 2 means `mtb:scale=1` and so on. A leading "+" or "-" character is ignored. +- horse_rating: a number from 0 to 6 for the `horse_scale` in OSM, e.g. 0 means "missing", 1 means "common", 2 means "demanding", 3 means difficult, 4 means critical, 5 means dangerous, and 6 means impossible - lanes: number of lanes - max_slope: a signed decimal for the maximum slope (100 * "elevation change / distance_i") of an edge with `sum(distance_i)=edge_distance`. Important for longer road segments where ups (or downs) can be much bigger than the average_slope. - max_speed: the speed limit from a sign (km/h)