2017-02-14 06:59:16 -05:00
|
|
|
@routing @car @destination
|
2012-10-01 07:27:08 -04:00
|
|
|
Feature: Car - Destination only, no passing through
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Background:
|
|
|
|
Given the profile "car"
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Destination only street
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a e
|
|
|
|
b c d
|
|
|
|
|
|
|
|
x y
|
|
|
|
"""
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes | access |
|
|
|
|
| ab | |
|
|
|
|
| bcd | destination |
|
|
|
|
| de | |
|
|
|
|
| axye | |
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
When I route I should get
|
2016-03-23 08:04:23 -04:00
|
|
|
| from | to | route |
|
|
|
|
| a | b | ab,ab |
|
2017-07-13 19:19:20 -04:00
|
|
|
| a | c | ab,bcd |
|
2016-03-23 08:04:23 -04:00
|
|
|
| a | d | ab,bcd,bcd |
|
|
|
|
| a | e | axye,axye |
|
|
|
|
| e | d | de,de |
|
2017-07-13 19:19:20 -04:00
|
|
|
| e | c | de,bcd |
|
2016-03-23 08:04:23 -04:00
|
|
|
| e | b | de,bcd,bcd |
|
|
|
|
| e | a | axye,axye |
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Destination only street
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a e
|
|
|
|
b c d
|
|
|
|
|
|
|
|
x y
|
|
|
|
"""
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes | access |
|
|
|
|
| ab | |
|
|
|
|
| bc | destination |
|
|
|
|
| cd | destination |
|
|
|
|
| de | |
|
|
|
|
| axye | |
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
When I route I should get
|
2016-03-23 08:04:23 -04:00
|
|
|
| from | to | route |
|
|
|
|
| a | b | ab,ab |
|
2017-07-13 19:19:20 -04:00
|
|
|
| a | c | ab,bc |
|
|
|
|
| a | d | ab,cd |
|
2016-03-23 08:04:23 -04:00
|
|
|
| a | e | axye,axye |
|
|
|
|
| e | d | de,de |
|
2017-07-13 19:19:20 -04:00
|
|
|
| e | c | de,cd |
|
|
|
|
| e | b | de,bc |
|
2016-03-23 08:04:23 -04:00
|
|
|
| e | a | axye,axye |
|
2012-09-30 06:01:56 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Routing inside a destination only area
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a c e
|
|
|
|
b d
|
|
|
|
x y
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | access |
|
|
|
|
| ab | destination |
|
|
|
|
| bc | destination |
|
|
|
|
| cd | destination |
|
|
|
|
| de | destination |
|
|
|
|
| axye | |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-23 08:04:23 -04:00
|
|
|
| from | to | route |
|
|
|
|
| a | e | ab,bc,cd,de,de |
|
|
|
|
| e | a | de,cd,bc,ab,ab |
|
|
|
|
| b | d | bc,cd,cd |
|
|
|
|
| d | b | cd,bc,bc |
|
2017-03-01 13:50:53 -05:00
|
|
|
|
|
|
|
Scenario: Car - Routing around a way that becomes destination only
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
b
|
|
|
|
\
|
2017-03-02 06:06:12 -05:00
|
|
|
|
|
|
|
|
e++d++++++c--i
|
|
|
|
| \
|
|
|
|
\ h--a
|
|
|
|
\ |
|
|
|
|
\___________g
|
2017-03-01 13:50:53 -05:00
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | access | oneway |
|
|
|
|
| ah | | no |
|
|
|
|
| ihg | | no |
|
2017-03-02 06:06:12 -05:00
|
|
|
| eg | | no |
|
2017-03-01 13:50:53 -05:00
|
|
|
| icde | | no |
|
|
|
|
| cde | destination | no |
|
|
|
|
| eb | | no |
|
|
|
|
|
|
|
|
When I route I should get
|
2017-03-02 06:06:12 -05:00
|
|
|
| from | to | route | # |
|
|
|
|
| i | b | ihg,eg,eb,eb | # goes around access=destination, though restricted way starts at two node intersection |
|
|
|
|
| b | d | eb,cde,cde | # ends in restricted way correctly |
|
|
|
|
| b | i | eb,eg,ihg,ihg | # goes around restricted way correctly |
|
|
|
|
|
|
|
|
Scenario: Car - Routing around a way that becomes destination only
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a---c---b
|
|
|
|
+ \
|
|
|
|
+ |
|
|
|
|
d |
|
|
|
|
\___e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | access | oneway |
|
|
|
|
| acbe | | no |
|
|
|
|
| cd | destination | no |
|
|
|
|
| de | | no |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route |
|
|
|
|
| e | a | acbe,acbe |
|
|
|
|
| d | a | de,acbe,acbe |
|
|
|
|
| c | d | cd,cd |
|
2018-01-09 04:27:19 -05:00
|
|
|
|
|
|
|
Scenario: Car - Routing through a parking lot tagged access=destination,service
|
|
|
|
Given the node map
|
|
|
|
"""
|
2018-02-13 10:08:53 -05:00
|
|
|
a----c++++b+++g------h---i
|
|
|
|
| + + + /
|
|
|
|
| + + + /
|
|
|
|
| + + + /
|
2018-01-09 04:27:19 -05:00
|
|
|
| d++++e+f /
|
2018-02-13 10:08:53 -05:00
|
|
|
z--------------y
|
2018-01-09 04:27:19 -05:00
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | access | highway |
|
|
|
|
| ac | | secondary |
|
|
|
|
| ghi | | secondary |
|
|
|
|
| azyhi | | secondary |
|
|
|
|
| cd | destination | service |
|
|
|
|
| def | destination | service |
|
|
|
|
| cbg | destination | service |
|
|
|
|
| be | destination | service |
|
|
|
|
| gf | destination | service |
|
|
|
|
|
|
|
|
When I route I should get
|
2018-02-13 10:08:53 -05:00
|
|
|
| from | to | route |
|
|
|
|
| a | i | azyhi,azyhi |
|
|
|
|
| b | f | be,def,def |
|
|
|
|
| b | i | cbg,ghi,azyhi,azyhi |
|
2018-01-09 04:27:19 -05:00
|
|
|
|
|
|
|
Scenario: Car - Disallow snapping to access=private,highway=service
|
|
|
|
Given a grid size of 20 meters
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a---c---b
|
|
|
|
:
|
|
|
|
x
|
|
|
|
:
|
|
|
|
d
|
|
|
|
\__e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | access | highway |
|
|
|
|
| acb | | primary |
|
|
|
|
| cx | private | service |
|
|
|
|
| xd | private | service |
|
|
|
|
| de | | primary |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route |
|
|
|
|
| a | x | acb,xd,xd |
|
|
|
|
| a | d | acb,xd,xd |
|
|
|
|
| a | e | acb,xd,de |
|
|
|
|
| x | e | de,de |
|
|
|
|
# do not snap to access=private,highway=service roads when routing over them is not necessary
|