Osmand doesn't show fastest nor the shortest route.

452 views
Skip to first unread message

Tomas Hektor

unread,
Dec 28, 2013, 2:52:35 PM12/28/13
to osm...@googlegroups.com
Can someone explain how the routing works? 'cause I think its faulty sometimes. I actually captured it's behaviour earlier today.

Prerequisites:
Osmand version: 1.6.5 beta
Starting point: Lat 58.54476, Lon 15.68946
End point: Lat 58.581, Lon 15.814 (not sure if app rounded off too many digits)
Map: sweden europe 11/12/2013

Look at the two screenshots. If I show the route between start and end, I get a longer road. 13 km and 17 minutes. The "non-optimal routing for longer roads" is unchecked. If I add a waypoint on the road that I know is shortest and fastest, osmand choose that road. This time it's only 10.5 km and 9 minutes. There aren't that many alternatives to choose from so osmand should be able to know the fastest route.

How come that the routing algorithm chose the longer and slower route? Can anyone explain? Is it a bug?


Screenshot_2013-12-28-19-59-42.png
Screenshot_2013-12-28-20-00-05.png

Harry van der Wolf

unread,
Dec 28, 2013, 3:47:54 PM12/28/13
to osmand
No, it's probably not a bug. It's probably an OSM map "feature".

The northern direct road (Vångavägen) has a speed limit of 70 km/h which is normal for Sweden tertiary roads.
The southern longer road doesn't have a speed limit for which Osmand takes 90 km/h or so (for calculation of time it uses 45 km/h by the way).

But it is still weird if you look at the OSM tags for max speed (http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed). Another reason could be a larger number of traffic lights, crossings and the like on the Vångavägen. Every traffic light or crossing has a speed penalty which could mean that a shorter road (10.5 km) versus a longer road (13.1 km) might get priority.

Harry





2013/12/28 Tomas Hektor <tomas....@gmail.com>

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Tomas Hektor

unread,
Dec 28, 2013, 4:40:39 PM12/28/13
to osm...@googlegroups.com
So the time-to-finish estimated in my screenshots is not the time that osmand use to determine the fastest road? Because according to the screenshots vångavägen is the shortest and fastest route. What did you mean with the comment about 45 km/h in calculation of time? What time? the displayed or the one used to determine fastest route? Is it always 45km/h

Even when I change the setting to choose the shortest route, it still wont choose vångavägen.

I'm confused...

Harry van der Wolf

unread,
Dec 28, 2013, 5:35:04 PM12/28/13
to osmand
Sorry, I mixed up the 9 minutes and 17 minutes. You are completely right. This is indeed very strange.

Harry

Max

unread,
Dec 29, 2013, 6:35:28 AM12/29/13
to osm...@googlegroups.com
Hi Tomas,

default routing is fast, but not precise.
If you switch to precise routing (Settings -> Navigation -> Precise routing (alpha)), you will get much better results (for example the 9 minutes route).
But precise routing is slower and does not support long routes (will take too much time and memory).

Regards,
Max

Tomas Hektor

unread,
Dec 29, 2013, 1:46:59 PM12/29/13
to osm...@googlegroups.com
Thanks for the explanation. I tried to turn precise routing on, and it worked as expected.

But I think it's a bit weird that a route with almost twice as much travel time gets chosen with default settings. On a course that is only 10 km. I could understand if it would have been a greater distance between start and end.

What will the non-optimal route over long distances do if I check that box? Return to default setting (fastest) or a more basic algorithm than that?

Cheers!
Reply all
Reply to author
Forward
0 new messages