Support of the Key:turn?

When a route starts / ends at a point near the middle of a two-way road represented with a single OSM way the router should choose a legal direction to start / approach the point. My guess the Key:turn should be taken into account. Does openrouteservice look at this key to choose the legal direction? Does openrouteservice do it some other way?

1 Like

Hi @Serg9,
sorry but this is not very comprehensible. Could you please add a request that isn’t working as expected and elaborate a bit more on the issue? A screenshot of the problem would also be nice.

Best regards

The Mapillary link shows the real road.
Note double white line separating opposing traffic flows. It is illegal to cross a continuous solid white line, so a vehicle starting any route at this point MUST go forward along the camera view.
The road is modeledin OSM with a single way, 2 forward lanes and 2 backward lanes.
Openrouteservice builds a route suggesting a vehicle starts in the direction opposite to the above the camera view, so it first crosses the continuous solid white line which is illegal.
Is there any OSM key to add to the road in question which Openrouteservice will treat as legal restriction to start the route this way? Something like Key:turn( I thing it is not suitable here because it is designed for driving advices when approaching a cross road or junction).

1 Like

Hi, I have the same problem, did you find a workaround for it?

Not yet unfortunately. OSM community is mostly opposed to creating a legal restriction tag of the kind because it is not universal and many exceptions from a legal restriction can exist. See this topic for example [Tagging] Divided highways, and not so divided highways, one way or two

1 Like

Hi @Serg9,

sorry for not reacting on this.
I found a the change key Key:change - OpenStreetMap Wiki which describes the lane change permissions.
As far as i understand it, this would be for single or double (1 forward, 1 backward) lanes.
Not sure if this would fit the multiple forward and backward lanes in one geometry case.

I also don’t think this is currently supported in openrouteservice.
In your example route the starting point is already snapping to the single geometry lane, where it can still start in both directions (regardless of the side of the road the starting point is placed.
The tag change would probably only change the crossing of the lane on actual way intersections e.g. this route.
To circumvent that issue the geometry of the forward and backward lanes could be split into both being oneways. But that would also be more a hack than an actual representation.

Its really difficult with such edge cases and i’m not sure we can support this.
But if you choose to add the change key and think ors should support it, feel free to open an issue in the backend repo

Best regards