osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.37k stars 986 forks source link

HH - C++: On limited set of maps routing leaves motorway where it should not #19996

Open casta opened 4 weeks ago

casta commented 4 weeks ago

Describe the routing engine used (required)

Describe your routing Profile (required)

Using car routing with default parameters, no restrictions enabled, with HH C++ routing engine (which is the default on 4.7.17).

Describe your start and end points (required)

Please find attached 3 GPX files generated with OsmAnd routing: osmand-routing-bug-gpx.zip

Describe the actual route (required)

To make it obvious, see this screeshot:

The HH C++.gpxroute leaves the motorway at some point before entering it back later in the route. It should not, as it’s not optimal.

Describe the expected route (required)

The A phase 2.gpx is the expected route. “Cropping” a bit the route at the beginning make HH C++ (HH C++ crop.gpx) fix it’s computation too.

Describe what Maps you used (online or offline) (required)

Your Environment (required)

OsmAnd Version: 4.7.17 fdroid version
Android/iOS version: Android 14 AP1A.240505.005 (CalyxOS)
Device model: Pixel 7a

Anything else? (optional)

No response

yuriiurshuliak commented 4 weeks ago

The bug was not reproduced. I tested the path construction using all routing algorithms, and it consistently routed through the motorway. You can verify it using our Web Version here: link

Please try updating your map or resetting your profile and check again.

casta commented 4 weeks ago

Ok after your comment I tested again and I have some new information. Here are screenshots with large zoom enough to see the downloaded maps in green.

I have this issue only if have the strictly minimal needed maps that covers the morotway (“Creuse” and “Corrèze”). The whole road is covered by the downloaded maps:

But if I download the whole “Nouvelle Acquitaine” region, I cannot reproduce anymore:

Does this HH algorithm need more data around the targeted road to do the routing ?

yuriiurshuliak commented 3 weeks ago

The bug was not reproduced. I attempted to build the navigation excluding the "Nouvelle Acquitaine" region and experimented with routing types HH x Java and HH x C++. In my scenario, the navigation routed across the motorway.

OsmAnd~ 4.8.0#2440m, released: 2024-06-05

casta commented 3 weeks ago

Well, it seems that your starting and endpoints are not exactly the same as in my GPX test case. As you can see, to reproduce, I have to set specific starting and ending point (see HH C++.gpx in my opening post), as soon as I change the starting point, the route is “fixed” (HH C++ crop.gpx).

But anyway, if you think that this behaviour is normal, feel free to close.

vshcherb commented 3 weeks ago

It's tricky to reproduce and hard to test as it's very long route to trace each segment, I will leave it open to find other cases where we would fix it easier.