Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

OsmAnd takes longer route than before #13505

Open
2 of 4 tasks
xandro0777 opened this issue Jan 9, 2022 · 5 comments
Open
2 of 4 tasks

OsmAnd takes longer route than before #13505

xandro0777 opened this issue Jan 9, 2022 · 5 comments
Labels
Observed Needs more clarification, feedback, or research

Comments

@xandro0777
Copy link

xandro0777 commented Jan 9, 2022

馃悶 routing report

Routing engine

  • OsmAnd's in-app offline routing
  • Any online routing provider (YOURS, openrouteservice, OSRM, etc.)

Routing Profile

Car

Start and end points

start point : https://www.openstreetmap.org/#map=17/49.88313/10.90999

end point : https://www.openstreetmap.org/#map=17/49.87914/10.92658

Actual and expected routes

actual route: https://graphhopper.com/maps/?point=49.883409%2C10.908909&point=49.887501%2C10.921183&point=49.879759%2C10.925817&locale=en-US&elevation=true&profile=car&use_miles=false&selected_detail=Elevation&layer=Omniscale

expected route: https://graphhopper.com/maps/?point=49.883409%2C10.908909&point=49.879759%2C10.925817&locale=en-US&elevation=true&profile=car&use_miles=false&selected_detail=Elevation&layer=Omniscale

Is this a regression?

yes, possibly triggered by a change in OSM data. Someone (probably wrongly) downgraded Forchheimer str from primary to tertiary https://www.openstreetmap.org/changeset/85454316

Nevertheless if I "block" (avoid road) the "wrong" route OsmAnd takes the "better"route through Forchheimer str and displays a 3 min shorter time!

So in this case OsmAnd should imho "ignore" that the road is tertiary - the time difference is just too much, the road has two lanes, less traffic signals etc..

The highway classification should not weigh that much when details of the road like speed limit, number of lanes, turn lanes, traffic lights are all well known.

OsmAnd Version:
4.0.9 from F-droid

Device and Android/iOS version:

Maps used (online or offline):

  • Offline maps offered within the OsmAnd app for download.

Bavaria 9.1.2022

  • Online (tile / raster) maps
@vshcherb vshcherb added this to the 4.3-backend milestone Jan 21, 2022
@vshcherb vshcherb changed the title regression, takes longer route OsmAnd takes longer route than before Jan 21, 2022
@vshcherb
Copy link
Member

It's not an OsmAnd regression but rather OSM regression. So it's not clear whether it will be fixed in OsmAnd or not.

@vshcherb vshcherb added the Observed Needs more clarification, feedback, or research label Jan 21, 2022
@vshcherb vshcherb removed this from the 4.3-backend milestone Jan 21, 2022
@xandro0777
Copy link
Author

xandro0777 commented Jan 21, 2022

The problem seems to be giving too much weight to the primary/secondary/tertiary distinction. In this particular example OsmAnd even computes that the more direct route is much faster - and still uses the other one that is almost twice as long.

Using highway classification for routing purposes is helpful in poorly mapped regions but of limited value in Germany.

Looking at German wiki, https://wiki.openstreetmap.org/wiki/Attributierung_von_Stra%C3%9Fen_in_Deutschland the highway types primary to tertiary should be equivalent for routing purposes if other attributes (maxspeed, lanes..) are known and match. In fact the wiki says tertiary roads are less busy than secondary or primary which might sometimes imply a small advantage for them.

In Germany I would consider the following scheme for normal cars:

  • Freeway is always preferable

Countryside:

  • primary to tertiary very similar, tertiary often preferable because of less traffic and especially less slow moving heavy goods traffic
  • unclassified slower

Urban:

  • primary to tertiary very similar, secondary and tertiary often preferable because of less traffic
  • unclassified slower

Things are a bit different for heavy goods vehicles,
tertiary roads and even more unclassified roads should probably get some handicap intersections and many other details tend to be less HGV friendly.

@vshcherb
Copy link
Member

Yes, the route is longer by 700 m but it uses the same road and doesn't cut it. Please take a look it uses same road priority with same road ref i.e. it's structurally designed to be used even though there is a shortcut and probably it's faster but from top-view perspective it doesn't look better.

BTW OsmAnd has a special penalty by going from higher priority road to lower so in that case it's used. It was designed exactly to not use shortcuts, though it's first time I see such a long shortcut (700 m), the time diff though < 1 min

@xandro0777
Copy link
Author

The time diff can be very noticeable, there are 2 more traffic lights on the longer way.

OsmAnd for me displays 3min difference in favor of the shorter route? Even 1 min difference would be a lot for that distance.

In this particular case the shortcut prevention is not so good. The length, together with the 2 extra traffic lights should add enough to compensate the shortcut penalty?

Also would definitely like to try an option to treat primary/secondary/tertiary as identical.

At times of heavy traffic I frequently prefer unclassified backroads.

@Farzat07
Copy link

Farzat07 commented Jun 7, 2024

It was designed exactly to not use shortcuts

Why though? I mean sometimes shortcuts lead to more time loss because of the extra turns and the possibly slower speeds in the shortcut road, but when a traffic light is avoided a shortcut is almost definitely faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Observed Needs more clarification, feedback, or research
Projects
None yet
Development

No branches or pull requests

3 participants