Osmand repeatedly wants me to exit and immediately reenter a highway

130 views
Skip to first unread message

Paul van der Hulst

unread,
Oct 9, 2020, 5:22:20 AM10/9/20
to OsmAnd
Hi,
I planned a route from dwingeloo to Oudega this summer. At two points osmand wants me to exit the A32 highway and immediately reenterScreenshot_20201009-104403.jpgScreenshot_20201009-104512.jpg
This is just silly.
I have noticed this problem for a few years now, also between Kiel and Hamburg, so it's not a specific version of osmand, phone (samsung, nokia) or the map. It has caused me to use osmand on the road only sporadically, only to be disappointed again quite soon.

I use osmand on android with offline maps, offline routing, car profile.
For comparison: magic earth, which also uses openstreetmap data, doesn't have this problem.
Please fix this.
Paul

A Thompson

unread,
Oct 9, 2020, 7:06:17 PM10/9/20
to OsmAnd
I had a quick look at your examples on the openstreetmap site, and the OSRM router there does the same thing as OsmAnd, e.g. here.

In both examples, both the motorway and the exiting motorway_link are tagged:
maxspeed=100 
maxspeed:conditional=130 @ (19:00-06:00)

however the motorway_link to rejoin is simply tagged:
maxspeed=130

Could this theoretical increase in maxspeed be the reason that the motorway_link's are being chosen, even though in reality it will be slower?

I can't speak for the developers, but I get the feeling that it can be more difficult than you'd think to incorporate simple rules to avoid such behaviour, or maybe there could be unintended side-effects. Let's see if anyone who knows better has anything to say!

Martin Trautmann

unread,
Oct 10, 2020, 2:16:39 AM10/10/20
to osm...@googlegroups.com
On 20-10-10 01:06, A Thompson wrote:
> I had a quick look at your examples on the openstreetmap site, and the
> OSRM router there does the same thing as OsmAnd, e.g. here
> <https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=52.83930%2C6.41060%3B52.98870%2C5.55310#map=16/52.8061/6.0966>.
>
> In both examples, both the motorway and the exiting motorway_link are
> tagged:
>
> maxspeed=100 
>
> maxspeed:conditional=130 @ (19:00-06:00)
>
>
> however the motorway_link to rejoin is simply tagged:
>
> maxspeed=130
>
>
> Could this theoretical increase in maxspeed be the reason that the
> motorway_link's are being chosen, even though in reality it will be slower?

Yes, unfortunately that's a common problem.

It will hit you by surprise since you do not expect that behavior when
you come close to this turn.

That's why I askd for an improvement of the gui: when you click on the
next-turn-panel, the map will zoom to this area, just as it zooms on the
destination when you click the chequered flag.

If you know about those locations, you can fix them via OSM data.

Schönen Gruß
Martin

signature.asc

Paul van der Hulst

unread,
Oct 10, 2020, 3:46:32 AM10/10/20
to OsmAnd
Hi,

Don't misunderstand me: I don't think it's trivial to solve, but I DO think it's very annoying. The suggestion by myxw...@googlemail.com is not helpful since it is distracting while driving.
The OSM router makes even more mistakes like this, but on the other hand I can't remember such a glitch in google maps, so it is possible (but maybe it requires a lot of money).

My suggestion would be to set some small penalty on highway_link roads when routing. Maybe use an effective speed < maxspeed?
Especially when the road number before and after is the same....

Paul


Greg Troxel

unread,
Oct 10, 2020, 10:00:57 AM10/10/20
to A Thompson, OsmAnd

A Thompson <thomp...@gmail.com> writes:

> In both examples, both the motorway and the exiting motorway_link are
> tagged:
>
> maxspeed=100
>
> maxspeed:conditional=130 @ (19:00-06:00)
>
>
> however the motorway_link to rejoin is simply tagged:
>
> maxspeed=130

Wow, that is surprising. We have had lots of instances of thi problem
where the motorway has a tagged maxspeed which is below normal, and the
link inherits the motorway default. There, the problem is that link
roads should have a default that is 50-75% (depending on who you ask) of
the non-link default. That's pretty well agreed on, and I'm not sure
it's fixed.

But in this case, there are explicit tags, and either they are wrong and
should be fixed, or they are right and the route really is good.

