-
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.
first conditional turn restrictions test
- Loading branch information
1 parent
d5df329
commit 98cf68d
Showing
2 changed files
with
35 additions
and
0 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,34 @@ | ||
@routing @car @restrictions | ||
Feature: Car - Turn restrictions | ||
# Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction | ||
# Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes. | ||
|
||
Background: Use car routing | ||
Given the profile "car" | ||
Given a grid size of 200 meters | ||
|
||
@no_turning | ||
Scenario: Car - No left turn | ||
Given the extract extra arguments "--parse-conditional-restrictions=1" | ||
Given the contract extra arguments "--time-zone-file=world/tz_world.shp" | ||
Given the node map | ||
""" | ||
n | ||
j e | ||
s | ||
""" | ||
|
||
And the ways | ||
| nodes | oneway | | ||
| nj | no | | ||
| js | no | | ||
| ej | yes | | ||
|
||
And the relations | ||
| type | way:from | way:to | node:via | restriction:conditional | | ||
| restriction | ej | nj | j | only_right_turn @ (Mo-Su 00:00-23:59) | | ||
|
||
When I route I should get | ||
| from | to | route | | ||
| e | s | ej,nj,nj,js,js | | ||
| e | n | ej,nj,nj | |
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