2013-05-05 05:14:09 -04:00
|
|
|
@routing @testbot @via
|
|
|
|
Feature: Via points
|
2013-06-26 11:35:25 -04:00
|
|
|
|
2013-05-05 05:14:09 -04:00
|
|
|
Background:
|
|
|
|
Given the profile "testbot"
|
2013-06-26 11:35:25 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Simple via point
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
"""
|
2013-05-05 05:14:09 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abc |
|
2013-05-05 05:14:09 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
When I route I should get
|
2016-03-31 19:11:28 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| a,b,c | abc,abc,abc,abc |
|
2016-03-07 15:44:32 -05:00
|
|
|
|
|
|
|
Scenario: Simple via point with core factor
|
|
|
|
Given the contract extra arguments "--core 0.8"
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
"""
|
2016-03-07 15:44:32 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abc |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 19:11:28 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| a,b,c | abc,abc,abc,abc |
|
|
|
|
| c,b,a | abc,abc,abc,abc |
|
|
|
|
| c,b,a | abc,abc,abc,abc |
|
2013-05-05 05:14:09 -04:00
|
|
|
|
|
|
|
Scenario: Via point at a dead end
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
"""
|
2013-06-26 11:35:25 -04:00
|
|
|
|
2013-05-05 05:14:09 -04:00
|
|
|
And the ways
|
2013-08-29 13:29:13 -04:00
|
|
|
| nodes |
|
|
|
|
| abc |
|
|
|
|
| bd |
|
2013-06-26 11:35:25 -04:00
|
|
|
|
2013-05-05 05:14:09 -04:00
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| a,d,c | abc,bd,bd,bd,abc,abc |
|
|
|
|
| c,d,a | abc,bd,bd,bd,abc,abc |
|
2013-05-05 05:14:09 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Multiple via points
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a e f g
|
|
|
|
b c d h
|
|
|
|
"""
|
2013-08-29 10:29:21 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ae |
|
|
|
|
| ab |
|
|
|
|
| bcd |
|
|
|
|
| de |
|
|
|
|
| efg |
|
|
|
|
| gh |
|
|
|
|
| dh |
|
2013-08-29 10:29:21 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| a,c,f | ab,bcd,bcd,bcd,de,efg,efg |
|
|
|
|
| a,c,f,h | ab,bcd,bcd,bcd,de,efg,efg,efg,gh,gh |
|
2014-05-26 05:46:01 -04:00
|
|
|
|
2015-09-18 11:30:53 -04:00
|
|
|
|
2015-06-02 10:59:30 -04:00
|
|
|
Scenario: Duplicate via point
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x
|
|
|
|
a 1 2 3 4 b
|
|
|
|
|
|
|
|
"""
|
2015-06-02 10:59:30 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| xa |
|
|
|
|
| ab |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| 1,1,4 | ab,ab,ab,ab |
|
2015-06-02 10:59:30 -04:00
|
|
|
|
2014-05-23 05:23:11 -04:00
|
|
|
Scenario: Via points on ring of oneways
|
2014-05-26 05:46:01 -04:00
|
|
|
# xa it to avoid only having a single ring, which cna trigger edge cases
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x g
|
|
|
|
a 1 b 2 c 3 d
|
|
|
|
i f e h
|
|
|
|
"""
|
2014-05-26 05:46:01 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| xa | |
|
2016-05-13 13:18:00 -04:00
|
|
|
| if | |
|
|
|
|
| gd | |
|
|
|
|
| eh | |
|
2014-05-26 05:46:01 -04:00
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
| cd | yes |
|
|
|
|
| de | yes |
|
|
|
|
| ef | yes |
|
|
|
|
| fa | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route | distance |
|
|
|
|
| 1,3 | ab,bc,cd,cd | 400m +-1 |
|
|
|
|
| 3,1 | cd,de,ef,fa,ab,ab | 1000m +-1 |
|
|
|
|
| 1,2,3 | ab,bc,bc,bc,cd,cd | 400m +-1 |
|
|
|
|
| 1,3,2 | ab,bc,cd,cd,cd,de,ef,fa,ab,bc,bc | 1600m +-1 |
|
|
|
|
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,bc,cd,de,ef,fa,ab,ab | 2400m +-1 |
|
2014-05-26 05:46:01 -04:00
|
|
|
|
|
|
|
Scenario: Via points on ring on the same oneway
|
2014-05-23 06:52:32 -04:00
|
|
|
# xa it to avoid only having a single ring, which cna trigger edge cases
|
2014-05-23 05:23:11 -04:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x e
|
|
|
|
a 1 2 3 b
|
|
|
|
g d c f
|
|
|
|
"""
|
2014-05-23 05:23:11 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
2014-05-23 06:52:32 -04:00
|
|
|
| xa | |
|
2016-05-13 13:18:00 -04:00
|
|
|
| eb | |
|
|
|
|
| cf | |
|
|
|
|
| dg | |
|
2014-05-23 05:23:11 -04:00
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
| cd | yes |
|
|
|
|
| da | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route | distance |
|
|
|
|
| 1,3 | ab,ab | 200m +-1 |
|
|
|
|
| 3,1 | ab,bc,cd,da,ab,ab | 800m +-1 |
|
|
|
|
| 1,2,3 | ab,ab,ab,ab | 200m +-1 |
|
|
|
|
| 1,3,2 | ab,ab,ab,bc,cd,da,ab,ab | 1100m +-1 |
|
|
|
|
| 3,2,1 | ab,bc,cd,da,ab,ab,ab,bc,cd,da,ab,ab | 1800m +-1 |
|
2016-01-14 18:39:49 -05:00
|
|
|
|
|
|
|
# See issue #1896
|
|
|
|
Scenario: Via point at a dead end with oneway
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e
|
|
|
|
"""
|
2016-01-14 18:39:49 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abc | no |
|
|
|
|
| bd | no |
|
|
|
|
| de | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| a,d,c | abc,bd,bd,bd,abc,abc |
|
|
|
|
| c,d,a | abc,bd,bd,bd,abc,abc |
|
2016-01-14 18:56:31 -05:00
|
|
|
|
2016-05-02 06:00:26 -04:00
|
|
|
# See issue #2349
|
|
|
|
Scenario: Via point at a dead end with oneway
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e
|
|
|
|
"""
|
2016-05-02 06:00:26 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abc | no |
|
|
|
|
| bd | no |
|
|
|
|
| ed | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | route |
|
|
|
|
| a,d,c | abc,bd,bd,bd,abc,abc |
|
|
|
|
| c,d,a | abc,bd,bd,bd,abc,abc |
|
|
|
|
|
|
|
|
# See issue #2349
|
2016-09-19 17:13:44 -04:00
|
|
|
@todo
|
2016-05-02 06:00:26 -04:00
|
|
|
Scenario: Via point at a dead end with oneway
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e g
|
|
|
|
f
|
|
|
|
"""
|
2016-05-02 06:00:26 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abc | no |
|
|
|
|
| bd | no |
|
|
|
|
| ed | yes |
|
|
|
|
| dg | yes |
|
|
|
|
| ef | no |
|
|
|
|
| fg | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | route |
|
|
|
|
| a,d,c | abc,bd,bd,bd,abc,abc |
|
|
|
|
| c,d,a | abc,bd,bd,bd,abc,abc |
|
|
|
|
|
2016-01-14 18:56:31 -05:00
|
|
|
# See issue #1896
|
|
|
|
Scenario: Via point at a dead end with barrier
|
|
|
|
Given the profile "car"
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
1
|
|
|
|
d
|
|
|
|
|
|
|
|
|
|
|
|
f e
|
|
|
|
"""
|
2016-01-14 18:56:31 -05:00
|
|
|
|
|
|
|
And the nodes
|
|
|
|
| node | barrier |
|
|
|
|
| d | bollard |
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abc |
|
|
|
|
| bd |
|
|
|
|
| afed |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route |
|
|
|
|
| a,1,c | abc,bd,bd,bd,bd,abc,abc |
|
|
|
|
| c,1,a | abc,bd,bd,bd,bd,abc,abc |
|
2016-01-07 04:33:47 -05:00
|
|
|
|
|
|
|
Scenario: Via points on ring on the same oneway, forces one of the vertices to be top node
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a 1 2 b
|
|
|
|
8 3
|
|
|
|
7 4
|
|
|
|
d 6 5 c
|
|
|
|
"""
|
2016-01-07 04:33:47 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
| cd | yes |
|
|
|
|
| da | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route | distance |
|
|
|
|
| 2,1 | ab,bc,cd,da,ab,ab | 1100m +-1 |
|
|
|
|
| 4,3 | bc,cd,da,ab,bc,bc | 1100m +-1 |
|
|
|
|
| 6,5 | cd,da,ab,bc,cd,cd | 1100m +-1 |
|
|
|
|
| 8,7 | da,ab,bc,cd,da,da | 1100m +-1 |
|
2016-01-07 04:33:47 -05:00
|
|
|
|
|
|
|
Scenario: Multiple Via points on ring on the same oneway, forces one of the vertices to be top node
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a 1 2 3 b
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
d 9 8 7 c
|
|
|
|
"""
|
2016-01-07 04:33:47 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
| cd | yes |
|
|
|
|
| da | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-04-01 05:39:47 -04:00
|
|
|
| waypoints | route | distance |
|
|
|
|
| 3,2,1 | ab,bc,cd,da,ab,ab,ab,bc,cd,da,ab,ab | 3000m +-1 |
|
|
|
|
| 6,5,4 | bc,cd,da,ab,bc,bc,bc,cd,da,ab,bc,bc | 3000m +-1 |
|
|
|
|
| 9,8,7 | cd,da,ab,bc,cd,cd,cd,da,ab,bc,cd,cd | 3000m +-1 |
|
2016-07-31 05:42:53 -04:00
|
|
|
|
|
|
|
# See issue #2706
|
2016-08-31 04:49:41 -04:00
|
|
|
# this case is currently broken. It simply works as put here due to staggered intersections triggering a name collapse.
|
|
|
|
# See 2824 for further information
|
|
|
|
@todo
|
2016-07-31 05:42:53 -04:00
|
|
|
Scenario: Incorrect ordering of nodes can produce multiple U-turns
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a
|
|
|
|
e b c d f
|
|
|
|
"""
|
2016-07-31 05:42:53 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcd | no |
|
|
|
|
| ebbdcf | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route |
|
|
|
|
| e | f | ebbdcf,ebbdcf |
|
2016-08-22 12:46:37 -04:00
|
|
|
|
|
|
|
@2798
|
|
|
|
Scenario: UTurns Enabled
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d e
|
|
|
|
"""
|
2016-08-22 12:46:37 -04:00
|
|
|
|
|
|
|
And the query options
|
|
|
|
| continue_straight | false |
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abc | yes |
|
|
|
|
| edc | yes |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| waypoints | route |
|
|
|
|
| a,b,e | |
|