I can see the "link road penalty" argument, where I define penalty as an
additional time/distance that *IS NOT* a model of how long it will
really take. For example, a left turn penalty of 1 minute means to add
a minute for a left turn, above and beyond the amount that waiting and
turning is actually expected to take.

In this case, the map should be fixed, perhaps with maxspeed:advisory
or maxpeed:practical.

Even here in the US where people drive 130 all the time (on roads signed
105! and they are in the US so they think of it as 80 :), the idea of
130 on a link road seems crazy to me. I wouldn't epxect that even in
Texas.
signature.asc

Paul van der Hulst

unread,
Oct 10, 2020, 12:27:06 PM10/10/20
to OsmAnd
Hi,
It seems there is some consensus about the 130 limit on the on-ramp: https://forum.openstreetmap.org/viewtopic.php?id=70677 (in dutch unfortunately) so apparently this should be solved in the routing algorithm.

I can see at least two ways to tackle this.
1 - I don't know how normal crossings are modeled, but I assume some assumption is made that you (sometimes?) have to slow down when you cross other roads.
In the Netherlands, these highways should never join with roads of  lower order. If a highway link does, that counts as a normal crossing where you would have to assume some delay due to crossing traffic. 
2 - It is quite irresponsible to assume you can race past a point on the map at 130km/h where the maximum speed of one of the connecting roads is only 80. The maximum speed at any point on the map should be no higher than the lowest of the speed limits of the connecting roads.

Best regards,
Paul

Martin Trautmann

unread,
Oct 10, 2020, 1:09:54 PM10/10/20
to osm...@googlegroups.com, Paul van der Hulst
On 20-10-10 09:46, Paul van der Hulst wrote:
> Hi,
>
> Don't misunderstand me: I don't think it's trivial to solve, but I DO
> think it's very annoying. The suggestion by myxw...@googlemail.com is
> not helpful since it is distracting while driving.

Yes, it is distracting, especially when driving alone. But with that
feature you might check and notice that problem in advance.

Maybe you even just have a break and check for the next turn. Or you
have a co-driver. And you are suspicious because you do not expect a
turn that early. So you could have a look and even leave a note to get
this fixed.

But when the problem hits you while driving, you have to struggle enough
to find back to your track.

Last month this problem happened to me several times - and two times I
would have lost plenty of time because those problems happened where the
usual drive through was no longer available, because the roads were
under construction. I would have had to follow the exit, follow the
external road for several kilometers, until there would have been a
chance to find to turn the opposite lanes and come back.

But now I do not even remember which exit it had been.

Schönen Gruß
Martin

signature.asc

Greg Troxel

unread,
Oct 10, 2020, 1:33:29 PM10/10/20
to OsmAnd

Paul van der Hulst <pault...@gmail.com> writes:

> Hi,
> It seems there is some consensus about the 130 limit on the
> on-ramp: https://forum.openstreetmap.org/viewtopic.php?id=70677 (in dutch
> unfortunately) so apparently this should be solved in the routing algorithm.

can you translate? DO you mean "the legal speed is 130 km/h"? Do you
then also mean "it is normal and reasonable to drive at that speed"?
and "people typically do drive at that speed"?

> I can see at least two ways to tackle this.
> 1 - I don't know how normal crossings are modeled, but I assume some
> assumption is made that you (sometimes?) have to slow down when you cross
> other roads.

A fair point.

> In the Netherlands, these highways should never join with roads of lower
> order. If a highway link does, that counts as a normal crossing where you
> would have to assume some delay due to crossing traffic.

> 2 - It is quite irresponsible to assume you can race past a point on the
> map at 130km/h where the maximum speed of one of the connecting roads is
> only 80. The maximum speed at any point on the map should be no higher than
> the lowest of the speed limits of the connecting roads.

Do they have ramp junctions, or stop signs?

Sounds like maxpseed:advisory is in order.

Is it really the case that the signs say 130 and nothing else? How is a
driver to know that they should slow down?
signature.asc

Paul van der Hulst

unread,
Oct 10, 2020, 3:14:02 PM10/10/20
to OsmAnd
On Saturday, October 10, 2020 at 7:33:29 PM UTC+2 Greg Troxel wrote:

Paul van der Hulst <pault...@gmail.com> writes:

