Forced to take a U-Turn

208 views
Skip to first unread message

EnSun

unread,
May 24, 2014, 12:44:31 PM5/24/14
to osm...@googlegroups.com
I've attached two screenshots: GMap.jpg and Osmand.png showing route calculation by Google map (correct in this case) and the one by Osmand which seems to be odd.

Coming down south and intend to head east, at the intersection:

The Google map route takes the second exit off the highway to head east. This is correct.
The Osmand route shows taking the first exit going west and then make a U-Turn at the traffic light (which is illegal in this case) in order to head east!

Any explanation as to the logic of Osmand would be appreciated?
Osmand.png
GMap.jpg

Max Erickson

unread,
May 24, 2014, 5:29:17 PM5/24/14
to osm...@googlegroups.com
I'm not sure if the router does anything to try to account for the geometry of the intersection, but I took a look at the OSM data and added a turn restriction, so once the maps update it shouldn't try that anymore.


Max

EnSun

unread,
May 24, 2014, 5:42:08 PM5/24/14
to osm...@googlegroups.com
Thank you Max. I did try to edit the OSM map at openstreetmap.org to add the u-turn restriction at the intersection but could not see an option to do it (or how to do it!).

:-)

Max Erickson

unread,
May 24, 2014, 6:12:39 PM5/24/14
to osm...@googlegroups.com
The current version of the editor on the website doesn't have support for turn restrictions, but it should be added quite soon (it exists and is being tested).

EnSun

unread,
May 24, 2014, 7:43:39 PM5/24/14
to osm...@googlegroups.com
Thanks for your help!

sympa

unread,
Jun 16, 2014, 3:17:05 PM6/16/14
to osm...@googlegroups.com
Is a turn restriction the right solution? Even if a turn was allowed, this should not be a desirable route. and looking at the intersection, a U-turn would be allowed.

I would suggest, given the number of complaints against U-turns, to increase the penalty for U-turns. But in this case, there are separate ways - thus it is not obvious this is a U-turn.

It is probably the only possible workaround at the moment. But Osmand is not the only user of Openstreetmap data - and this turn restriction is "mapping for the router", which is probably as undesirable as "mapping for the renderer".
Message has been deleted

Aceman444

unread,
Jun 16, 2014, 6:11:14 PM6/16/14
to osm...@googlegroups.com
Yes, I would support this too. A penalty for U-turns or sharp turns (e.g. turn more than 150 degrees). Often times that is not a real turning point, it is just mapped in that way (e.g. when a oneway road closes onto a two-way road and joins it). I have to add many turn restrictions on important intersections to prevent OsmAnd doing crazy turns.

Dňa pondelok, 16. júna 2014 21:17:05 UTC+2 sympa napísal(-a):

sympa

unread,
Jun 17, 2014, 2:22:30 AM6/17/14
to osm...@googlegroups.com
In this case a turn restriction is also correct (I overlooked the remark that it is not allowed in the original post, sorry). So adding it is not polluting Openstreetmap.

I still wonder how a U-turn could be recognized. Too sharp a left turn seems the only easy way. Even if there is the occasional false trigger, it is not that bad:

- if the user is led to a U-turn he cannot make, the result can be a very long detour as he is for example on a highway leading to nowhere
- if the user avoids a U-turn he should have taken, he makes a slight detour: never more than the configured penalty.

This can be refined by not applying the U-turn penalty on unclassified roads.

I remember Google Maps from having a severe dislike of left turns in city traffic, but that might have been more a US thing than an 'avoid U-turns' thing.

Jack Burke

unread,
Jun 18, 2014, 5:16:30 PM6/18/14
to osm...@googlegroups.com
I've found JOSM to be a less user-unfriendly tool when it comes to adding turn restrictions than the website editors.  That said, it appears that osmand doesn't seem to handle no-U-turn restrictions in all cases.

Jack Burke

unread,
Jun 18, 2014, 5:18:31 PM6/18/14
to osm...@googlegroups.com
EnSun, which version of osmand are you using?  There were some bugs in 1.7.4 and earlier that produced some odd routing recommendations in some cases.  One of the devs found and fixed these in 1.7.5, so be sure you're using that version (at a minimum).
 

On Saturday, May 24, 2014 7:43:39 PM UTC-4, EnSun wrote:
Thanks for your help!

Paul Johnson

unread,
Jun 18, 2014, 8:46:40 PM6/18/14
to osm...@googlegroups.com
On Monday, June 16, 2014 2:17:05 PM UTC-5, sympa wrote:
I would suggest, given the number of complaints against U-turns, to increase the penalty for U-turns. But in this case, there are separate ways - thus it is not obvious this is a U-turn.

