-
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.
Ensure u-turn exists in intersection view (#6376)
Due to some rather complex logic that tries to calculate intersection angles by looking further up the road, it's possible to return an intersection view that is missing a u-turn - something which is assumed to exist in later guidance calculations. We apply a fix here by ensuring the u-turn is always included in the returned view.
- Loading branch information
Showing
3 changed files
with
54 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@routing @foot | ||
Feature: Foot - Intersections | ||
|
||
Background: | ||
Given the profile "foot" | ||
Given a grid size of 2 meters | ||
|
||
# https://github.com/Project-OSRM/osrm-backend/issues/6218 | ||
Scenario: Foot - Handles non-planar intersections | ||
Given the node map | ||
|
||
""" | ||
f | ||
| | ||
a | ||
| | ||
b---c---d | ||
| | ||
e | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | foot | layer | | ||
| ac | footway | yes | 0 | | ||
| bc | footway | yes | 0 | | ||
| cd | footway | yes | 0 | | ||
| cef | footway | yes | 1 | | ||
|
||
When I route I should get | ||
| from | to | route | | ||
| a | d | ac,cd,cd | |
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