Invalid route due to a turn restriction?

Hi!

I’m trying to build a route using Directions API, but it seems there is a bug in the routing algorithm. Here is the route.

As you can see, there is a main highway, but for some reason it’s ignored and instead the secondary road is used for the route. I’ve checked OpenStreetMap data for any kind of restrictions, but there are none.

I’m wondering, maybe the turn restriction’s attributes are wrong. It looks correct for me. Both the main highway and the secondary road are available for turn at this point. Why does GraphHopper ignore the main highway in this case?

Can you send a link with the incorrect route?

Update: Ups. I just saw that you already provided the link - thanks!

The problem are the lift gates in this area: https://www.openstreetmap.org/#map=18/59.99964/29.70199 e.g. here: https://www.openstreetmap.org/node/508239451 and here: https://www.openstreetmap.org/node/1393879358

But are not these lift gates allowed for all to pass? I know for sure that it is possible to pass them at this place. I’m trying to edit the lift gates in OSM editor, but it still doesn’t compute the route correctly.

Per default we block certain barriers due to this discussion: https://forum.openstreetmap.org/viewtopic.php?id=58238

So currently it is required to tag them and allow (motor vehicle) access.

I’ve marked these lift gates permissions for motor vehicles as yes and destination. But it still doesn’t compute a correct route. Should I just wait for cache updates or something?

Just to clarify what I’m trying to achieve.

Here is a correct route in Google Maps.

And here is the same route in Graphhopper.

There is indeed a restricted area. But it’s possible to pass. I’m willing to understand what I need to edit in OSM in order to:

  1. keep the information about the lift gates correct;
  2. correctly build this route with Graphhopper if possible.

Yes, this usually takes 1-2 days. Currently, due to a migration issue in our pipeline, it will take much longer though.

How to determine was it updated or not? It doesn’t seem to work, though I’ve fixed the lift gates as you told me.

Hi! Just FYI it has been updated. One question: does it allow destination access for motor vehicles? For some reason it ignores the minor road and uses the main one, though the minor is the correct one on that route. Any ideas why?

One question: does it allow destination access for motor vehicles?

Yes, we should support this

For some reason it ignores the minor road and uses the main one, though the minor is the correct one on that route. Any ideas why?

You can append debug=true&details=average_speed&instructions=false to the URL on GraphHopper Maps to see which speeds are used and look for suspicious values.