Would be nice if there was an option in Osmand to avoid U-turns except when otherwise impossible to navigate, thanks to places like the entire state of Oregon that ban U-turns within 500 feet of an intersection or curve except where otherwise posted (extremely rare, and even then the sign will probably say something like "U Turn permitted except trucks" or "U Turn Permitted except motor vehicles").

Then again, it would be nice if OSM had a good way to deal with this situation short of explicitly adding relations at every intersection in the state...

EnSun

unread,
Jun 18, 2014, 9:30:07 PM6/18/14
to osm...@googlegroups.com
1.7.5 which is the latest on google play. Even if the u-turn is allowed in this case, what osmand is suggesting is not the correct route. The gmap.jpg screenshot from google map is the correct route.

Jack Burke

unread,
Jun 19, 2014, 10:36:56 AM6/19/14
to osm...@googlegroups.com
Oh, I get that, and I agree.  I just wanted to be sure you were on 1.7.5 is all, because previous versions would definitely generate incorrect routes, especially involving highway and motorway exits.

Jack Burke

unread,
Jun 19, 2014, 11:01:49 AM6/19/14
to osm...@googlegroups.com
I found the junction in OSM, and I notice that other than NJ Highway 17, none of the roads that are part of the junction have a lot of attributes set on them (e.g., no Surface, no Maxspeed, etc.).  It is possible that setting those attributes might help; without them, osmand (and other routers) make default judgments based on the Highway type value, and I *know* that some of those defaults are wrong for certain roads in my area.  This isn't osmand's fault, it's just due to lack of quality data in the OSM database.
 
If you travel that way frequently, you can help by noting the speed limit signs and adding the correct maxspeed (and surface, etc) values to OSM.  :-)
 
I note in passing that the U-turn location in your picture does not appear to be tagged no-U-turn in OpenStreetMap.  That's something else you can help fix in OSM. :-)
 
An observation...  I've noticed that osmand tends to look for the shortest/fastest route to the highest priority road that will get you to the destination.  The G thing doesn't necessarily do that, because the G monster tracks the routes people take, and adjusts the priorities in its routing tables accordingly (e.g., if it recommends a particular route, but more people take a shortcut down a certain street than following the recommended route, then eventually that shortcut route ends up getting a higher priority than the original).  osmand doesn't do that--and I'm glad it doesn't.

EnSun

unread,
Jun 19, 2014, 11:39:40 AM6/19/14
to osm...@googlegroups.com
I already have tweaked the max speed for the exit ramp and Max Erickson helped to tag a U-Turn for that intersection. The new (current) calculated route is the correct one at this time. I also agree that the detail quality of OSM is a major factor for accurate routing, but even with the absence of the required OSM data (tags, etc.),and given what's provided to osmand by OSM maps what osmand was suggesting was not a realistic route: to take the first exit and make a U-Turn (legal or not) and take the road which could have taken simply by the second exit ramp off Rt. 17. The first exit (the bad one) takes you westward and then, after a U-Turn takes you east.The second exit (the correct one) takes you going eastward with no U-Turn involved. We have to live with a slue of incomplete data in OSM, and that's why osmand needs to be smarter and handle the inadequacy of OSM detail. Software should not expect the environment to be perfect all the time in order to produce good and acceptable results, we all agree I hope!

Nevertheless, I love osmand.

Larry H

unread,
Jun 21, 2014, 11:35:18 PM6/21/14
to osm...@googlegroups.com
I've just started using Osmand yesterday in preparation for a trip. Playing around with routes I'll be taking in Italy next month I saw a very similar routing behavior. Likewise, Google maps followed the expected route. As a new user, I have to say I'm extremely impressed with Osmand. Seems very capable and using it around home it's done a great job navigating me to various places. My only issue has been less than obvious voice directions when getting on and off highways.



On Saturday, May 24, 2014 12:44:31 PM UTC-4, EnSun wrote:

EnSun

unread,
Jun 22, 2014, 9:56:29 AM6/22/14
to osm...@googlegroups.com
Yes, it is similar to my caes(s). Instead of taking the loop, it wants you continue straight and then take a sharp u-turn (at which point you might already have missed the loop ramp!). If the logic of osmand is the speed limit on the loop is lower than the road you are on and the one perpendicular to it and that's the reason for this behavior then this can happen in many instances.
Reply all
Reply to author
Forward
0 new messages