2012-09-30 08:40:59 -04:00
|
|
|
@routing @car @ferry
|
2012-10-01 07:27:08 -04:00
|
|
|
Feature: Car - Handle ferry routes
|
2012-09-30 08:40:59 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Background:
|
|
|
|
Given the profile "car"
|
2012-02-14 11:21:07 -05:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Use a ferry route
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e f g
|
|
|
|
"""
|
2012-02-14 11:21:07 -05:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | bicycle |
|
|
|
|
| abc | primary | | |
|
|
|
|
| cde | | ferry | yes |
|
|
|
|
| efg | primary | | |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 19:39:31 -04:00
|
|
|
| from | to | route | modes |
|
|
|
|
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving |
|
|
|
|
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving |
|
|
|
|
| e | c | cde,cde | ferry,ferry |
|
|
|
|
| e | b | cde,abc,abc | ferry,driving,driving |
|
|
|
|
| e | a | cde,abc,abc | ferry,driving,driving |
|
|
|
|
| c | e | cde,cde | ferry,ferry |
|
|
|
|
| c | f | cde,efg,efg | ferry,driving,driving |
|
|
|
|
| c | g | cde,efg,efg | ferry,driving,driving |
|
2014-09-29 05:37:36 -04:00
|
|
|
|
2017-02-07 08:05:24 -05:00
|
|
|
|
|
|
|
Scenario: Car - Use default speeds to calculate duration if no duration given
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e f g
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route |
|
|
|
|
| abc | primary | |
|
|
|
|
| cde | | ferry |
|
|
|
|
| efg | primary | |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | modes | speed | time |
|
|
|
|
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 12 km/h | 173.4s |
|
|
|
|
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 9 km/h | 162.4s |
|
|
|
|
| c | e | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
|
|
|
| e | c | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
2017-08-09 08:51:59 -04:00
|
|
|
|
2015-03-02 10:41:03 -05:00
|
|
|
Scenario: Car - Properly handle simple durations
|
2014-09-29 05:37:36 -04:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e f g
|
|
|
|
"""
|
2014-09-29 05:37:36 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| abc | primary | | |
|
2014-09-29 05:44:51 -04:00
|
|
|
| cde | | ferry | 00:01:00 |
|
2014-09-29 05:37:36 -04:00
|
|
|
| efg | primary | | |
|
|
|
|
|
|
|
|
When I route I should get
|
2017-02-07 08:05:24 -05:00
|
|
|
| from | to | route | modes | speed | time |
|
|
|
|
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 24 km/h | 89.4s |
|
|
|
|
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h | 78.4s |
|
|
|
|
| c | e | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
|
|
|
| e | c | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
2015-03-02 10:41:03 -05:00
|
|
|
|
|
|
|
Scenario: Car - Properly handle ISO 8601 durations
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
e f g
|
|
|
|
"""
|
2015-03-02 10:41:03 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| abc | primary | | |
|
|
|
|
| cde | | ferry | PT1M |
|
|
|
|
| efg | primary | | |
|
|
|
|
|
|
|
|
When I route I should get
|
2017-02-07 08:05:24 -05:00
|
|
|
| from | to | route | modes | speed | time |
|
|
|
|
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 24 km/h | 89.4s |
|
|
|
|
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h | 78.4s |
|
|
|
|
| c | e | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
|
|
|
| e | c | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
2017-08-09 08:51:59 -04:00
|
|
|
|
|
|
|
@snapping
|
|
|
|
Scenario: Car - Snapping when using a ferry
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a b c d e f
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| ab | primary | | |
|
|
|
|
| bcde | | ferry | 0:10 |
|
|
|
|
| ef | primary | | |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | modes | time |
|
|
|
|
| c | d | bcde,bcde | ferry,ferry | 600s |
|
2018-12-13 19:10:32 -05:00
|
|
|
|
|
|
|
Given the query options
|
|
|
|
| geometries | geojson |
|
|
|
|
| overview | full |
|
|
|
|
|
|
|
|
# Note that matching *should* work across unsnappable ferries
|
|
|
|
When I match I should get
|
|
|
|
| trace | geometry | duration |
|
|
|
|
| abcdef| 1,1,1.000899,1,1.000899,1,1.002697,1,1.002697,1,1.003596,1,1.003596,1,1.005394,1,1.005394,1,1.006293,1 | 610.9 |
|