-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn instructions show turn right instead of straight on #21055
Comments
The bug has been reproduced. The route incorrectly shows a "turn right" direction at an intersection where the road is essentially straight. The correct instruction should be to continue straight. You can view the route in the web version via this link: Route Example.
|
I've never seen such a geometry in OSM and it will create a too sharp angle for the left turn. Better fix the code to ignore the right turn since the turn to the right leads to the wrong road. |
Nope, there is nothing wrong in correcting the geometry. I've done this several times. My example is a bit exaggerated and can be done a bit better. The fact is currently even ID editor shows left+right+right turns. On the 'corrected' example above it already shows left+straight+right. It's just about sharpening the joining angle from the road from SW. I've read on a separate documentation of Waze that they also suggest fixing geometry if it is a simple action, instead of adding manoeuvres (which are not supported by nearly any routers) (see https://wiki.openstreetmap.org/wiki/Relation:manoeuvre ) |
I fail to understand why this is necessary. I fail to understand why the geometry even matters here. We are coming from a road with
The resulting solution is correct. No geometry is involved here, all required information is present in the OSM tags. No misunderstanding is possible. |
For me it sound complicated to calculate by software correctly for every case - remember there can be more crossroads like this and even more complicated. I've checked the 3 routers from OSM on this crossroad with straight route (SW->NE) and with the left turn, and the results are horribly inconsistent and mostly wrong. |
Well, I just explained how to solve this algorithmically. That's why we have the |
@scaidermern you are technically right - https://www.openstreetmap.org/relation/5720844. There are 3 allowed roads, we will double check but it's probably some angles are hard coded and https://www.openstreetmap.org/way/110419891 is considered as only C not Turn Left possible. |
In OsmAnd code turns that biggest than 45 degrees always are the left or the right. Full list of turns present in TurnType class. I am also viewed this intersection in Google Street View and can see more "straight" geometry. Instruction with new geometry TL|TL|+C,TR (+C mean active straight on): |
Osm file: |
Can you explain why OsmAnd "guesses" the turn instruction although it could use the |
These are other 91 cases why OsmAnd "guesses" the turn instruction. Fo example turn:lanes=none|through|right where "none" can mean straight on and left turn. The users are edit map as is. So OsmAnd need some strict internal rules for turn lanes for make "gold" solution. The 45 degree is on of them. |
I can't really review this change but great to know that there is a possible fix! :) |
Possible fix of the problem first commit: #21190 So in the end it's test 79.2 which conflicts with current change. Or geometry could be changed here To do / to think:
|
Routing engine
Routing Profile
Car
Start and end points
Start: 51.10898, 13.77396
End: 51.11233, 13.77967
https://osmand.net/map/?start=51.108982%2C13.773956&end=51.112331%2C13.779673&profile=car#17/51.111008/13.776660
Actual route
The route goes almost straight on but OsmAnd displays "turn right" and highlights the "turn right" arrow in the lane widget:
![](https://private-user-images.githubusercontent.com/1040784/377018452-9529ffac-6a58-428c-83e1-fd3e2b59beb3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODg3MzIsIm5iZiI6MTczOTM4ODQzMiwicGF0aCI6Ii8xMDQwNzg0LzM3NzAxODQ1Mi05NTI5ZmZhYy02YTU4LTQyOGMtODNlMS1mZDNlMmI1OWJlYjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTkyNzEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGFlNjYzMDNlMDI5NTc3NDI2YWJiZDhlMjJiNDE2NDUxMjUxYjU3MmNiZmM1ZDY0YWMzZWI2OTMyYjI4OWNkZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.GZCTwu_3oCeVUFWDLpHrGQ8LO4kqvXjJdAG4X61SsnU)
Turning right at this point (onto the white road) will lead into the wrong direction. Driving straight on (onto the yellow road) is the correct instruction.
The road has three lanes (
lanes=3
) in total. The first two lanes lead to the left. The third lane goes straight and to the right (turn:lanes=left|left|through;right
):https://www.openstreetmap.org/way/384592167
https://www.openstreetmap.org/way/414711400
Maybe this is caused by the raw road geometry of the intersection in OSM:
![](https://private-user-images.githubusercontent.com/1040784/377022723-5185c95e-e893-4bd0-8825-a549069afdc8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODg3MzIsIm5iZiI6MTczOTM4ODQzMiwicGF0aCI6Ii8xMDQwNzg0LzM3NzAyMjcyMy01MTg1Yzk1ZS1lODkzLTRiZDAtODgyNS1hNTQ5MDY5YWZkYzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTkyNzEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWY1ZTZiMTkyMzRlNTQ4YjE4ZTE3ZDE5NDJiMTE0ZTNkNDc2ZGQyMGExN2MyMzMxZGVmZWI4ZGZmMzNhYjZlOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ._H5hpXC6hbvgQ1fgJi9WcCXkOWl0hMBPqefQVik2m3k)
The route is highlighted in red (coming from south west and going to north east). According to the raw road geometry the right turn is about 48 degrees although in reality it is almost straight (blue arrow).
What I would have imagined: OsmAnd sees the road to the right road (white in the first screenshot, gray in the second) and deduces that "turn right" can't be the correct instruction. "turn right" would be the correct instruction for this white/gray road but this road should not be taken. So the only value that is left from the
turn:lanes
tag is to go straight.Expected route
Show and highlight "straight on".
Maps you used (online or offline)
Your Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: