-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3324 from Project-OSRM/constrain-staggering
Constrain staggered intersection detection by mode change and intermediary intersections
- Loading branch information
Showing
3 changed files
with
218 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
@routing @guidance @staggered-intersections | ||
Feature: Staggered Intersections | ||
|
||
Background: | ||
Given the profile "bicycle" | ||
Given a grid size of 1 meters | ||
# Note the one meter grid size: staggered intersections make zig-zags of a couple of meters only | ||
|
||
Scenario: Staggered Intersection - pushing in the middle | ||
Given the node map | ||
""" | ||
j | ||
a b c | ||
d | ||
e f g | ||
h | ||
i | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | name | oneway | | ||
| abc | residential | Oak St | | | ||
| efg | residential | Oak St | | | ||
| ihedcj | residential | Cedar Dr | yes | | ||
|
||
When I route I should get | ||
| waypoints | route | turns | modes | | ||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | cycling,pushing bike,cycling,cycling | | ||
| g,a | Oak St,Oak St | depart,arrive | cycling,cycling | | ||
|
||
Scenario: Staggered Intersection - pushing at start | ||
Given the node map | ||
""" | ||
j | ||
a b c | ||
d | ||
e f g | ||
h | ||
i | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | name | oneway | | ||
| cba | residential | Oak St | yes | | ||
| efg | residential | Oak St | | | ||
| ihedcj | residential | Cedar Dr | | | ||
|
||
When I route I should get | ||
| waypoints | route | turns | modes | | ||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | pushing bike,cycling,cycling,cycling | | ||
| g,a | Oak St,Oak St | depart,arrive | cycling,cycling | | ||
|
||
Scenario: Staggered Intersection - pushing at end | ||
Given the node map | ||
""" | ||
j | ||
a b c | ||
d | ||
e f g | ||
h | ||
i | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | name | oneway | | ||
| abc | residential | Oak St | | | ||
| gfe | residential | Oak St | yes | | ||
| ihedcj | residential | Cedar Dr | | | ||
|
||
When I route I should get | ||
| waypoints | route | turns | modes | | ||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | cycling,cycling,pushing bike,pushing bike | | ||
| g,a | Oak St,Oak St | depart,arrive | cycling,cycling | | ||
|
||
Scenario: Staggered Intersection - pushing at start and end | ||
Given the node map | ||
""" | ||
j | ||
a b c | ||
d | ||
e f g | ||
h | ||
i | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | name | oneway | | ||
| cba | residential | Oak St | yes | | ||
| gfe | residential | Oak St | yes | | ||
| ihedcj | residential | Cedar Dr | | | ||
|
||
When I route I should get | ||
| waypoints | route | turns | modes | | ||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | pushing bike,cycling,pushing bike,pushing bike | | ||
| g,a | Oak St,Oak St | depart,arrive | cycling,cycling | | ||
|
||
Scenario: Staggered Intersection - pushing at start and end | ||
Given the node map | ||
""" | ||
j | ||
a b c | ||
d | ||
e f g | ||
h | ||
i | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | name | | ||
| cba | pedestrian | Oak St | | ||
| gfe | pedestrian | Oak St | | ||
| ihedcj | residential | Cedar Dr | | ||
|
||
When I route I should get | ||
| waypoints | route | turns | modes | | ||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | pushing bike,cycling,pushing bike,pushing bike | | ||
| g,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | pushing bike,cycling,pushing bike,pushing bike | | ||
|
||
Scenario: Staggered Intersection - control, all cycling on staggered intersection | ||
Given the node map | ||
""" | ||
j | ||
a b c | ||
d | ||
e f g | ||
h | ||
i | ||
""" | ||
|
||
And the ways | ||
| nodes | highway | name | | ||
| cba | residential | Oak St | | ||
| gfe | residential | Oak St | | ||
| ihedcj | residential | Cedar Dr | | ||
|
||
When I route I should get | ||
| waypoints | route | turns | modes | | ||
| a,g | Oak St,Oak St | depart,arrive | cycling,cycling | | ||
| g,a | Oak St,Oak St | depart,arrive | cycling,cycling | |
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