osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.38k stars 989 forks source link

Refactor leftside: Routing avoids junction=circular with oneway=no #13497

Open Famlam opened 2 years ago

Famlam commented 2 years ago

Description

junction=circular, unlike junction=roundabout, doesn't have to be oneway=yes. However, it seems that OsmAnd treats it as oneway=yes, even though it is explicitly set to oneway=no

How to reproduce?

  1. Navigate from this position to this position by bike (e.g. https://www.openstreetmap.org/directions?engine=fossgis_osrm_bike&route=51.88244%2C5.85196%3B51.88290%2C5.85142#map=19/51.88271/5.85184 )
  2. Notice that OsmAnd will route you a long way around, just so it can avoid the oneway=no part. See screenshot: Detour

Suspect these two lines are to blame: https://github.com/osmandapp/OsmAnd-resources/blob/5d86a3d42b5a94c55089bbe81ba6264421594803/obf_creation/rendering_types.xml#L1757-L1758

Your Environment

OsmAnd Version: 4.1.11 Android/iOS version: Android 11 Device model: LG

Maps used (online or offline):
If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date. Offline: Netherlands, Gelderland, January version

Famlam commented 2 years ago

Deleted the pull request as it's slightly more complicated:

  1. routing.xml should be updated to accept oneway=no (this part is an easy fix). However,
  2. Navigation should account better the "which turn to take"-instruction
vshcherb commented 2 years ago
  1. we can fix accept pr at least (indeed should be part of routing.xml)
  2. is a completely different area of how to compute and display turn exit which we need to fix anyway... right now we detect direction from user settings and not from the real geometry of the junction, so it could be part of this fix. But it's a complicated fix )))
Famlam commented 2 years ago
  1. we can fix accept pr at least (indeed should be part of routing.xml)

Proposed one. I can't do the second point as it's (as you mention) very complicated

vshcherb commented 2 years ago

Merged. 2-nd will work automatically as counter but visual display won't

vshcherb commented 2 years ago

I will leave the issue open, so we can do internal refactoring to:

  1. Remove leftSideNavigation parameter from routing completely (leave only in UI to display turns)
  2. As a result of routing calculate what likely leftSideTurn or rightSideTurn (roundabout) is.