> Hi,
> It seems there is some consensus about the 130 limit on the
> on-ramp: https://forum.openstreetmap.org/viewtopic.php?id=70677 (in dutch
> unfortunately) so apparently this should be solved in the routing algorithm.

can you translate? DO you mean "the legal speed is 130 km/h"? Do you
then also mean "it is normal and reasonable to drive at that speed"?
and "people typically do drive at that speed"?

Openstreetmap does not store data about what is normal or reasonable, that would be pointless. On the linked openstreetmap forum page there is consensus that the way it is currently stored in openstreetmap is ok, given the maximum speed laws. 
The reason is that on the on-ramp, typically only a highway sign is given, which implies 130km/h.
When you have entered the main road there will be a sign that during daytime there is a 100km/h limit. The daytime restriction is missing on the on-ramp, therefore the openstreetmap data is considered correct. 

> I can see at least two ways to tackle this.
> 1 - I don't know how normal crossings are modeled, but I assume some
> assumption is made that you (sometimes?) have to slow down when you cross
> other roads.

A fair point.

> In the Netherlands, these highways should never join with roads of lower
> order. If a highway link does, that counts as a normal crossing where you
> would have to assume some delay due to crossing traffic.

> 2 - It is quite irresponsible to assume you can race past a point on the
> map at 130km/h where the maximum speed of one of the connecting roads is
> only 80. The maximum speed at any point on the map should be no higher than
> the lowest of the speed limits of the connecting roads.

Do they have ramp junctions, or stop signs?

Sounds like maxpseed:advisory is in order.

Is it really the case that the signs say 130 and nothing else? How is a
driver to know that they should slow down?
See my remark above.

About possible stop signs: on the off-ramp there will usually first be a sign that the highway is about to end in 300m (= at the crossing) and again one just before the crossing itself. On the crossing chances are high that you have to yield to traffic from left or right, or possibly make a full stop.
When you continue straight ahead to return to the main highway (instead of turning left or right) you will meet a sign that you're back on the highway, without any speed restrictions on the sign, implying a 130km/h limit.

The end-of-highway sign is typically only a few meters before the actual crossing, not enough to split the way into a separate section with a reduced speed limit. So the situation is actually as described in option 2: only on the crossing, the road has a 80km/h limit. You can therefore not cross it at 100 or even 130km/h. 
At the least, a routing algorithm should acknowledge the reduced speed limit and add reasonable delays for slowing down and accelerating. This includes single points with lower maxspeed.

Best regards,
Paul 

Tom Crocker

unread,
Oct 10, 2020, 6:52:53 PM10/10/20
to OsmAnd
Although some people don't like it openstreetmap can contain data about what is reasonable; we have https://wiki.openstreetmap.org/wiki/Key:maxspeed:practical
For what it's worth, I'm fairly sure Google's algorithms take advantage of their equivalent of this based on logs of live traffic data.

I don't really agree with your premise that a joining road's maxspeed should be the maximum for the road it joins. In the UK at least, a slower road would tend to yield to the faster road. If I'm on a 40mph road and there's a 30 road joining to the side I wouldn't slow down, nor for a driveway. From your description it sounds like additional details could be added to the link like a small section of slower road if the highway ends and restarts, or a yield point, but I'm not familiar with them so may have misunderstood. 

However, I do agree that some explicit code that preferred continuing on a main road to travelling only on a link road where reasonable would be useful. I think feature requests and bug reports are made elsewhere.

Best,
Tom

--
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/859740bb-c200-43cd-9e0e-b32fbcc2fddfn%40googlegroups.com.

A Thompson

unread,
Oct 10, 2020, 10:18:13 PM10/10/20
to OsmAnd
On Saturday, October 10, 2020 at 11:52:53 PM UTC+1, Tom Crocker wrote:

However, I do agree that some explicit code that preferred continuing on a main road to travelling only on a link road where reasonable would be useful.

That makes sense - I've learnt from other threads that some decisions in OsmAnd are about what will typically be found in OSM rather than what would ideally be there.

