Hi everyone, I am a little stuck figuring out a specific u-turn. I am hosting the latest Graphhopper version with a very recent planet osm file and got a user who noticed a unlawfull u-turn.
Which I agree with. First i asumed the relation was wrong in OSM data, and even edited a small section in JOSM to see it that is the case. However, using GraphHopper Maps | Route Planner on the same stretch, it does correctly finds an alternative.
Which is good! However, I am clearly missing some important configuration preventing non existing u-turn places.
Custom model
{
"distance_influence": 90,
"priority": [
{ "if": "!car_access", "multiply_by": "0" },
{ "if": "road_access == DESTINATION || road_access == PRIVATE", "multiply_by": "0.1" }
],
"speed": [
{ "if": "true", "limit_to": "car_average_speed" }
]
}
Profile defined in config
- name: car
turn_costs:
vehicle_types: [ "motor_vehicle", "motorcar" ]
u_turn_costs: 1
left_turn_costs: 1
right_turn_costs: 1
sharp_left_turn_costs: 2
sharp_right_turn_costs: 2
custom_model_files: [car.json]
...
profiles_lm: [bike, foot, car]
How i then post the route request
{"profile":"car","calc_points":true,"instructions":true,"points_encoded":false,"points":[[6.1407673358917,51.998575521226],[6.1372321844101,51.998066891662],[6.1375594139099,51.998846347597]],"snap_preventions":[],"ch.disable":true,"custom_model":{"priority":[],"u_turn_costs":50000000}}
I think i posted all the relevant information. I am using a few extra custom parsers and use more priority statements to prefer certain roads when calculating routes. However, that should and must not influence finding valid routes.
I would love to know what im doing wrong!


