Are 'type=restriction' relations with ways as 'via' members supported?

67 views
Skip to first unread message

Davide F

unread,
Oct 27, 2020, 10:35:53 AM10/27/20
to OsmAnd
I recently added to OSM a turn restriction relation (https://www.openstreetmap.org/relation/11790375) which has two ways, instead of a single point, as 'via' members. This usage is documented on OSMWiki, so I didn't make anything up, however OsmAnd seems to ignore this relation while calculating the route. Do you know if this is supported by the app?

CP

unread,
Oct 27, 2020, 12:26:54 PM10/27/20
to osm...@googlegroups.com


Op 27-10-2020 om 15:35 schreef Davide F:
I recently added to OSM a turn restriction relation (https://www.openstreetmap.org/relation/11790375) which has two ways, instead of a single point, as 'via' members. This usage is documented on OSMWiki, so I didn't make anything up, however OsmAnd seems to ignore this relation while calculating the route. Do you know if this is supported by the app?

Caveat emptor: I'm no hero with turn restrictions.

If I look at that little piece of main road...



... and then in the OSM edit page at the bottom left, you will see that there's both a restriction "Only straight on" straight onward and a restriction "Only straight on" to the right. So I think they're cancelling each other out. Could that be the problem?

CP

Davide F

unread,
Oct 29, 2020, 6:16:30 AM10/29/20
to OsmAnd
I don't think so (but I'm not sure). That way you highlighted is a 'via' member, and it is indeed the same in both relations, but the 'from' members are different, so there should be no ambiguity. There would be no problem if the 'via' segment were collapsed to a single point.

Tom Crocker

unread,
Oct 29, 2020, 8:56:13 AM10/29/20
to OsmAnd
Do you have osmand live and is your downloaded map up to date? If not, the change won't be downloadable for a week or two.

--
You received this message because you are subscribed to the Google Groups "OsmAnd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/a320040a-2cbb-4f34-af2c-05c3d0f905d7n%40googlegroups.com.

Davide F

unread,
Oct 30, 2020, 12:48:46 PM10/30/20
to OsmAnd
I'm sure the map is up to date.

CP

unread,
Oct 30, 2020, 2:10:06 PM10/30/20
to osm...@googlegroups.com
Do you have a screenshot of the faulty routing? I don't think I understand what exactly the issue is. A screenshot would help.



Op 30-10-2020 om 17:48 schreef Davide F:

Davide F

unread,
Nov 2, 2020, 4:41:14 AM11/2/20
to OsmAnd
valtorta.jpg

This is from brouter.de, but the issue is the same with OsmAnd.
Coming from the green bubble on the lower side and driving northwards, the street splits in two, the orange "main lane" on the left and the white "side lane" on the right. Between the rail bridges, the two lanes rejoin with one another, but the signage on the road forbids whoever is in the side lane to cross over to the main lane, and vice versa, so it's as if the two lanes kept on being two separate ways, as far as normal routing should be concerned.
This is important in the case you want, for example, to drive to the red bubble at the top, since you must then take the side lane before the first bridge, and you are forbidden to do so between the bridges as the router tells you.
I tried to model this restriction as I wrote in the original post, but OsmAnd seems to ignore that, and suggests the route in the picture, which you can't follow in real life.

Tom Crocker

unread,
Nov 2, 2020, 4:55:50 AM11/2/20
to OsmAnd
And the same happens vice versa. i.e. the routers can suggest joining from the side road onto the main road. Other routers may still be updating (I don't know if there's a way to know what date they're up to). I also couldn't figure out how to (if you can) get turbo overpass to identify similar restrictions elsewhere for testing.

CP

unread,
Nov 2, 2020, 6:16:24 AM11/2/20
to osm...@googlegroups.com
I think I now understand what your issue is. Are you sure it's not a modelling issue?




To me it looks like you've explicitly allowed the right-hand turn. (but maybe I'm not understanding these restrictions correctly.)
If I were to model it, I'd pick the main lane, and put a "no_right_turn" to the side lane.
My brain is starting to short-circuit now ;-)


Op 02-11-2020 om 10:41 schreef Davide F:

Davide F

unread,
Nov 2, 2020, 11:42:14 AM11/2/20
to OsmAnd

I set up the restrictions so that who comes from the side lane encounters an only_straight_on relation which terminates on the side lane you circled in red. The relation should force them to continue "straight on" to the side lane. The same goes for who comes from the main lane, which is forced (by another relation) to continue only straight on the main lane.
In your picture, you should see (if I'm not mistaken) that the from member is in fact the side lane on the bottom part.
Reply all
Reply to author
Forward
0 new messages