But out of curiosity I did some rough calculations on the junction shown on the right in the original post (it's at  52.90854, 6.00013). If you could instantaneously accelerate from 100 to 130 while crossing the junction between the off- and on- ramps you'd save no more than 3 seconds compared to keeping on the highway. 

But I think there must be a give-way/yield indication at the junction because the ramps are *crossing* a slower road. This hasn't been added to OSM - if it had been, would that cause a routing penalty big enough to compensate for the 3 seconds? Maybe there is also a penalty for having to merge back onto the highway.

A Thompson

unread,
Oct 10, 2020, 11:29:16 PM10/10/20
to OsmAnd
...still thinking about it...

The two examples are when the slower joining road terminates at the junction between the off- and on-ramps. If there is no give-way/yield tagging (I don't know if OsmAnd does, in fact, pay attention to this) then it's impossible to know if traffic on the ramps needs to slow down or not - generally you would expect the slower road to yield to the faster.

When the slower road continues past the junction between the off- and on- ramps, does OsmAnd correctly add a penalty for the ramps crossing it? I think it might but I'm out of time.

Martin Trautmann

unread,
Oct 11, 2020, 1:08:13 AM10/11/20
to osm...@googlegroups.com, A Thompson
On 20-10-10 01:06, A Thompson wrote:
> I had a quick look at your examples on the openstreetmap site, and the
> OSRM router there does the same thing as OsmAnd, e.g. here
> <https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=52.83930%2C6.41060%3B52.98870%2C5.55310#map=16/52.8061/6.0966>.
>
> In both examples, both the motorway and the exiting motorway_link are
> tagged:
>
> maxspeed=100 
>
> maxspeed:conditional=130 @ (19:00-06:00)
>
>
> however the motorway_link to rejoin is simply tagged:
>
> maxspeed=130

So this tag has to be fixed. It must also be at least maxsped=100,
maxspeed:conditional=130 @ (19:00-06:00). That's the common default for
all Netherlands since March 2020.

A check should be done whether there are any remaining parts of the
autoroutes which do permit higher speeds.

However, I doubt that this actual intersection does not have any other
speed limits. Is there actual no other limitation?

After I had a look at this exit on the map, it would permit 130 at some
times before this direct crossing and always 130 after.

So maybe Dutch drivers do behave more reasonable than others and
practical speeds would be much lower since the driver would want to
leave at the exit. However, the markings on the road might even indicate
a stop sign there at Tuk, Wolterholten?

I now checked with google street view - and there are several mistakes.
1) the offical autoroute does not go through. Instead, it does end at
about 100 m before the crossing
2) the exit has a give-way sign at the crossing.

The announcement of the crossing has an announcement, naming 150 m
before. What's the distance of the posts? Are they 25 instead of 50 m?
3) autoroute then starts about 50 m after the crossing.

It's the same situation on both the north side exit with a T crossing
and the south side exit with an X crossing.

So there is no need to think about a practical max speed, you just have
to edit the proper details here.

signature.asc

Martin Trautmann

unread,
Oct 11, 2020, 2:10:52 AM10/11/20
to osm...@googlegroups.com, A Thompson
On 20-10-11 04:18, A Thompson wrote:

> But out of curiosity I did some rough calculations on the junction shown
> on the right in the original post (it's at  52.90854, 6.00013). If you
> could instantaneously accelerate from 100 to 130 while crossing the
> junction between the off- and on- ramps you'd save no more than 3
> seconds compared to keeping on the highway.


Before I checked the actual situation at this exit (afrit 9 Ter Idzard)
I assumed the typical German exits with a big four-leaf clover shape.
There you actually can drive at full speed on the outer exit lane.

It's not advisable. It's abuse. But AFAIK it would be permitted.

Some people use this to bypass a traffic jam on the main road, with less
traffic on the exit lane.

For a length of the exit lane of 1000 m length (@Wolterholten) this
would be a difference of up to 8.3 seconds (not account for an
acceleration time), for 500 m (Idzard) it would be half of it. How did
you compute the 3 s?

And even a single second difference, or a fraction of it, would advise
to navigate along the bypass lane, as long as there is not a significant
penalty on it.

So for the Netherlands exit, you just have to edit the details.


I think I found the route where I observed one of mw own problems:

https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=49.18468%2C9.21291%3B49.17757%2C9.23691#map=17/49.18048/9.22960

It assumes a speed limit of 60 km/h on the A6 in Heilbronn (eastern
direction) - which is true, the autobahn is under construction.

But it does recommend the bypass on the exit lane. This motorway link
has no limit at all, or 100 km/h.

But actually you can not drive through. Last time I passed,
https://www.openstreetmap.org/way/127681031 was completely blocked.

signature.asc

A Thompson

unread,
Oct 11, 2020, 3:00:57 AM10/11/20
to OsmAnd


On Sunday, October 11, 2020 at 7:10:52 AM UTC+1, Martin Trautmann wrote:

For a length of the exit lane of 1000 m length (@Wolterholten) this
would be a difference of up to 8.3 seconds (not account for an
acceleration time), for 500 m (Idzard) it would be half of it. How did
you compute the 3 s?

And even a single second difference, or a fraction of it, would advise
to navigate along the bypass lane, as long as there is not a significant
penalty on it.

My 3s is close enough to your 8.3/2 but I instantly regretted saying "no more than" when I posted it - I should have said "about." I used the "plan route" tool in OsmAnd to measure the distances of the main route and the on/off ramps. Here are my notes:
motorway: 0.48mi=0.77km @ 100kmph = 28s
Off link: 352m & 100kph = 12.7s
ON link: 0.28mi=0.45km @130 = 12.5s

I mixed measurements of 2 and 3 significant figures. I should have said "about" :-) 

