2017-05-30 10:36:51 -04:00
|
|
|
@routing @approach
|
2017-05-22 10:07:12 -04:00
|
|
|
Feature: Approach parameter
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the profile "car"
|
|
|
|
And a grid size of 10 meters
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Start End same approach, option unrestricted for Start and End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s e
|
|
|
|
a------b------c
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| bc |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted unrestricted | ab,bc |
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Start End same approach, option unrestricted for Start and curb for End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s e
|
|
|
|
a------b------c
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| bc |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted curb | ab,bc,bc |
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Start End opposite approach, option unrestricted for Start and End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s
|
|
|
|
a------b------c
|
|
|
|
e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| bc |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted unrestricted | ab,bc |
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Start End opposite approach, option unrestricted for Start and curb for End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s
|
|
|
|
a------b------c
|
|
|
|
e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| bc |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted curb | ab,bc |
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Oneway Test #
|
|
|
|
###############
|
|
|
|
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Test on oneway segment, Start End same approach, option unrestricted for Start and End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s e
|
|
|
|
a------b------c
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted unrestricted | ab,bc |
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Test on oneway segment, Start End same approach, option unrestricted for Start and curb for End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s e
|
|
|
|
a------b------c
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted curb | ab,bc |
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Test on oneway segment, Start End opposite approach, option unrestricted for Start and End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s
|
|
|
|
a------b------c
|
|
|
|
e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted unrestricted | ab,bc |
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: Test on oneway segment, Start End opposite approach, option unrestricted for Start and curb for End
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s
|
|
|
|
a------b------c
|
|
|
|
e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted curb | ab,bc |
|
|
|
|
|
|
|
|
##############
|
|
|
|
# UTurn Test #
|
|
|
|
##############
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: UTurn test, router can't found a route because uturn unauthorized on the segment selected
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
s e
|
|
|
|
a------b------c
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| bc |
|
|
|
|
|
|
|
|
And the relations
|
|
|
|
| type | way:from | way:to | node:via | restriction |
|
|
|
|
| restriction | bc | bc | c | no_u_turn |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted curb | |
|
|
|
|
|
|
|
|
|
2017-05-30 10:36:51 -04:00
|
|
|
Scenario: UTurn test, router can found a route because he can use the roundabout
|
2017-05-22 10:07:12 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
h
|
|
|
|
s e / \
|
|
|
|
a------b------c g
|
|
|
|
\ /
|
|
|
|
f
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | junction |
|
|
|
|
| ab | |
|
|
|
|
| bc | |
|
|
|
|
| cfghc | roundabout |
|
|
|
|
|
|
|
|
And the relations
|
|
|
|
| type | way:from | way:to | node:via | restriction |
|
|
|
|
| restriction | bc | bc | c | no_u_turn |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | approaches | route |
|
|
|
|
| s | e | unrestricted curb | ab,bc,bc |
|