-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove type from more structs, remove asserts
- Loading branch information
Showing
6 changed files
with
2 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b5674dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure that removing type is a good idea.
At present OSRM's instructions are a bit arbitrary in what they determine as a 'turn' - see #879, #956, #684, #686, #282. Sometimes turns will not be shown in the instructions at all, or sometimes they'll be shown as "continue" even though they're a modest left turn. Conversely, sometimes a bogus turn will be generated just because the road changes name.
One way to fix this (and the way I'm intending to do it at cycle.travel) is to compare types. So, for example, if the route goes from a motorway to a motorway_link, that is by definition a left/right turn, even though the angle will be small. Or if the road changes name, but the angle is 0° and the road type remains the same, that isn't a turn.
By comparing road types, we should also be able to give a penalty when a minor road crosses a major one (without a crossing), which would be great for bike routing (#592).
@DennisOSRM, any thoughts?