Martin Trautmann

unread,
Oct 11, 2020, 3:40:22 AM10/11/20
to osm...@googlegroups.com, A Thompson
On 20-10-11 07:08, Martin Trautmann wrote:

> I now checked with google street view - and there are several mistakes.
> 1) the offical autoroute does not go through. Instead, it does end at
> about 100 m before the crossing
> 2) the exit has a give-way sign at the crossing.
>
> The announcement of the crossing has an announcement, naming 150 m
> before. What's the distance of the posts? Are they 25 instead of 50 m?
> 3) autoroute then starts about 50 m after the crossing.
>
> It's the same situation on both the north side exit with a T crossing
> and the south side exit with an X crossing.
>
> So there is no need to think about a practical max speed, you just have
> to edit the proper details here.

I've fixed the Wolterholten exit. Please check whether that's ok now.

signature.asc

Martin Trautmann

unread,
Oct 11, 2020, 3:51:12 AM10/11/20
to osm...@googlegroups.com, A Thompson
And I have fixed speed limits on some further ON lanes. It did not use
those paths for routing yet. Let's give it some ours to settle in...

signature.asc

Paul van der Hulst

unread,
Oct 11, 2020, 6:23:50 AM10/11/20
to OsmAnd
Hi, 
I investigated a bit further, but some (OSRM) routers just seem to be pretty dumb. When routing from Wolvega to Sneek, it wants you to leave and re-enter the highway in Heerenveen, through a set of traffic lights! 
As for now I opt for not changing the max speed on the rejoin, but instead adding highway=give_way points before the intersections. It will take some time before this gets uploaded to osmand's maps and see if this fixes the situation. I don't expect OSRM to respect these...

Martin Trautmann

unread,
Oct 14, 2020, 2:44:03 AM10/14/20
to osm...@googlegroups.com
On 20-10-10 01:06, A Thompson wrote:
> I had a quick look at your examples on the openstreetmap site, and the
> OSRM router there does the same thing as OsmAnd, e.g. here
> <https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=52.83930%2C6.41060%3B52.98870%2C5.55310#map=16/52.8061/6.0966>.

Until yesterday the routers still used the exit lines, although I had
adjusted the speed limits or the sections in between.

Today, for the first time, it worked properly.

Thus it's a possible solution to fix the speed limits.

So someone will have to find and fix all the other exit lanes.

https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=52.5384%2C6.1134%3B53.1898%2C5.4301#map=14/53.2024/5.7263
still does show this problem within other areas.

signature.asc

Martin Trautmann

unread,
Oct 23, 2020, 4:22:03 AM10/23/20
to osm...@googlegroups.com, Paul van der Hulst
As I learned by now from
https://forum.openstreetmap.org/viewtopic.php?id=68803, you actually do
not have a common 100 / 130 @ 19:00-6:00 speed limit, but only because
extra signs have been placed on the highway.

So actually, in theory the exit lanes will have the same speed limit as
the highway, but the entry lanes will not be limited up to the first 100
sign. It was my mistake to mark them with the speed limit. Entry lanes
do not need a speed limit at all, but do inherit it from the country
setting.

Instead, you will have to model each exit with end-of-highway and
give-way-of-right, where appropriate.

signature.asc
Reply all
Reply to author
Forward
0 new messages