Compare commits
456 Commits
v5.0.0-rc.1
...
v5.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
| d5ae9c9c8c | |||
| 764bafaf95 | |||
| 97c7bcd9c8 | |||
| c511b5a133 | |||
| e7ab764714 | |||
| cbc2283b58 | |||
| 598d5fbb67 | |||
| 823dcbf511 | |||
| 1933c5e8f4 | |||
| 807aa71a7c | |||
| 14d9b67b58 | |||
| 82df0ca766 | |||
| a6c7529a4e | |||
| 202bb6d3e2 | |||
| bc514926bf | |||
| 9fc16b6a83 | |||
| 2125e0175d | |||
| 6b5982d389 | |||
| a4a8aa63d4 | |||
| bedf451952 | |||
| 93b8f1993c | |||
| c693f4806b | |||
| b07275694a | |||
| 82177c101b | |||
| da6dbd2159 | |||
| b3957d87b4 | |||
| 5f9ccadd6c | |||
| 6e04da9f8f | |||
| 58c13d2c07 | |||
| bca8593eef | |||
| 3e2e10a4c3 | |||
| 6979763292 | |||
| 324f1739e4 | |||
| 1489662f57 | |||
| 1c1f407f67 | |||
| 8fb631417b | |||
| ae45ad1ad2 | |||
| 6b89803534 | |||
| d01b34f501 | |||
| fcad2fa471 | |||
| 589767fe6d | |||
| d6407e5095 | |||
| 8ff8dc7200 | |||
| 2f7b02c96f | |||
| 669e2a767a | |||
| 2b4f9feeab | |||
| 1554916639 | |||
| 32a3651231 | |||
| dbd4ecf89b | |||
| 7416653874 | |||
| 621ed970da | |||
| 457ba9ac62 | |||
| f9da5f2c80 | |||
| b6a793a1e2 | |||
| bf2ab3d8af | |||
| 02f75236cb | |||
| 5dff83c6e9 | |||
| 43725bae89 | |||
| 59c12506cf | |||
| be15a3b739 | |||
| 9f515dad09 | |||
| 5052c4ae3a | |||
| 9a617f5d41 | |||
| 4886d46d91 | |||
| 67834def5f | |||
| c51ffeb65a | |||
| 68ee4eab61 | |||
| fa6d4ac0bc | |||
| 3fa533d91e | |||
| c0db144906 | |||
| ea2ec168b0 | |||
| cb18c1a54d | |||
| 45bcb22270 | |||
| 2539fd53dc | |||
| 8a2bd09fd0 | |||
| def89ac079 | |||
| fe08726387 | |||
| 9bb4a68599 | |||
| 996a27dbd1 | |||
| 58ebadd7b3 | |||
| cae06ba2c1 | |||
| 0274afa0f7 | |||
| 221f70ac7b | |||
| d3dbca374d | |||
| 6f0b6a8158 | |||
| b25cd6aaf2 | |||
| d27025003a | |||
| 66eb90d9d0 | |||
| 6a81a9d191 | |||
| 64cb134113 | |||
| 891ff7dd80 | |||
| 6643e7f499 | |||
| fcbf527ba5 | |||
| dfd180a292 | |||
| fa0a5040e5 | |||
| 56ba2cb251 | |||
| dea12779cf | |||
| 6033c05ff0 | |||
| 407da8bd15 | |||
| 43413ff980 | |||
| 4d864b8267 | |||
| a516245c94 | |||
| b1ed268d0e | |||
| 83b86bf092 | |||
| 954caa6804 | |||
| 8b6da4d2fe | |||
| f2d70d972d | |||
| b20de76037 | |||
| a33bd9dfe6 | |||
| f2443c64db | |||
| 278ec04f5e | |||
| 95787255a1 | |||
| eaf9993dd9 | |||
| 470d7600b8 | |||
| 849baea544 | |||
| 4f1ca20dda | |||
| 97401ad99a | |||
| 59f5e364c1 | |||
| 29c2a117c0 | |||
| c209e31ce1 | |||
| 12608889e2 | |||
| 3343882876 | |||
| 6e50b5fc60 | |||
| c540c85cf8 | |||
| b17491ebe5 | |||
| 76b410b2ca | |||
| 069388eae0 | |||
| c6c25e609b | |||
| 9b52dd8bf7 | |||
| 2cf19010e3 | |||
| 89d56e1cd1 | |||
| ef1fb08723 | |||
| e60ebee3f2 | |||
| 4c88fe0fb1 | |||
| 13338414db | |||
| 96f49f3b53 | |||
| 75979d7e1c | |||
| 29a2447906 | |||
| 2f702f61a4 | |||
| 5a71acbe3c | |||
| ca3e8ef09e | |||
| 8c44084af1 | |||
| d829a390fd | |||
| 6b6597e453 | |||
| 97c550d5f6 | |||
| acfd6ab141 | |||
| 7e790c1aa6 | |||
| d1e2aa57a8 | |||
| 2e6e3bf0b0 | |||
| e5025665fc | |||
| 1a8097f810 | |||
| f45daad6ca | |||
| e4e85e6f7e | |||
| 5beaf695ed | |||
| d09827b501 | |||
| 97722adbfa | |||
| 006a8833d3 | |||
| 8111baa8f9 | |||
| d6e4dc0aa2 | |||
| 497da1d29b | |||
| cbc8b64854 | |||
| c06f2a50f1 | |||
| 825a422721 | |||
| 2c4ba90abb | |||
| 6dda899a60 | |||
| 8725e2f40d | |||
| 35c501c203 | |||
| 30a9bc3179 | |||
| f9350a276c | |||
| cd9addf0e2 | |||
| 2219b6507c | |||
| 09931d7ad8 | |||
| 7ce0c0ef9a | |||
| 49e2cb6c36 | |||
| 4b60fc4747 | |||
| 164fb09f2c | |||
| 5647e6c199 | |||
| a4d6544764 | |||
| e942f6e420 | |||
| 7174baa91e | |||
| 5c8b7542d0 | |||
| e8035ced5a | |||
| 70a086a9e1 | |||
| 08cb6d1f63 | |||
| c7f3645fe2 | |||
| 4b6a85aae0 | |||
| c8a8859d2f | |||
| 8c0f47f06c | |||
| 926290dd9c | |||
| 6ae3315bb9 | |||
| 8621b1890e | |||
| c726001a0e | |||
| eba5f7d275 | |||
| 2f793473cc | |||
| 91567cad9e | |||
| d48ee84ae7 | |||
| fd000cad86 | |||
| 6244063073 | |||
| f34de8422e | |||
| a33edd15b4 | |||
| 6a65261765 | |||
| 07f3e2d457 | |||
| 958199ffef | |||
| e5ebf74d76 | |||
| 126d2f85ac | |||
| 908e3a2af6 | |||
| 25e40d723a | |||
| 7a764ce78b | |||
| 8947c789a9 | |||
| 8ac403abb9 | |||
| 9752cb8e4d | |||
| e9be9dd8d0 | |||
| 5e6d638c6f | |||
| c47f6e2ca5 | |||
| cc09df1961 | |||
| db26d2b2d7 | |||
| 5b33efeecc | |||
| fda4656630 | |||
| 5829bbe22d | |||
| f4cfde719d | |||
| 1fd66f55c1 | |||
| a964bec0f8 | |||
| b65ba5c394 | |||
| d51eefa1c4 | |||
| 4025cbd555 | |||
| 3da27c06c3 | |||
| bc7824812b | |||
| baf7822340 | |||
| 82ee08fcaf | |||
| 51d153a5f7 | |||
| df608e8b43 | |||
| 8e477437a6 | |||
| e70f0eea02 | |||
| 8be93a0202 | |||
| d4f7f19a22 | |||
| 4441381042 | |||
| 61c9c69718 | |||
| 5beaab97da | |||
| 843a4b8eae | |||
| 9ec46222e3 | |||
| 210da11fbb | |||
| ee61ae360d | |||
| 890e0f4995 | |||
| 224c66e0dc | |||
| 88052cd194 | |||
| c22453f24a | |||
| 099a805260 | |||
| 7ed474af8d | |||
| 9d893d6d4d | |||
| e55af0c274 | |||
| 803fbf2541 | |||
| 061b2b63e9 | |||
| 1486098065 | |||
| 0f0db4c823 | |||
| c3e7e96dce | |||
| 3c5f6bd8ac | |||
| b6b59e5c08 | |||
| a7aa27c87c | |||
| 735b325d74 | |||
| f948380fa2 | |||
| 79cf1880fc | |||
| ca130e1dc4 | |||
| d67ce81438 | |||
| ec1a84c57a | |||
| 59163cb2fc | |||
| 419cf9e2b0 | |||
| 95c78eac9c | |||
| 51a4cf5e46 | |||
| 2472c5d6a1 | |||
| 59fbb289b9 | |||
| e82bc20422 | |||
| 1e753e98ce | |||
| 39b3cab1da | |||
| 87fbfc6475 | |||
| cb8bfa027e | |||
| 1b1274fd56 | |||
| 38db495879 | |||
| a781c36876 | |||
| 71c336d9dd | |||
| e10e8910f3 | |||
| 253496c7ee | |||
| 30a3ab68c0 | |||
| 663a7c52c7 | |||
| 4e8ccd6f7d | |||
| 879ccfc8c2 | |||
| a77574b3d7 | |||
| 50738f8ce0 | |||
| 5c01878542 | |||
| ea93f6f560 | |||
| 7bab34eeda | |||
| 0cc23dec6f | |||
| 71c0d5253d | |||
| a674028c37 | |||
| 29fff4f51b | |||
| 4309ccfa02 | |||
| 4e8fe89faa | |||
| 8218d5a47e | |||
| 4bbb587280 | |||
| 0f04fe75bd | |||
| 11b356e55f | |||
| 80f008684d | |||
| c9c2d8133c | |||
| ac9a4d1e0d | |||
| d7dd6acd9d | |||
| b5739cb3d8 | |||
| ea93d56ca8 | |||
| 10097a946f | |||
| c439594403 | |||
| 29cf9e05db | |||
| 298f68c966 | |||
| 0b3289ea37 | |||
| 5f457bff12 | |||
| 6c00ccca9a | |||
| 7e679ab252 | |||
| 0ca21dbc91 | |||
| d2590f1078 | |||
| eb3f550e26 | |||
| 06aa6dedab | |||
| f769478abe | |||
| ba5f0af5a4 | |||
| 5e5f72ae57 | |||
| f36037ebf2 | |||
| 0c276ac71e | |||
| 9e95d1f1fd | |||
| e00bda37a5 | |||
| e7ea5f500d | |||
| a8fc95d4e4 | |||
| 3f598a5121 | |||
| 81c5ec0777 | |||
| 32bb58b272 | |||
| aa4b786ab3 | |||
| 3f5968b60c | |||
| 251eeb534a | |||
| 90add9f840 | |||
| 770624d492 | |||
| c59758ef65 | |||
| 15752335f4 | |||
| 3e4b48e206 | |||
| 25c685527a | |||
| fbabd137c2 | |||
| 6e7cf68164 | |||
| b47a532eb4 | |||
| 7c30ea32bf | |||
| bb06e044f5 | |||
| 01318a08b4 | |||
| 119487f1aa | |||
| 911427a361 | |||
| 58628a4bfc | |||
| b08b360f38 | |||
| adb8d0e845 | |||
| e0f009b3b9 | |||
| f1aa03c360 | |||
| 2ba417cf9f | |||
| d8af074ff6 | |||
| daf2bbf991 | |||
| 6605f293b4 | |||
| 482e18ccdb | |||
| ef1e0e14ec | |||
| 33f083b213 | |||
| bcfbc0cf6c | |||
| 00d75ece64 | |||
| dc1b5d3424 | |||
| 58fb633df3 | |||
| 36f9366f3f | |||
| 712f1ca02a | |||
| 285b238f26 | |||
| 70fb12b10e | |||
| 6380a6be05 | |||
| 548fd92c15 | |||
| 86de53eb9a | |||
| e1616953db | |||
| c1dbab50fe | |||
| b6bb6a92a9 | |||
| 0ab80ad0a7 | |||
| 61744764da | |||
| 8eb98982f3 | |||
| 1090339331 | |||
| 804816f014 | |||
| 51e8318224 | |||
| 0d38a50dba | |||
| 72094acf74 | |||
| 1bd67943bb | |||
| 30101e129f | |||
| 9bb31678a6 | |||
| 5e5c52ff0a | |||
| d9d4742130 | |||
| 0fab6b7cab | |||
| f10286de8c | |||
| a0e0465704 | |||
| c8457a2619 | |||
| 14c36bc405 | |||
| 81319228bd | |||
| fcd7b05900 | |||
| 8378d95588 | |||
| b34f9b1795 | |||
| 35b098e656 | |||
| e05a45b080 | |||
| 715ee66b03 | |||
| 3d6e9da115 | |||
| 54410988eb | |||
| dded2c2463 | |||
| fcf5838019 | |||
| beafa18708 | |||
| bd371a11ad | |||
| 1895fee1c9 | |||
| 2200d0b678 | |||
| f3c4a7dd16 | |||
| 25834b89dd | |||
| 4d20dea271 | |||
| c59647ad2f | |||
| e466cbe0ce | |||
| a24de2d22a | |||
| f452a3025d | |||
| 3c58eaf49f | |||
| c75b497b2e | |||
| d572d77b48 | |||
| a4074332cc | |||
| c31ceb6a5b | |||
| b0863d8628 | |||
| c38a6d74dd | |||
| 7bec75b709 | |||
| 56ea24b03b | |||
| 277829c280 | |||
| c127aaae6b | |||
| c895848061 | |||
| 64e5ebb55f | |||
| 83addd6bba | |||
| d87a19b2f9 | |||
| b58edc980c | |||
| f3e72623e9 | |||
| 54ee76bcef | |||
| efe6faabfd | |||
| 3ee8b655ea | |||
| c70d138eb9 | |||
| af2a327310 | |||
| b27e0e2807 | |||
| 8267ed53f0 | |||
| aa90d7b4b7 | |||
| 6b69946b9e | |||
| f6116db957 | |||
| c824429458 | |||
| 23b2154d98 | |||
| 25c8711aad | |||
| cf30628d4e | |||
| 7675c730b6 | |||
| 2ce74c05e1 | |||
| 88e6558da3 | |||
| f1140ec903 | |||
| a2e114e852 | |||
| 8f6fc0146b | |||
| 6ad1cd3fb5 | |||
| 40443d1e25 | |||
| 4ec323c5cc | |||
| 300d901618 | |||
| fd6daa580a | |||
| c2fc47df34 |
@@ -40,6 +40,8 @@ Thumbs.db
|
||||
# build related files #
|
||||
#######################
|
||||
/build/
|
||||
/example/build/
|
||||
/test/data/monaco*
|
||||
/cmake/postinst
|
||||
|
||||
# Eclipse related files #
|
||||
@@ -78,6 +80,7 @@ stxxl.errlog
|
||||
/test/profile.lua
|
||||
/test/cache
|
||||
/test/speeds.csv
|
||||
/test/data/monaco.*
|
||||
node_modules
|
||||
|
||||
# Deprecated config file #
|
||||
|
||||
+37
-47
@@ -13,7 +13,7 @@ notifications:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- "5.0"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@@ -26,8 +26,8 @@ matrix:
|
||||
addons: &gcc5
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-5' BUILD_TYPE='Debug'
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'pip']
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Debug' COVERAGE=ON
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
@@ -35,20 +35,20 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-4.8' BUILD_TYPE='Debug'
|
||||
env: CCOMPILER='gcc-4.8' CXXCOMPILER='g++-4.8' BUILD_TYPE='Debug'
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons: &clang38
|
||||
apt:
|
||||
sources: ['llvm-toolchain-precise', 'ubuntu-toolchain-r-test']
|
||||
sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
|
||||
packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='clang++-3.8' BUILD_TYPE='Debug' RUN_CLANG_FORMAT=ON
|
||||
env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Debug' RUN_CLANG_FORMAT=ON
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
compiler: clang
|
||||
env: COMPILER='clang++' BUILD_TYPE='Debug'
|
||||
env: CCOMPILER='clang' CXXCOMPILER='clang++' BUILD_TYPE='Debug'
|
||||
|
||||
# Release Builds
|
||||
- os: linux
|
||||
@@ -57,7 +57,7 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-5' BUILD_TYPE='Release'
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
@@ -65,20 +65,20 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-4.8' BUILD_TYPE='Release'
|
||||
env: CCOMPILER='gcc-4.8' CXXCOMPILER='g++-4.8' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons: &clang38
|
||||
apt:
|
||||
sources: ['llvm-toolchain-precise', 'ubuntu-toolchain-r-test']
|
||||
sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
|
||||
packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='clang++-3.8' BUILD_TYPE='Release'
|
||||
env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Release'
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
compiler: clang
|
||||
env: COMPILER='clang++' BUILD_TYPE='Release'
|
||||
env: CCOMPILER='clang' CXXCOMPILER='clang++' BUILD_TYPE='Release'
|
||||
|
||||
# Shared Library
|
||||
- os: linux
|
||||
@@ -87,39 +87,15 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-5' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons: &clang38
|
||||
apt:
|
||||
sources: ['llvm-toolchain-precise', 'ubuntu-toolchain-r-test']
|
||||
sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
|
||||
packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='clang++-3.8' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
|
||||
# Disabled until tests all pass on OSX:
|
||||
#
|
||||
# 3/ OSX Clang Builds
|
||||
#- os: osx
|
||||
# osx_image: xcode6.4
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Debug'
|
||||
|
||||
#- os: osx
|
||||
# osx_image: xcode6.4
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Release'
|
||||
|
||||
#- os: osx
|
||||
# osx_image: xcode6.4
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
#- os: osx
|
||||
# osx_image: xcode7
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
before_install:
|
||||
- source ./scripts/install_node.sh 4
|
||||
@@ -128,12 +104,15 @@ install:
|
||||
- npm install
|
||||
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
|
||||
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
|
||||
- |
|
||||
if [[ -n "${COVERAGE}" ]]; then
|
||||
pip install --user cpp-coveralls
|
||||
fi
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz"
|
||||
CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.1-Linux-x86_64.tar.gz"
|
||||
mkdir cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
|
||||
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
|
||||
|
||||
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
# implicit deps, but seem to be installed by default with recent images: libxml2 GDAL boost
|
||||
brew install cmake libzip libstxxl lua51 luabind tbb md5sha1sum
|
||||
@@ -146,9 +125,9 @@ before_script:
|
||||
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||
fi
|
||||
- mkdir build && pushd build
|
||||
- export CXX=${COMPILER}
|
||||
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
|
||||
- export OSRM_PORT=5000 OSRM_TIMEOUT=6000
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DBUILD_TOOLS=1 -DENABLE_CCACHE=0
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DCOVERAGE=${COVERAGE:-OFF} -DBUILD_TOOLS=1 -DENABLE_CCACHE=0
|
||||
|
||||
script:
|
||||
- make --jobs=2
|
||||
@@ -159,18 +138,29 @@ script:
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
- ./extractor-tests
|
||||
- ./engine-tests
|
||||
- ./util-tests
|
||||
- echo "travis_fold:start:UNIT_TESTS"
|
||||
- ./unit_tests/extractor-tests
|
||||
- ./unit_tests/engine-tests
|
||||
- ./unit_tests/util-tests
|
||||
- ./unit_tests/server-tests
|
||||
- echo "travis_fold:end:UNIT_TESTS"
|
||||
- popd
|
||||
- echo "travis_fold:start:CUCUMBER"
|
||||
- npm test
|
||||
- make -C test/data
|
||||
- echo "travis_fold:end:CUCUMBER"
|
||||
- echo "travis_fold:start:BENCHMARK"
|
||||
- make -C test/data benchmark
|
||||
- echo "travis_fold:end:BENCHMARK"
|
||||
- ./build/unit_tests/library-tests test/data/monaco.osrm
|
||||
- mkdir example/build && pushd example/build
|
||||
- cmake ..
|
||||
- make
|
||||
- ./osrm-example ../../test/data/monaco.osrm
|
||||
- popd
|
||||
|
||||
after_success:
|
||||
- |
|
||||
if [ -n "$RUN_CLANG_FORMAT" ]; then
|
||||
./scripts/format.sh || true # we don't want to fail just yet
|
||||
fi
|
||||
- coveralls --build-root build --exclude unit_tests --exclude third_party --exclude node_modules --gcov-options '\-lp'
|
||||
|
||||
@@ -1,3 +1,98 @@
|
||||
# 5.0.2
|
||||
- Fixes:
|
||||
- Issue #2335, map matching was using shortest path with uturns disabled
|
||||
|
||||
# 5.0.1
|
||||
- Fixes:
|
||||
- Issue #2309: Fixes local path looping, same coordinates crash
|
||||
- Issue #2311: Fixes invalid assertion in loop unpacking
|
||||
- Issue #2310: Local paths could falsely end up trying to remove the start step
|
||||
|
||||
# 5.0.0
|
||||
Changes with regard 5.0.0 RC2:
|
||||
- API:
|
||||
- if `geometry=geojson` is passed the resulting geometry can be a LineString or Point
|
||||
depending on how many coordinates are present.
|
||||
- the removal of the summary field was revered. for `steps=flase` the field will always be an empty string.
|
||||
|
||||
Changes with regard to 4.9.1:
|
||||
- API:
|
||||
- BREAKING: Complete rewrite of the HTTP and library API. See detailed documentation in the wiki.
|
||||
- BREAKING: The default coordinate order is now `longitude, latidue`. Exception: Polyline geometry
|
||||
which follow the original Google specification of `latitdue, longitude`.
|
||||
- BREAKING: Polyline geometries now use precision 5, instead of previously 6
|
||||
- BREAKING: Removed GPX support
|
||||
- New service `tile` which serves debug vector tiles of the road network
|
||||
- Completely new engine for guidance generation:
|
||||
- Support for highway ramps
|
||||
- Support for different intersection types (end of street, forks, merges)
|
||||
- Instruction post-processing to merge unimportant instructions
|
||||
- Improved handling of roundabouts
|
||||
|
||||
- Tools:
|
||||
- BREAKING: Renamed osrm-prepare to osrm-contract
|
||||
- BREAKING: Removes profiles from osrm-contract, only needed in osrm-extract.
|
||||
- Abort processing in osrm-extract if there are no snappable edges remaining.
|
||||
- Added .properties file to osrm-extract ouput.
|
||||
- Enables the use of multiple segment-speed-files on the osrm-contract command line
|
||||
|
||||
- Profile changes:
|
||||
- Remove movable bridge mode
|
||||
- Add `maxspeed=none` tag to car profile.
|
||||
- A `side_road` tag support for the OSRM car profile.
|
||||
|
||||
- Fixes:
|
||||
- Issue #2150: Prevents routing over delivery ways and nodes
|
||||
- Issue #1972: Provide uninstall target
|
||||
- Issue #2072: Disable alternatives by default and if core factor < 1.0
|
||||
- Issue #1999: Fix unpacking for self-loop nodes not in core.
|
||||
|
||||
- Infrastructure:
|
||||
- Cucumber test suit is now based on cucumber-js, removes Ruby as dependency
|
||||
- Updated to mapbox/variant v1.1
|
||||
- Updated to libosmium v2.6.1
|
||||
- Remove GeoJSON based debugging output, replaced by debug tiles
|
||||
|
||||
|
||||
# 5.0.0 RC2
|
||||
- Profiles:
|
||||
- `properties.allow_uturns_at_via` -> `properties.continue_straight_at_waypoint` (value is inverted!)
|
||||
- API:
|
||||
- Removed summary from legs property
|
||||
- Disable steps and alternatives by default
|
||||
- Fix `code` field: 'ok' -> 'Ok'
|
||||
- Allow 4.json and 4.3.json format
|
||||
- Conform to v5 spec and support "unlimited" as radiuses value.
|
||||
- `uturns` parameter was replaced by `continue_straight` (value is inverted!)
|
||||
- Features:
|
||||
- Report progress for gennerating edge expanded edges in the edge based graph factory
|
||||
- Add maxspeed=none tag to car profile.
|
||||
- Optimize StaticRTree code: speedup 2x (to RC1)
|
||||
- Optimize DouglasPeucker code: speedup 10x (to RC1)
|
||||
- Optimize WebMercator projection: speedup 2x (to RC1)
|
||||
- Bugs:
|
||||
- #2195: Resolves issues with multiple includedirs in pkg-config file
|
||||
- #2219: Internal server error when using the match plugin
|
||||
- #2027: basename -> filename
|
||||
- #2168: Report correct position where parsing failed
|
||||
- #2036: Add license to storage and storage config exposed in public API
|
||||
- Fix uturn detection in match plugin
|
||||
- Add missing -lz to fix linking of server-tests
|
||||
|
||||
# 5.0.0 RC1
|
||||
- Renamed osrm-prepare into osrm-contract
|
||||
- osrm-contract does not need a profile parameter anymore
|
||||
- New public HTTP API, find documentation [here](https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api)
|
||||
- POST support is discontinued, please use library bindings for more complex requests
|
||||
- Removed timestamp plugin
|
||||
- Coordinate order is now Longitude,Latitude
|
||||
- Cucumber tests now based on Javascript (run with `npm test`)
|
||||
- Profile API changed:
|
||||
- `forward_mode` and `backward_mode` now need to be selected from a pre-defined list
|
||||
- Global profile properties are now stored in a global `properties` element. This includes:
|
||||
- `properties.traffic_signal_penalty`
|
||||
- `properties.use_turn_restrictions`
|
||||
- `properties.u_turn_penalty`
|
||||
- `properties.allow_u_turn_at_via`
|
||||
|
||||
|
||||
|
||||
+54
-45
@@ -7,9 +7,9 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. P
|
||||
endif()
|
||||
|
||||
project(OSRM C CXX)
|
||||
set(OSRM_VERSION_MAJOR 4)
|
||||
set(OSRM_VERSION_MINOR 9)
|
||||
set(OSRM_VERSION_PATCH 1)
|
||||
set(OSRM_VERSION_MAJOR 5)
|
||||
set(OSRM_VERSION_MINOR 0)
|
||||
set(OSRM_VERSION_PATCH 0)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
include(CheckCXXCompilerFlag)
|
||||
@@ -32,7 +32,10 @@ endif()
|
||||
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
|
||||
option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF)
|
||||
option(BUILD_TOOLS "Build OSRM tools" OFF)
|
||||
option(BUILD_COMPONENTS "Build osrm-components" ON)
|
||||
option(ENABLE_ASSERTIONS OFF)
|
||||
option(COVERAGE OFF)
|
||||
option(SANITIZER OFF)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
@@ -45,25 +48,18 @@ add_custom_target(FingerPrintConfigure ALL ${CMAKE_COMMAND}
|
||||
COMMENT "Configuring revision fingerprint"
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(tests DEPENDS engine-tests extractor-tests util-tests)
|
||||
add_custom_target(benchmarks DEPENDS rtree-bench)
|
||||
|
||||
set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread unit_test_framework)
|
||||
set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/util/version.hpp.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/util/version.hpp
|
||||
)
|
||||
file(GLOB UtilGlob src/util/*.cpp)
|
||||
file(GLOB ExtractorGlob src/extractor/*.cpp)
|
||||
file(GLOB ExtractorGlob src/extractor/*.cpp src/extractor/*/*.cpp)
|
||||
file(GLOB ContractorGlob src/contractor/*.cpp)
|
||||
file(GLOB StorageGlob src/storage/*.cpp)
|
||||
file(GLOB ServerGlob src/server/*.cpp src/server/**/*.cpp)
|
||||
file(GLOB EngineGlob src/engine/*.cpp src/engine/**/*.cpp)
|
||||
file(GLOB ExtractorTestsGlob unit_tests/extractor/*.cpp)
|
||||
file(GLOB EngineTestsGlob unit_tests/engine/*.cpp)
|
||||
file(GLOB UtilTestsGlob unit_tests/util/*.cpp)
|
||||
file(GLOB IOTestsGlob unit_tests/io/*.cpp)
|
||||
|
||||
add_library(UTIL OBJECT ${UtilGlob})
|
||||
add_library(EXTRACTOR OBJECT ${ExtractorGlob})
|
||||
@@ -79,22 +75,11 @@ add_executable(osrm-extract src/tools/extract.cpp)
|
||||
add_executable(osrm-contract src/tools/contract.cpp)
|
||||
add_executable(osrm-routed src/tools/routed.cpp $<TARGET_OBJECTS:SERVER> $<TARGET_OBJECTS:UTIL>)
|
||||
add_executable(osrm-datastore src/tools/store.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm src/osrm/osrm.cpp $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm src/osrm/osrm.cpp $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:UTIL> $<TARGET_OBJECTS:STORAGE>)
|
||||
add_library(osrm_extract $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
|
||||
|
||||
# Unit tests
|
||||
add_executable(engine-tests EXCLUDE_FROM_ALL unit_tests/engine_tests.cpp ${EngineTestsGlob} $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:UTIL>)
|
||||
add_executable(extractor-tests EXCLUDE_FROM_ALL unit_tests/extractor_tests.cpp ${ExtractorTestsGlob} $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_executable(util-tests EXCLUDE_FROM_ALL unit_tests/util_tests.cpp ${UtilTestsGlob} $<TARGET_OBJECTS:UTIL>)
|
||||
|
||||
# Benchmarks
|
||||
add_executable(rtree-bench EXCLUDE_FROM_ALL src/benchmarks/static_rtree.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
|
||||
target_include_directories(util-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests)
|
||||
target_include_directories(rtree-bench PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests)
|
||||
|
||||
# Check the release mode
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
@@ -150,8 +135,19 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
add_definitions(-DBOOST_TEST_DYN_LINK)
|
||||
set(MAYBE_COVERAGE_LIBRARIES "")
|
||||
if (COVERAGE)
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
message(ERROR "COVERAGE=ON only make sense with a Debug build")
|
||||
endif()
|
||||
set(MAYBE_COVERAGE_LIBRARIES "gcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
endif()
|
||||
if (SANITIZER)
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
message(ERROR "SANITIZER=ON only make sense with a Debug build")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
|
||||
# Configuring compilers
|
||||
@@ -235,11 +231,13 @@ find_package(Osmium REQUIRED COMPONENTS io)
|
||||
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
|
||||
|
||||
|
||||
find_package(Boost 1.49.0 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
find_package(Boost 1.49.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
if(NOT WIN32)
|
||||
add_definitions(-DBOOST_TEST_DYN_LINK)
|
||||
endif()
|
||||
add_definitions(-DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE)
|
||||
add_definitions(-DBOOST_SPIRIT_USE_PHOENIX_V3)
|
||||
add_definitions(-DBOOST_RESULT_OF_USE_DECLTYPE)
|
||||
add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED)
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
@@ -250,7 +248,7 @@ if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(TBB_LIBRARIES ${TBB_DEBUG_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_package( Luabind REQUIRED )
|
||||
find_package(Luabind REQUIRED)
|
||||
include(check_luabind)
|
||||
include_directories(SYSTEM ${LUABIND_INCLUDE_DIR})
|
||||
|
||||
@@ -300,7 +298,8 @@ set(EXTRACTOR_LIBRARIES
|
||||
${OSMIUM_LIBRARIES}
|
||||
${STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
${ZLIB_LIBRARY})
|
||||
${ZLIB_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(CONTRACTOR_LIBRARIES
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
@@ -308,36 +307,34 @@ set(CONTRACTOR_LIBRARIES
|
||||
${USED_LUA_LIBRARIES}
|
||||
${STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY})
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(ENGINE_LIBRARIES
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY})
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(STORAGE_LIBRARIES
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY})
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(UTIL_LIBRARIES
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES})
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
# Libraries
|
||||
target_link_libraries(osrm ${ENGINE_LIBRARIES})
|
||||
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES})
|
||||
target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
||||
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
||||
# Tests
|
||||
target_link_libraries(engine-tests ${ENGINE_LIBRARIES})
|
||||
target_link_libraries(extractor-tests ${EXTRACTOR_LIBRARIES})
|
||||
target_link_libraries(rtree-bench ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${TBB_LIBRARIES})
|
||||
target_link_libraries(util-tests ${UTIL_LIBRARIES})
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
message(STATUS "Activating OSRM internal tools")
|
||||
if(BUILD_COMPONENTS)
|
||||
find_package(GDAL)
|
||||
if(GDAL_FOUND)
|
||||
add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
@@ -348,6 +345,10 @@ if(BUILD_TOOLS)
|
||||
else()
|
||||
message(WARNING "libgdal and/or development headers not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
message(STATUS "Activating OSRM internal tools")
|
||||
add_executable(osrm-io-benchmark src/tools/io-benchmark.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_link_libraries(osrm-io-benchmark ${Boost_LIBRARIES})
|
||||
add_executable(osrm-unlock-all src/tools/unlock_all_mutexes.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
@@ -378,16 +379,19 @@ set_property(TARGET osrm-routed PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
file(GLOB VariantGlob third_party/variant/*.hpp)
|
||||
file(GLOB LibraryGlob include/osrm/*.hpp)
|
||||
set(EngineHeader include/engine/engine.hpp include/engine/engine_config.hpp include/engine/route_parameters.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp)
|
||||
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp)
|
||||
file(GLOB ParametersGlob include/engine/api/*_parameters.hpp)
|
||||
set(EngineHeader include/engine/status.hpp include/engine/engine_config.hpp include/engine/hint.hpp include/engine/bearing.hpp include/engine/phantom_node.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/strong_typedef.hpp)
|
||||
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp include/extractor/travel_mode.hpp)
|
||||
set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.hpp)
|
||||
#set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp)
|
||||
set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp)
|
||||
install(FILES ${EngineHeader} DESTINATION include/osrm/engine)
|
||||
install(FILES ${UtilHeader} DESTINATION include/osrm/util)
|
||||
install(FILES ${StorageHeader} DESTINATION include/osrm/storage)
|
||||
install(FILES ${ExtractorHeader} DESTINATION include/osrm/extractor)
|
||||
install(FILES ${ContractorHeader} DESTINATION include/osrm/contractor)
|
||||
install(FILES ${LibraryGlob} DESTINATION include/osrm)
|
||||
install(FILES ${ParametersGlob} DESTINATION include/osrm/engine/api)
|
||||
install(FILES ${VariantGlob} DESTINATION include/variant)
|
||||
install(TARGETS osrm-extract DESTINATION bin)
|
||||
install(TARGETS osrm-contract DESTINATION bin)
|
||||
@@ -445,3 +449,8 @@ configure_file(
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
|
||||
|
||||
|
||||
# Modular build system: each directory registered here provides its own CMakeLists.txt
|
||||
add_subdirectory(unit_tests)
|
||||
add_subdirectory(src/benchmarks)
|
||||
|
||||
@@ -18,6 +18,7 @@ RECURSIVE = YES
|
||||
|
||||
EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/third_party \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/build \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/node_modules \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/unit_tests \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/benchmarks \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/features
|
||||
|
||||
@@ -10,6 +10,7 @@ The Open Source Routing Machine is a high performance routing engine written in
|
||||
| Linux | develop | [](https://travis-ci.org/Project-OSRM/osrm-backend) |
|
||||
| Windows | master/develop | [](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) |
|
||||
| LUAbind fork | master | [](https://travis-ci.org/DennisOSRM/luabind) |
|
||||
| Coverage | develop | [](https://coveralls.io/github/Project-OSRM/osrm-backend?branch=develop) |
|
||||
|
||||
## Building
|
||||
|
||||
|
||||
+8
-5
@@ -116,14 +116,17 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
SET PATH=%PROJECT_DIR%\osrm-deps\libs\bin;%PATH%
|
||||
|
||||
ECHO running engine-tests.exe ...
|
||||
%Configuration%\engine-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO running extractor-tests.exe ...
|
||||
%Configuration%\extractor-tests.exe
|
||||
unit_tests\%Configuration%\extractor-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO running engine-tests.exe ...
|
||||
unit_tests\%Configuration%\engine-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO running util-tests.exe ...
|
||||
%Configuration%\util-tests.exe
|
||||
unit_tests\%Configuration%\util-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO running server-tests.exe ...
|
||||
unit_tests\%Configuration%\server-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
IF NOT "%APPVEYOR_REPO_BRANCH%"=="develop" GOTO DONE
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ Version: v@OSRM_VERSION_MAJOR@.@OSRM_VERSION_MINOR@.@OSRM_VERSION_PATCH@
|
||||
Requires:
|
||||
Libs: -L${libdir} -losrm
|
||||
Libs.private: @ENGINE_LIBRARY_LISTING@
|
||||
Cflags: -I${includedir}
|
||||
Cflags: -I${includedir} -I${includedir}/osrm
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
default: '--require features --tags ~@todo --tags ~@bug --tags ~@stress',
|
||||
default: '--require features --tags ~@stress --tags ~@todo',
|
||||
verify: '--require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress',
|
||||
jenkins: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress',
|
||||
bugs: '--require features --tags @bug',
|
||||
|
||||
@@ -19,7 +19,7 @@ find_path(LibOSRM_INCLUDE_DIR osrm/osrm.hpp
|
||||
/opt/local
|
||||
/opt)
|
||||
|
||||
set(LibOSRM_INCLUDE_DIRS ${LibOSRM_INCLUDE_DIR})
|
||||
set(LibOSRM_INCLUDE_DIRS ${LibOSRM_INCLUDE_DIR} ${LibOSRM_INCLUDE_DIR}/osrm)
|
||||
|
||||
find_library(TEST_LibOSRM_STATIC_LIBRARY Names osrm.lib libosrm.a
|
||||
PATH_SUFFIXES osrm lib/osrm lib
|
||||
|
||||
+60
-36
@@ -1,61 +1,85 @@
|
||||
#include "osrm/json_container.hpp"
|
||||
#include "osrm/engine_config.hpp"
|
||||
#include "osrm/route_parameters.hpp"
|
||||
#include "osrm/table_parameters.hpp"
|
||||
#include "osrm/nearest_parameters.hpp"
|
||||
#include "osrm/trip_parameters.hpp"
|
||||
#include "osrm/match_parameters.hpp"
|
||||
|
||||
#include "osrm/coordinate.hpp"
|
||||
#include "osrm/engine_config.hpp"
|
||||
#include "osrm/json_container.hpp"
|
||||
|
||||
#include "osrm/status.hpp"
|
||||
#include "osrm/osrm.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
int main(int argc, const char *argv[]) try
|
||||
{
|
||||
if (argc < 2)
|
||||
{
|
||||
std::cerr << "Error: Not enough arguments." << std::endl
|
||||
<< "Run " << argv[0] << " data.osrm" << std::endl;
|
||||
std::cerr << "Usage: " << argv[0] << " data.osrm\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
osrm::EngineConfig engine_config;
|
||||
std::string base_path(argv[1]);
|
||||
engine_config.server_paths["ramindex"] = base_path + ".ramIndex";
|
||||
engine_config.server_paths["fileindex"] = base_path + ".fileIndex";
|
||||
engine_config.server_paths["hsgrdata"] = base_path + ".hsgr";
|
||||
engine_config.server_paths["nodesdata"] = base_path + ".nodes";
|
||||
engine_config.server_paths["edgesdata"] = base_path + ".edges";
|
||||
engine_config.server_paths["coredata"] = base_path + ".core";
|
||||
engine_config.server_paths["geometries"] = base_path + ".geometry";
|
||||
engine_config.server_paths["timestamp"] = base_path + ".timestamp";
|
||||
engine_config.server_paths["namesdata"] = base_path + ".names";
|
||||
engine_config.use_shared_memory = false;
|
||||
using namespace osrm;
|
||||
|
||||
osrm::OSRM routing_machine(engine_config);
|
||||
// Configure based on a .osrm base path, and no datasets in shared mem from osrm-datastore
|
||||
EngineConfig config;
|
||||
config.storage_config = {argv[1]};
|
||||
config.use_shared_memory = false;
|
||||
|
||||
osrm::RouteParameters route_parameters;
|
||||
// route is in Monaco
|
||||
route_parameters.service = "viaroute";
|
||||
route_parameters.AddCoordinate(43.731142, 7.419758);
|
||||
route_parameters.AddCoordinate(43.736825, 7.419505);
|
||||
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
|
||||
OSRM osrm{config};
|
||||
|
||||
osrm::json::Object json_result;
|
||||
const int result_code = routing_machine.RunQuery(route_parameters, json_result);
|
||||
std::cout << "result code: " << result_code << std::endl;
|
||||
// 2xx code
|
||||
if (result_code / 100 == 2)
|
||||
// The following shows how to use the Route service; configure this service
|
||||
RouteParameters params;
|
||||
|
||||
// Route in monaco
|
||||
params.coordinates.push_back({util::FloatLongitude(7.419758), util::FloatLatitude(43.731142)});
|
||||
params.coordinates.push_back({util::FloatLongitude(7.419505), util::FloatLatitude(43.736825)});
|
||||
|
||||
// Response is in JSON format
|
||||
json::Object result;
|
||||
|
||||
// Execute routing request, this does the heavy lifting
|
||||
const auto status = osrm.Route(params, result);
|
||||
|
||||
if (status == Status::Ok)
|
||||
{
|
||||
// Extract data out of JSON structure
|
||||
auto& summary = json_result.values["route_summary"].get<osrm::json::Object>();
|
||||
auto duration = summary.values["total_time"].get<osrm::json::Number>().value;
|
||||
auto distance = summary.values["total_distance"].get<osrm::json::Number>().value;
|
||||
std::cout << "duration: " << duration << std::endl;
|
||||
std::cout << "distance: " << distance << std::endl;
|
||||
auto &routes = result.values["routes"].get<json::Array>();
|
||||
|
||||
// Let's just use the first route
|
||||
auto &route = routes.values.at(0).get<json::Object>();
|
||||
const auto distance = route.values["distance"].get<json::Number>().value;
|
||||
const auto duration = route.values["duration"].get<json::Number>().value;
|
||||
|
||||
// Warn users if extract does not contain the default Berlin coordinates from above
|
||||
if (distance == 0 or duration == 0)
|
||||
{
|
||||
std::cout << "Note: distance or duration is zero. ";
|
||||
std::cout << "You are probably doing a query outside of the OSM extract.\n\n";
|
||||
}
|
||||
|
||||
std::cout << "Distance: " << distance << " meter\n";
|
||||
std::cout << "Duration: " << duration << " seconds\n";
|
||||
}
|
||||
else if (status == Status::Error)
|
||||
{
|
||||
const auto code = result.values["code"].get<json::String>().value;
|
||||
const auto message = result.values["message"].get<json::String>().value;
|
||||
|
||||
std::cout << "Code: " << code << "\n";
|
||||
std::cout << "Message: " << code << "\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
catch (const std::exception ¤t_exception)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cout << "exception: " << current_exception.what();
|
||||
std::cerr << "Error: " << e.what() << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Bike - Access tags on ways
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bike - Access tag hierachy on ways
|
||||
Scenario: Bike - Access tag hierarchy on ways
|
||||
Then routability should be
|
||||
| highway | access | vehicle | bicycle | bothw |
|
||||
| | | | | x |
|
||||
@@ -121,6 +121,7 @@ Feature: Bike - Access tags on ways
|
||||
| private | | | |
|
||||
| agricultural | | | |
|
||||
| forestry | | | |
|
||||
| delivery | | | |
|
||||
| | yes | | x |
|
||||
| | permissive | | x |
|
||||
| | designated | | x |
|
||||
@@ -129,6 +130,7 @@ Feature: Bike - Access tags on ways
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | delivery | | |
|
||||
| | | yes | x |
|
||||
| | | permissive | x |
|
||||
| | | designated | x |
|
||||
@@ -137,6 +139,7 @@ Feature: Bike - Access tags on ways
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| | | delivery | |
|
||||
|
||||
Scenario: Bike - Access tags on both node and way
|
||||
Then routability should be
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Bike - Access tags on nodes
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bike - Access tag hierachy on nodes
|
||||
Scenario: Bike - Access tag hierarchy on nodes
|
||||
Then routability should be
|
||||
| node/access | node/vehicle | node/bicycle | node/highway | bothw |
|
||||
| | | | | x |
|
||||
@@ -47,6 +47,7 @@ Feature: Bike - Access tags on nodes
|
||||
| private | | | |
|
||||
| agricultural | | | |
|
||||
| forestry | | | |
|
||||
| delivery | | | |
|
||||
| | yes | | x |
|
||||
| | permissive | | x |
|
||||
| | designated | | x |
|
||||
@@ -55,6 +56,7 @@ Feature: Bike - Access tags on nodes
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | delivery | | |
|
||||
| | | yes | x |
|
||||
| | | permissive | x |
|
||||
| | | designated | x |
|
||||
@@ -63,3 +65,4 @@ Feature: Bike - Access tags on nodes
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| | | delivery | |
|
||||
|
||||
@@ -17,15 +17,15 @@ Feature: Bike - Squares and other areas
|
||||
| abcda | yes | residential |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
@building
|
||||
Scenario: Bike - Don't route on buildings
|
||||
@@ -41,14 +41,14 @@ Feature: Bike - Squares and other areas
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | xa |
|
||||
| a | d | xa |
|
||||
| b | c | xa |
|
||||
| c | b | xa |
|
||||
| c | d | xa |
|
||||
| d | c | xa |
|
||||
| d | a | xa |
|
||||
| a | d | xa |
|
||||
| a | b | xa,xa |
|
||||
| a | d | xa,xa |
|
||||
| b | c | xa,xa |
|
||||
| c | b | xa,xa |
|
||||
| c | d | xa,xa |
|
||||
| d | c | xa,xa |
|
||||
| d | a | xa,xa |
|
||||
| a | d | xa,xa |
|
||||
|
||||
@parking
|
||||
Scenario: Bike - parking areas
|
||||
@@ -65,17 +65,18 @@ Feature: Bike - Squares and other areas
|
||||
| abcda | (nil) | parking |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by,by |
|
||||
| y | x | by,abcda,xa,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
|
||||
@train @platform
|
||||
Scenario: Bike - railway platforms
|
||||
@@ -90,14 +91,14 @@ Feature: Bike - Squares and other areas
|
||||
| abcda | (nil) | platform |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by,by |
|
||||
| y | x | by,abcda,xa,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@routing @bicycle @bridge
|
||||
Feature: Bicycle - Handle movable bridge
|
||||
Feature: Bicycle - Handle cycling
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
@@ -17,15 +17,15 @@ Feature: Bicycle - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,5,1 |
|
||||
| b | f | abc,cde,efg | 1,5,1 |
|
||||
| e | c | cde | 5 |
|
||||
| e | b | cde,abc | 5,1 |
|
||||
| e | a | cde,abc | 5,1 |
|
||||
| c | e | cde | 5 |
|
||||
| c | f | cde,efg | 5,1 |
|
||||
| c | g | cde,efg | 5,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
|
||||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
|
||||
| e | c | cde,cde | cycling,cycling |
|
||||
| e | b | cde,abc,abc | cycling,cycling,cycling |
|
||||
| e | a | cde,abc,abc | cycling,cycling,cycling |
|
||||
| c | e | cde,cde | cycling,cycling |
|
||||
| c | f | cde,efg,efg | cycling,cycling,cycling |
|
||||
| c | g | cde,efg,efg | cycling,cycling,cycling |
|
||||
|
||||
Scenario: Bicycle - Properly handle durations
|
||||
Given the node map
|
||||
@@ -40,8 +40,8 @@ Feature: Bicycle - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,5,1 | 5 km/h |
|
||||
| b | f | abc,cde,efg | 1,5,1 | 4 km/h |
|
||||
| c | e | cde | 5 | 2 km/h |
|
||||
| e | c | cde | 5 | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/h |
|
||||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 4 km/h |
|
||||
| c | e | cde,cde | cycling,cycling | 2 km/h |
|
||||
| e | c | cde,cde | cycling,cycling | 2 km/h |
|
||||
|
||||
@@ -19,15 +19,15 @@ Feature: Bike - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bcd |
|
||||
| a | d | ab,bcd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,bcd |
|
||||
| e | b | de,bcd |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bcd,bcd |
|
||||
| a | d | ab,bcd,bcd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,bcd,bcd |
|
||||
| e | b | de,bcd,bcd |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Bike - Destination only street
|
||||
Given the node map
|
||||
@@ -45,15 +45,15 @@ Feature: Bike - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bc |
|
||||
| a | d | ab,bc,cd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,dc |
|
||||
| e | b | de,dc,bc |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bc,bc |
|
||||
| a | d | ab,bc,cd,cd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,cd,cd |
|
||||
| e | b | de,cd,bc,bc |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Bike - Routing inside a destination only area
|
||||
Given the node map
|
||||
@@ -70,8 +70,8 @@ Feature: Bike - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de |
|
||||
| e | a | de,cd,bc,ab |
|
||||
| b | d | bc,cd |
|
||||
| d | b | cd,bc |
|
||||
| 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 |
|
||||
|
||||
@@ -17,15 +17,15 @@ Feature: Bike - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | g | abc,cde,efg |
|
||||
| b | f | abc,cde,efg |
|
||||
| e | c | cde |
|
||||
| e | b | cde,abc |
|
||||
| e | a | cde,abc |
|
||||
| c | e | cde |
|
||||
| c | f | cde,efg |
|
||||
| c | g | cde,efg |
|
||||
| from | to | route |
|
||||
| a | g | abc,cde,efg,efg |
|
||||
| b | f | abc,cde,efg,efg |
|
||||
| e | c | cde,cde |
|
||||
| e | b | cde,abc,abc |
|
||||
| e | a | cde,abc,abc |
|
||||
| c | e | cde,cde |
|
||||
| c | f | cde,efg,efg |
|
||||
| c | g | cde,efg,efg |
|
||||
|
||||
Scenario: Bike - Ferry duration, single node
|
||||
Given the node map
|
||||
@@ -59,5 +59,5 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | d | abcd | 3600s +-10 |
|
||||
| d | a | abcd | 3600s +-10 |
|
||||
| a | d | abcd,abcd | 3600s +-10 |
|
||||
| d | a | abcd,abcd | 3600s +-10 |
|
||||
|
||||
@@ -48,9 +48,9 @@ Feature: Bike - Max speed restrictions
|
||||
| bc | residential | 80 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 15 km/h |
|
||||
| b | c | bc | 15 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 15 km/h |
|
||||
| b | c | bc,bc | 15 km/h |
|
||||
|
||||
Scenario: Bike - Forward/backward maxspeed
|
||||
Given the shortcuts
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
@routing @bicycle @mode
|
||||
Feature: Bike - Mode flag
|
||||
|
||||
# bicycle modes:
|
||||
# 1 bike
|
||||
# 2 pushing
|
||||
# 3 ferry
|
||||
# 4 train
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
@@ -22,13 +16,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,3,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,3,1 |
|
||||
| c | a | bc,ab | head,left,destination | 3,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,3 |
|
||||
| a | c | ab,bc | head,right,destination | 1,3 |
|
||||
| b | d | bc,cd | head,left,destination | 3,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,ferry,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,ferry,cycling,cycling |
|
||||
| c | a | bc,ab,ab | ferry,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,ferry,ferry |
|
||||
| a | c | ab,bc,bc | cycling,ferry,ferry |
|
||||
| b | d | bc,cd,cd | ferry,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when using a train
|
||||
Given the node map
|
||||
@@ -42,13 +36,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,4,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,4,1 |
|
||||
| c | a | bc,ab | head,left,destination | 4,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,4 |
|
||||
| a | c | ab,bc | head,right,destination | 1,4 |
|
||||
| b | d | bc,cd | head,left,destination | 4,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,train,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,train,cycling,cycling |
|
||||
| c | a | bc,ab,ab | train,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,train,train |
|
||||
| a | c | ab,bc,bc | cycling,train,train |
|
||||
| b | d | bc,cd,cd | train,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing bike against oneways
|
||||
Given the node map
|
||||
@@ -62,13 +56,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination | 1,1,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,straight,destination | 1,1 |
|
||||
| b | d | bc,cd | head,straight,destination | 1,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| a | c | ab,bc,bc | cycling,cycling,cycling |
|
||||
| b | d | bc,cd,cd | cycling,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain streets
|
||||
Given the node map
|
||||
@@ -82,13 +76,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain areas
|
||||
Given the node map
|
||||
@@ -102,13 +96,13 @@ Feature: Bike - Mode flag
|
||||
| df | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | f | ab,bcd,df | 1,2,1 |
|
||||
| f | a | df,bcd,ab | 1,2,1 |
|
||||
| d | a | bcd,ab | 2,1 |
|
||||
| f | b | df,bcd | 1,2 |
|
||||
| a | d | ab,bcd | 1,2 |
|
||||
| b | f | bcd,df | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | f | ab,bcd,df,df | cycling,pushing bike,cycling,cycling |
|
||||
| f | a | df,bcd,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| d | a | bcd,ab,ab | pushing bike,cycling,cycling |
|
||||
| f | b | df,bcd,bcd | cycling,pushing bike,pushing bike |
|
||||
| a | d | ab,bcd,bcd | cycling,pushing bike,pushing bike |
|
||||
| b | f | bcd,df,df | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on steps
|
||||
Given the node map
|
||||
@@ -122,13 +116,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when bicycle=dismount
|
||||
Given the node map
|
||||
@@ -142,13 +136,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on forward oneway
|
||||
Given the node map
|
||||
@@ -159,9 +153,9 @@ Feature: Bike - Mode flag
|
||||
| ab | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 1 |
|
||||
| b | a | ab | 2 |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab,ab | cycling,cycling |
|
||||
| b | a | ab,ab | pushing bike,pushing bike |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on reverse oneway
|
||||
Given the node map
|
||||
@@ -172,6 +166,6 @@ Feature: Bike - Mode flag
|
||||
| ab | -1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 2 |
|
||||
| b | a | ab | 1 |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab,ab | pushing bike,pushing bike |
|
||||
| b | a | ab,ab | cycling,cycling |
|
||||
|
||||
@@ -15,8 +15,8 @@ Feature: Bike - Street names in instructions
|
||||
| bc | Your Way |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way,Your Way |
|
||||
|
||||
@unnamed
|
||||
Scenario: Bike - Use way type to describe unnamed ways
|
||||
@@ -29,5 +29,5 @@ Feature: Bike - Street names in instructions
|
||||
| bcd | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | {highway:cycleway},{highway:track} |
|
||||
| from | to | route |
|
||||
| a | d | {highway:cycleway},{highway:track},{highway:track} |
|
||||
|
||||
@@ -29,9 +29,9 @@ Feature: Bike - Oneway streets
|
||||
| da | | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| b | a | bc,cd,da,da |
|
||||
|
||||
Scenario: Bike - Handle various oneway tag values
|
||||
Then routability should be
|
||||
@@ -124,5 +124,5 @@ Feature: Bike - Oneway streets
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc |
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: Bike - Accessability of different way types
|
||||
| primary | -1 | foot | bike |
|
||||
| pedestrian | -1 | foot | foot |
|
||||
|
||||
@square
|
||||
@square
|
||||
Scenario: Bike - Push bikes on pedestrian areas
|
||||
Given the node map
|
||||
| x | |
|
||||
@@ -46,14 +46,14 @@ Feature: Bike - Accessability of different way types
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
Scenario: Bike - Pushing bikes on ways with foot=yes
|
||||
Then routability should be
|
||||
@@ -62,8 +62,7 @@ Feature: Bike - Accessability of different way types
|
||||
| motorway | yes | foot | |
|
||||
| runway | | | |
|
||||
| runway | yes | foot | foot |
|
||||
|
||||
@todo
|
||||
|
||||
Scenario: Bike - Pushing bikes on ways with foot=yes in one direction
|
||||
Then routability should be
|
||||
| highway | foot:forward | foot:backward | forw | backw |
|
||||
@@ -72,20 +71,20 @@ Feature: Bike - Accessability of different way types
|
||||
| motorway | | yes | | foot |
|
||||
|
||||
@construction
|
||||
Scenario: Bike - Don't allow routing on ways still under construction
|
||||
Scenario: Bike - Don't allow routing on ways still under construction
|
||||
Then routability should be
|
||||
| highway | foot | bicycle | bothw |
|
||||
| primary | | | x |
|
||||
| construction | | | |
|
||||
| construction | yes | | |
|
||||
| construction | | yes | |
|
||||
|
||||
|
||||
@roundabout
|
||||
Scenario: Bike - Don't push bikes against oneway flow on roundabouts
|
||||
Then routability should be
|
||||
| junction | forw | backw |
|
||||
| roundabout | x | |
|
||||
|
||||
|
||||
Scenario: Bike - Instructions when pushing bike on oneways
|
||||
Given the node map
|
||||
| a | b | |
|
||||
@@ -98,13 +97,12 @@ Feature: Bike - Accessability of different way types
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination |
|
||||
| d | a | cd,bc,ab | head,right,left,destination |
|
||||
| c | a | bc,ab | head,left,destination |
|
||||
| d | b | cd,bc | head,right,destination |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
|
||||
Given the node map
|
||||
| a | b | |
|
||||
@@ -117,8 +115,8 @@ Feature: Bike - Accessability of different way types
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | ab,bc,cd | head,right,left,destination |
|
||||
| d | a | cd,bc,ab | head,right,left,destination |
|
||||
| c | a | bc,ab | head,left,destination |
|
||||
| d | b | cd,bc | head,right,destination |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
|
||||
@@ -13,8 +13,8 @@ Feature: Bike - Way ref
|
||||
| ab | Utopia Drive | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive / E7 |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive / E7,Utopia Drive / E7 |
|
||||
|
||||
Scenario: Bike - Way with only ref
|
||||
Given the node map
|
||||
@@ -26,7 +26,7 @@ Feature: Bike - Way ref
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | E7 |
|
||||
| a | b | E7,E7 |
|
||||
|
||||
Scenario: Bike - Way with only name
|
||||
Given the node map
|
||||
@@ -37,5 +37,5 @@ Feature: Bike - Way ref
|
||||
| ab | Utopia Drive |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive,Utopia Drive |
|
||||
|
||||
@@ -25,10 +25,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - No right turn
|
||||
@@ -49,10 +49,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | ej | j | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - No u-turn
|
||||
@@ -73,10 +73,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - Handle any no_* relation
|
||||
@@ -97,10 +97,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | no_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Bike - Only left turn
|
||||
@@ -121,10 +121,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | only_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Bike - Only right turn
|
||||
@@ -145,10 +145,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | ej | j | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Bike - Only straight on
|
||||
@@ -169,10 +169,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | nj | j | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - Handle any only_* restriction
|
||||
@@ -193,10 +193,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | nj | j | only_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@except
|
||||
Scenario: Bike - Except tag and on no_ restrictions
|
||||
@@ -222,11 +222,11 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | dj | j | no_right_turn | bicycle |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| s | c | sj,cj |
|
||||
| s | d | sj,dj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
| s | c | sj,cj,cj |
|
||||
| s | d | sj,dj,dj |
|
||||
|
||||
@except
|
||||
Scenario: Bike - Except tag and on only_ restrictions
|
||||
@@ -246,9 +246,9 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | aj | j | only_straight_on | bicycle |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
|
||||
@except
|
||||
Scenario: Bike - Multiple except tag values
|
||||
@@ -280,10 +280,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | jf | j | no_straight_on | bicycle, bus |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,ja |
|
||||
| s | b | sj,jb |
|
||||
| s | c | sj,jc |
|
||||
| s | d | sj,jd |
|
||||
| s | e | sj,je |
|
||||
| s | f | sj,jf |
|
||||
| from | to | route |
|
||||
| s | a | sj,ja,ja |
|
||||
| s | b | sj,jb,jb |
|
||||
| s | c | sj,jc,jc |
|
||||
| s | d | sj,jd,jd |
|
||||
| s | e | sj,je,je |
|
||||
| s | f | sj,jf,jf |
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
@routing @bicycle @roundabout @instruction
|
||||
Feature: Roundabout Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bicycle - Roundabout instructions
|
||||
Given the node map
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
| s | a | | c | u |
|
||||
| | | b | | |
|
||||
| | | t | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| sa | |
|
||||
| tb | |
|
||||
| uc | |
|
||||
| vd | |
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
||||
@@ -31,7 +31,7 @@ Feature: Bike - Stop areas for public transport
|
||||
| public_transport | stop_area | c | st |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | abcd |
|
||||
| s | t | st |
|
||||
| s | d | /st,.+,abcd/ |
|
||||
| from | to | route |
|
||||
| a | d | abcd,abcd |
|
||||
| s | t | st,st |
|
||||
| s | d | /st,.+,abcd/,abcd/ |
|
||||
|
||||
@@ -23,11 +23,11 @@ Feature: Turn Penalties
|
||||
| jg |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time | distance |
|
||||
| s | a | sj,ja | 39s +-1 | 242m +-1 |
|
||||
| s | b | sj,jb | 30s +-1 | 200m +-1 |
|
||||
| s | c | sj,jc | 29s +-1 | 242m +-1 |
|
||||
| s | d | sj,jd | 20s +-1 | 200m +-1 |
|
||||
| s | e | sj,je | 29s +-1 | 242m +-1 |
|
||||
| s | f | sj,jf | 30s +-1 | 200m +-1 |
|
||||
| s | g | sj,jg | 39s +-1 | 242m +-1 |
|
||||
| from | to | route | time | distance |
|
||||
| s | a | sj,ja,ja | 39s +-1 | 242m +-1 |
|
||||
| s | b | sj,jb,jb | 30s +-1 | 200m +-1 |
|
||||
| s | c | sj,jc,jc | 29s +-1 | 242m +-1 |
|
||||
| s | d | sj,jd,jd | 20s +-1 | 200m +-1 |
|
||||
| s | e | sj,je,je | 29s +-1 | 242m +-1 |
|
||||
| s | f | sj,jf,jf | 30s +-1 | 200m +-1 |
|
||||
| s | g | sj,jg,jg | 39s +-1 | 242m +-1 |
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Car - Restricted access
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Access tag hierachy on ways
|
||||
Scenario: Car - Access tag hierarchy on ways
|
||||
Then routability should be
|
||||
| access | vehicle | motor_vehicle | motorcar | bothw |
|
||||
| | | | | x |
|
||||
@@ -30,7 +30,7 @@ Feature: Car - Restricted access
|
||||
| | | no | yes | x |
|
||||
| | | yes | no | |
|
||||
|
||||
Scenario: Car - Access tag hierachy on nodes
|
||||
Scenario: Car - Access tag hierarchy on nodes
|
||||
Then routability should be
|
||||
| node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw |
|
||||
| | | | | x |
|
||||
@@ -94,6 +94,7 @@ Feature: Car - Restricted access
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| psv | |
|
||||
| delivery | |
|
||||
| some_tag | x |
|
||||
|
||||
|
||||
@@ -108,6 +109,7 @@ Feature: Car - Restricted access
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| psv | |
|
||||
| delivery | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Car - Access tags on both node and way
|
||||
|
||||
@@ -17,8 +17,8 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 47 km/h +- 1 |
|
||||
| b | c | bc | 47 km/h +- 1 |
|
||||
| a | b | ab,ab | 47 km/h +- 1 |
|
||||
| b | c | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites forward maxspeed
|
||||
Given the node map
|
||||
@@ -31,8 +31,8 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 47 km/h +- 1 |
|
||||
| b | c | bc | 47 km/h +- 1 |
|
||||
| a | b | ab,ab | 47 km/h +- 1 |
|
||||
| b | c | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites backwards maxspeed
|
||||
Given the node map
|
||||
@@ -45,8 +45,23 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| b | a | ab | 47 km/h +- 1 |
|
||||
| c | b | bc | 47 km/h +- 1 |
|
||||
| b | a | ab,ab | 47 km/h +- 1 |
|
||||
| c | b | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites backwards maxspeed
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
|
||||
| ab | residential | | 45 |
|
||||
| bc | residential | 90 | 45 |
|
||||
| cd | residential | | 45 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| c | b | bc,bc | 47 km/h +- 1 |
|
||||
| d | c | cd,cd | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Directional advisory speeds play nice with eachother
|
||||
Given the node map
|
||||
@@ -59,9 +74,9 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 47 km/h +- 1 |
|
||||
| b | a | ab | 59 km/h +- 1 |
|
||||
| b | c | bc | 59 km/h +- 1 |
|
||||
| c | b | bc | 47 km/h +- 1 |
|
||||
| a | b | ab,ab | 47 km/h +- 1 |
|
||||
| b | a | ab,ab | 59 km/h +- 1 |
|
||||
| b | c | bc,bc | 59 km/h +- 1 |
|
||||
| c | b | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
|
||||
|
||||
+15
-15
@@ -1,5 +1,5 @@
|
||||
@routing @car @bridge
|
||||
Feature: Car - Handle movable bridge
|
||||
Feature: Car - Handle driving
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
@@ -17,15 +17,15 @@ Feature: Car - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,3,1 |
|
||||
| b | f | abc,cde,efg | 1,3,1 |
|
||||
| e | c | cde | 3 |
|
||||
| e | b | cde,abc | 3,1 |
|
||||
| e | a | cde,abc | 3,1 |
|
||||
| c | e | cde | 3 |
|
||||
| c | f | cde,efg | 3,1 |
|
||||
| c | g | cde,efg | 3,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving |
|
||||
| e | c | cde,cde | driving,driving |
|
||||
| e | b | cde,abc,abc | driving,driving,driving |
|
||||
| e | a | cde,abc,abc | driving,driving,driving |
|
||||
| c | e | cde,cde | driving,driving |
|
||||
| c | f | cde,efg,efg | driving,driving,driving |
|
||||
| c | g | cde,efg,efg | driving,driving,driving |
|
||||
|
||||
Scenario: Car - Properly handle durations
|
||||
Given the node map
|
||||
@@ -40,8 +40,8 @@ Feature: Car - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,3,1 | 7 km/h |
|
||||
| b | f | abc,cde,efg | 1,3,1 | 5 km/h |
|
||||
| c | e | cde | 3 | 2 km/h |
|
||||
| e | c | cde | 3 | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 7 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 5 km/h |
|
||||
| c | e | cde,cde | driving,driving | 2 km/h |
|
||||
| e | c | cde,cde | driving,driving | 2 km/h |
|
||||
|
||||
@@ -19,15 +19,15 @@ Feature: Car - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bcd |
|
||||
| a | d | ab,bcd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,bcd |
|
||||
| e | b | de,bcd |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bcd,bcd |
|
||||
| a | d | ab,bcd,bcd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,bcd,bcd |
|
||||
| e | b | de,bcd,bcd |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Car - Destination only street
|
||||
Given the node map
|
||||
@@ -45,15 +45,15 @@ Feature: Car - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bc |
|
||||
| a | d | ab,bc,cd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,dc |
|
||||
| e | b | de,dc,bc |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bc,bc |
|
||||
| a | d | ab,bc,cd,cd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,cd,cd |
|
||||
| e | b | de,cd,bc,bc |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Car - Routing inside a destination only area
|
||||
Given the node map
|
||||
@@ -70,8 +70,8 @@ Feature: Car - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de |
|
||||
| e | a | de,cd,bc,ab |
|
||||
| b | d | bc,cd |
|
||||
| d | b | cd,bc |
|
||||
| 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 |
|
||||
|
||||
+19
-19
@@ -17,15 +17,15 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,2,1 |
|
||||
| b | f | abc,cde,efg | 1,2,1 |
|
||||
| e | c | cde | 2 |
|
||||
| e | b | cde,abc | 2,1 |
|
||||
| e | a | cde,abc | 2,1 |
|
||||
| c | e | cde | 2 |
|
||||
| c | f | cde,efg | 2,1 |
|
||||
| c | g | cde,efg | 2,1 |
|
||||
| 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 |
|
||||
|
||||
Scenario: Car - Properly handle simple durations
|
||||
Given the node map
|
||||
@@ -40,11 +40,11 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,2,1 | 25 km/h |
|
||||
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
|
||||
| c | e | cde | 2 | 12 km/h |
|
||||
| e | c | cde | 2 | 12 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 25 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 20 km/h |
|
||||
| c | e | cde,cde | ferry,ferry | 12 km/h |
|
||||
| e | c | cde,cde | ferry,ferry | 12 km/h |
|
||||
|
||||
Scenario: Car - Properly handle ISO 8601 durations
|
||||
Given the node map
|
||||
@@ -59,8 +59,8 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,2,1 | 25 km/h |
|
||||
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
|
||||
| c | e | cde | 2 | 12 km/h |
|
||||
| e | c | cde | 2 | 12 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 25 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 20 km/h |
|
||||
| c | e | cde,cde | ferry,ferry | 12 km/h |
|
||||
| e | c | cde,cde | ferry,ferry | 12 km/h |
|
||||
|
||||
+15
-15
@@ -24,9 +24,9 @@ Feature: Car - Speed on links
|
||||
| dy | unclassified |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use trunk_link when reasonable
|
||||
Given the node map
|
||||
@@ -44,9 +44,9 @@ Feature: Car - Speed on links
|
||||
| fd | trunk |
|
||||
| dy | unclassified |
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use primary_link when reasonable
|
||||
Given the node map
|
||||
@@ -64,9 +64,9 @@ Feature: Car - Speed on links
|
||||
| fd | primary |
|
||||
| dy | unclassified |
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use secondary_link when reasonable
|
||||
Given the node map
|
||||
@@ -85,9 +85,9 @@ Feature: Car - Speed on links
|
||||
| dy | unclassified |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use tertiary_link when reasonable
|
||||
Given the node map
|
||||
@@ -106,6 +106,6 @@ Feature: Car - Speed on links
|
||||
| dy | unclassified |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
@@ -21,12 +21,12 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 78 km/h |
|
||||
| b | c | bc | 59 km/h +- 1 |
|
||||
| c | d | cd | 51 km/h |
|
||||
| d | e | de | 75 km/h |
|
||||
| e | f | ef | 90 km/h |
|
||||
| f | g | fg | 106 km/h |
|
||||
| a | b | ab,ab | 79 km/h |
|
||||
| b | c | bc,bc | 59 km/h +- 1 |
|
||||
| c | d | cd,cd | 51 km/h |
|
||||
| d | e | de,de | 75 km/h |
|
||||
| e | f | ef,ef | 91 km/h |
|
||||
| f | g | fg,fg | 107 km/h |
|
||||
|
||||
Scenario: Car - Do not ignore maxspeed when higher than way speed
|
||||
Given the node map
|
||||
@@ -40,9 +40,9 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 31 km/h |
|
||||
| b | c | bc | 83 km/h +- 1 |
|
||||
| c | d | cd | 51 km/h |
|
||||
| a | b | ab,ab | 31 km/h |
|
||||
| b | c | bc,bc | 83 km/h +- 1 |
|
||||
| c | d | cd,cd | 51 km/h |
|
||||
|
||||
Scenario: Car - Forward/backward maxspeed
|
||||
Given a grid size of 100 meters
|
||||
|
||||
@@ -15,13 +15,13 @@ Feature: Car - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | driving,ferry,driving,driving |
|
||||
| d | a | cd,bc,ab,ab | driving,ferry,driving,driving |
|
||||
| c | a | bc,ab,ab | ferry,driving,driving |
|
||||
| d | b | cd,bc,bc | driving,ferry,ferry |
|
||||
| a | c | ab,bc,bc | driving,ferry,ferry |
|
||||
| b | d | bc,cd,cd | ferry,driving,driving |
|
||||
|
||||
Scenario: Car - Snapping when using a ferry
|
||||
Given the node map
|
||||
@@ -34,7 +34,7 @@ Feature: Car - Mode flag
|
||||
| ef | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes | time |
|
||||
| c | d | bcde | head,destination | 2 | 600s |
|
||||
| from | to | route | modes | time |
|
||||
| c | d | bcde,bcde | ferry,ferry | 600s |
|
||||
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ Feature: Car - Street names in instructions
|
||||
| bc | Your Way | A1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way (A1) |
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way (A1),Your Way (A1) |
|
||||
|
||||
@todo
|
||||
Scenario: Car - Use way type to describe unnamed ways
|
||||
@@ -29,5 +29,5 @@ Feature: Car - Street names in instructions
|
||||
| bcd | residential | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | tertiary,residential |
|
||||
| from | to | route |
|
||||
| a | c | tertiary,residential,residential |
|
||||
|
||||
@@ -44,9 +44,9 @@ Feature: Car - Oneway streets
|
||||
| da | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| b | a | bc,cd,da,da |
|
||||
|
||||
Scenario: Car - Cars should not be affected by bicycle tags
|
||||
Then routability should be
|
||||
@@ -75,5 +75,5 @@ Feature: Car - Oneway streets
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc |
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
|
||||
@@ -25,10 +25,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No straight on
|
||||
@@ -55,8 +55,8 @@ Feature: Car - Turn restrictions
|
||||
| restriction | bj | jd | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | av,vw,wx,xy,yz,ze |
|
||||
| from | to | route |
|
||||
| a | e | av,vw,wx,xy,yz,ze,ze |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No right turn
|
||||
@@ -77,10 +77,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | ej | j | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No u-turn
|
||||
@@ -101,10 +101,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - Handle any no_* relation
|
||||
@@ -125,10 +125,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | no_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only left turn
|
||||
@@ -149,10 +149,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | only_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | |
|
||||
| s | e | |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only right turn
|
||||
@@ -173,10 +173,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | ej | j | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only straight on
|
||||
@@ -197,10 +197,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - Handle any only_* restriction
|
||||
@@ -221,10 +221,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | only_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | |
|
||||
|
||||
@specific
|
||||
Scenario: Car - :hgv-qualified on a standard turn restriction
|
||||
@@ -245,10 +245,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@specific
|
||||
Scenario: Car - :motorcar-qualified on a standard turn restriction
|
||||
@@ -269,10 +269,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@except
|
||||
Scenario: Car - Except tag and on no_ restrictions
|
||||
@@ -298,11 +298,11 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | dj | j | no_right_turn | motorcar |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | |
|
||||
| s | c | |
|
||||
| s | d | sj,dj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | |
|
||||
| s | c | |
|
||||
| s | d | sj,dj,dj |
|
||||
|
||||
@except
|
||||
Scenario: Car - Except tag and on only_ restrictions
|
||||
@@ -322,9 +322,9 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | aj | j | only_straight_on | motorcar |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
|
||||
@except
|
||||
Scenario: Car - Several only_ restrictions at the same segment
|
||||
@@ -356,10 +356,10 @@ Feature: Car - Turn restrictions
|
||||
| restriction | da | ae | a | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | f | ae,xa,bx,fb |
|
||||
| c | f | dc,da,ae,ge,hg,hg,ge,ae,xa,bx,fb |
|
||||
| d | f | da,ae,ge,hg,hg,ge,ae,xa,bx,fb |
|
||||
| from | to | route |
|
||||
| e | f | ae,xa,bx,fb,fb |
|
||||
| c | f | dc,da,ae,ge,hg,hg,ge,ae,xa,bx,fb,fb |
|
||||
| d | f | da,ae,ge,hg,hg,ge,ae,xa,bx,fb,fb |
|
||||
|
||||
@except
|
||||
Scenario: Car - two only_ restrictions share same to-way
|
||||
@@ -391,9 +391,9 @@ Feature: Car - Turn restrictions
|
||||
| restriction | by | xy | y | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb |
|
||||
| b | a | yb,xy,ax |
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb,yb |
|
||||
| b | a | yb,xy,ax,ax |
|
||||
|
||||
@except
|
||||
Scenario: Car - two only_ restrictions share same from-way
|
||||
@@ -425,7 +425,7 @@ Feature: Car - Turn restrictions
|
||||
| restriction | xy | yb | y | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb |
|
||||
| b | a | yb,xy,ax |
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb,yb |
|
||||
| b | a | yb,xy,ax,ax |
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
@routing @car @roundabout @instruction
|
||||
Feature: Roundabout Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Roundabout instructions
|
||||
Given the node map
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
| s | a | | c | u |
|
||||
| | | b | | |
|
||||
| | | t | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| sa | |
|
||||
| tb | |
|
||||
| uc | |
|
||||
| vd | |
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
||||
@@ -19,13 +19,13 @@ Feature: Car - Handle ferryshuttle train routes
|
||||
| gh | primary | | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | f | abc,cde,ef |
|
||||
| b | f | abc,cde,ef |
|
||||
| e | c | cde |
|
||||
| e | b | cde,abc |
|
||||
| e | a | cde,abc |
|
||||
| c | e | cde |
|
||||
| c | f | cde,ef |
|
||||
| f | g | |
|
||||
| g | h | gh |
|
||||
| from | to | route |
|
||||
| a | f | abc,cde,ef,ef |
|
||||
| b | f | abc,cde,ef,ef |
|
||||
| e | c | cde,cde |
|
||||
| e | b | cde,abc,abc |
|
||||
| e | a | cde,abc,abc |
|
||||
| c | e | cde,cde |
|
||||
| c | f | cde,ef,ef |
|
||||
| f | g | |
|
||||
| g | h | gh,gh |
|
||||
|
||||
@@ -36,12 +36,12 @@ Feature: Traffic - speeds
|
||||
Given the extract extra arguments "--generate-edge-lookup"
|
||||
Given the contract extra arguments "--segment-speed-file speeds.csv"
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 27 km/h |
|
||||
| a | c | ab,bc | 27 km/h |
|
||||
| b | c | bc | 27 km/h |
|
||||
| a | d | ad | 27 km/h |
|
||||
| d | c | dc | 36 km/h |
|
||||
| g | b | ab | 27 km/h |
|
||||
| a | g | ab | 27 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 27 km/h |
|
||||
| a | c | ab,bc,bc | 27 km/h |
|
||||
| b | c | bc,bc | 27 km/h |
|
||||
| a | d | ad,ad | 27 km/h |
|
||||
| d | c | dc,dc | 36 km/h |
|
||||
| g | b | ab,ab | 27 km/h |
|
||||
| a | g | ab,ab | 27 km/h |
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Foot - Access tags on ways
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Access tag hierachy on ways
|
||||
Scenario: Foot - Access tag hierarchy on ways
|
||||
Then routability should be
|
||||
| highway | access | foot | bothw |
|
||||
| footway | | | x |
|
||||
@@ -52,6 +52,7 @@ Feature: Foot - Access tags on ways
|
||||
| private | | |
|
||||
| agricultural | | |
|
||||
| forestry | | |
|
||||
| delivery | | |
|
||||
| | yes | x |
|
||||
| | permissive | x |
|
||||
| | designated | x |
|
||||
@@ -60,6 +61,7 @@ Feature: Foot - Access tags on ways
|
||||
| | private | |
|
||||
| | agricultural | |
|
||||
| | forestry | |
|
||||
| | delivery | |
|
||||
|
||||
Scenario: Foot - Access tags on both node and way
|
||||
Then routability should be
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Foot - Access tags on nodes
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Access tag hierachy on nodes
|
||||
Scenario: Foot - Access tag hierarchy on nodes
|
||||
Then routability should be
|
||||
| node/access | node/foot | bothw |
|
||||
| | | x |
|
||||
@@ -40,6 +40,7 @@ Feature: Foot - Access tags on nodes
|
||||
| private | | |
|
||||
| agricultural | | |
|
||||
| forestry | | |
|
||||
| delivery | | |
|
||||
| no | yes | x |
|
||||
| no | permissive | x |
|
||||
| no | designated | x |
|
||||
@@ -48,3 +49,4 @@ Feature: Foot - Access tags on nodes
|
||||
| yes | private | |
|
||||
| yes | agricultural | |
|
||||
| yes | forestry | |
|
||||
| yes | delivery | |
|
||||
|
||||
+39
-39
@@ -17,15 +17,15 @@ Feature: Foot - Squares and other areas
|
||||
| abcda | yes | residential |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
@building
|
||||
Scenario: Foot - Don't route on buildings
|
||||
@@ -41,14 +41,14 @@ Feature: Foot - Squares and other areas
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | xa |
|
||||
| a | d | xa |
|
||||
| b | c | xa |
|
||||
| c | b | xa |
|
||||
| c | d | xa |
|
||||
| d | c | xa |
|
||||
| d | a | xa |
|
||||
| a | d | xa |
|
||||
| a | b | xa,xa |
|
||||
| a | d | xa,xa |
|
||||
| b | c | xa,xa |
|
||||
| c | b | xa,xa |
|
||||
| c | d | xa,xa |
|
||||
| d | c | xa,xa |
|
||||
| d | a | xa,xa |
|
||||
| a | d | xa,xa |
|
||||
|
||||
@parking
|
||||
Scenario: Foot - parking areas
|
||||
@@ -65,17 +65,17 @@ Feature: Foot - Squares and other areas
|
||||
| abcda | (nil) | parking |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by,by |
|
||||
| y | x | by,abcda,xa,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
@train @platform
|
||||
Scenario: Foot - railway platforms
|
||||
@@ -90,14 +90,14 @@ Feature: Foot - Squares and other areas
|
||||
| abcda | (nil) | platform |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by,by |
|
||||
| y | x | by,abcda,xa,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
+12
-12
@@ -17,15 +17,15 @@ Feature: Foot - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,2,1 |
|
||||
| b | f | abc,cde,efg | 1,2,1 |
|
||||
| e | c | cde | 2 |
|
||||
| e | b | cde,abc | 2,1 |
|
||||
| e | a | cde,abc | 2,1 |
|
||||
| c | e | cde | 2 |
|
||||
| c | f | cde,efg | 2,1 |
|
||||
| c | g | cde,efg | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | walking,ferry,walking,walking |
|
||||
| b | f | abc,cde,efg,efg | walking,ferry,walking,walking |
|
||||
| e | c | cde,cde | ferry,ferry |
|
||||
| e | b | cde,abc,abc | ferry,walking,walking |
|
||||
| e | a | cde,abc,abc | ferry,walking,walking |
|
||||
| c | e | cde,cde | ferry,ferry |
|
||||
| c | f | cde,efg,efg | ferry,walking,walking |
|
||||
| c | g | cde,efg,efg | ferry,walking,walking |
|
||||
|
||||
Scenario: Foot - Ferry duration, single node
|
||||
Given the node map
|
||||
@@ -58,6 +58,6 @@ Feature: Foot - Handle ferry routes
|
||||
| abcd | | ferry | yes | 1:00 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | d | abcd | 3600s +-10 |
|
||||
| d | a | abcd | 3600s +-10 |
|
||||
| from | to | route | time |
|
||||
| a | d | abcd,abcd | 3600s +-10 |
|
||||
| d | a | abcd,abcd | 3600s +-10 |
|
||||
|
||||
@@ -15,8 +15,8 @@ Feature: Foot - Street names in instructions
|
||||
| bc | Your Way |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way,Your Way |
|
||||
|
||||
@unnamed
|
||||
Scenario: Foot - Use way type to describe unnamed ways
|
||||
@@ -29,5 +29,5 @@ Feature: Foot - Street names in instructions
|
||||
| bcd | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | {highway:footway},{highway:track} |
|
||||
| from | to | route |
|
||||
| a | d | {highway:footway},{highway:track},{highway:track} |
|
||||
|
||||
@@ -13,8 +13,8 @@ Feature: Foot - Way ref
|
||||
| ab | Utopia Drive | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive / E7 |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive / E7,Utopia Drive / E7 |
|
||||
|
||||
Scenario: Foot - Way with only ref
|
||||
Given the node map
|
||||
@@ -26,7 +26,7 @@ Feature: Foot - Way ref
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | E7 |
|
||||
| a | b | E7,E7 |
|
||||
|
||||
Scenario: Foot - Way with only name
|
||||
Given the node map
|
||||
@@ -37,5 +37,5 @@ Feature: Foot - Way ref
|
||||
| ab | Utopia Drive |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive,Utopia Drive |
|
||||
|
||||
@@ -24,10 +24,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | wj | j | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Foot - No right turn
|
||||
@@ -48,10 +48,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | ej | j | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Foot - No u-turn
|
||||
@@ -72,10 +72,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | wj | j | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Foot - Handle any no_* relation
|
||||
@@ -96,10 +96,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | wj | j | no_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Foot - Only left turn
|
||||
@@ -120,10 +120,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | wj | j | only_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Foot - Only right turn
|
||||
@@ -144,10 +144,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | ej | j | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Foot - Only straight on
|
||||
@@ -168,10 +168,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | nj | j | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Foot - Handle any only_* restriction
|
||||
@@ -192,10 +192,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | nj | j | only_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@except
|
||||
Scenario: Foot - Except tag and on no_ restrictions
|
||||
@@ -221,11 +221,11 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | dj | j | no_right_turn | foot |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| s | c | sj,cj |
|
||||
| s | d | sj,dj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
| s | c | sj,cj,cj |
|
||||
| s | d | sj,dj,dj |
|
||||
|
||||
@except
|
||||
Scenario: Foot - Except tag and on only_ restrictions
|
||||
@@ -245,9 +245,9 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | aj | j | only_straight_on | foot |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
|
||||
@except
|
||||
Scenario: Foot - Multiple except tag values
|
||||
@@ -279,10 +279,10 @@ Feature: Foot - Turn restrictions
|
||||
| restriction | sj | jf | j | no_straight_on | foot, bus |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,ja |
|
||||
| s | b | sj,jb |
|
||||
| s | c | sj,jc |
|
||||
| s | d | sj,jd |
|
||||
| s | e | sj,je |
|
||||
| s | f | sj,jf |
|
||||
| from | to | route |
|
||||
| s | a | sj,ja,ja |
|
||||
| s | b | sj,jb,jb |
|
||||
| s | c | sj,jc,jc |
|
||||
| s | d | sj,jd,jd |
|
||||
| s | e | sj,je,je |
|
||||
| s | f | sj,jf,jf |
|
||||
|
||||
@@ -3,12 +3,12 @@ Feature: Roundabout Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
|
||||
@todo
|
||||
Scenario: Foot - Roundabout instructions
|
||||
# You can walk in both directions on a roundabout, bu the normal roundabout instructions don't
|
||||
# make sense when you're going the opposite way around the roundabout.
|
||||
|
||||
|
||||
Given the node map
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
@@ -25,10 +25,10 @@ Feature: Roundabout Instructions
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | depart,roundabout-exit-1,arrive |
|
||||
| s | u | sa,uc | depart,roundabout-exit-2,arrive |
|
||||
| s | v | sa,vd | depart,roundabout-exit-3,arrive |
|
||||
| u | v | uc,vd | depart,roundabout-exit-1,arrive |
|
||||
| u | s | uc,sa | depart,roundabout-exit-2,arrive |
|
||||
| u | t | uc,tb | depart,roundabout-exit-3,arrive |
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
@routing @guidance
|
||||
Feature: Continue Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Road turning left
|
||||
Given the node map
|
||||
| | | c | |
|
||||
| a | | b | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,continue left,arrive |
|
||||
| a,d | abc,bd,bd | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Road turning right
|
||||
Given the node map
|
||||
| a | | b | d |
|
||||
| | | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,continue right,arrive |
|
||||
| a,d | abc,bd,bd | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Road turning slight left
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| | | | | |
|
||||
| a | | b | | |
|
||||
| | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,continue left,arrive |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
|
||||
Scenario: Road turning slight right
|
||||
Given the node map
|
||||
| | | | d | |
|
||||
| a | | b | | |
|
||||
| | | | | |
|
||||
| | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,continue right,arrive |
|
||||
| a,d | abc,bd,bd | depart,turn left,arrive |
|
||||
|
||||
Scenario: Road Loop
|
||||
Given the node map
|
||||
| | | f | | e |
|
||||
| | | | | |
|
||||
| a | | b | g | |
|
||||
| | | | | |
|
||||
| | | c | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcdefb | primary |
|
||||
| bg | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
||||
| a,f | abcdefb,abcdefb,abcdefb | depart,continue left,arrive |
|
||||
| a,d | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
||||
| a,e | abcdefb,abcdefb,abcdefb | depart,continue left,arrive |
|
||||
@@ -0,0 +1,123 @@
|
||||
@routing @guidance
|
||||
Feature: End Of Road Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: End of Road with through street
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | | b |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cbd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cbd,cbd | depart,end of road left,arrive |
|
||||
| a,d | ab,cbd,cbd | depart,end of road right,arrive |
|
||||
|
||||
Scenario: End of Road with three streets
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | | b |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,end of road left,arrive |
|
||||
| a,d | ab,bd,bd | depart,end of road right,arrive |
|
||||
|
||||
Scenario: End of Road with three streets, slightly angled
|
||||
Given the node map
|
||||
| a | | | | | c |
|
||||
| | | | | | b |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,end of road left,arrive |
|
||||
| a,d | ab,bd,bd | depart,end of road right,arrive |
|
||||
|
||||
Scenario: End of Road with three streets, slightly angled
|
||||
Given the node map
|
||||
| | | | | | c |
|
||||
| | | | | | b |
|
||||
| a | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,end of road left,arrive |
|
||||
| a,d | ab,bd,bd | depart,end of road right,arrive |
|
||||
|
||||
Scenario: End of Road with through street, slightly angled
|
||||
Given the node map
|
||||
| a | | | | | c |
|
||||
| | | | | | b |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cbd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cbd,cbd | depart,end of road left,arrive |
|
||||
| a,d | ab,cbd,cbd | depart,end of road right,arrive |
|
||||
|
||||
Scenario: End of Road with through street, slightly angled
|
||||
Given the node map
|
||||
| | | | | | c |
|
||||
| | | | | | b |
|
||||
| a | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cbd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cbd,cbd | depart,end of road left,arrive |
|
||||
| a,d | ab,cbd,cbd | depart,end of road right,arrive |
|
||||
|
||||
Scenario: End of Road with two ramps - prefer ramp over end of road
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | | b |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | motorway_link |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,ramp left,arrive |
|
||||
| a,d | ab,bd,bd | depart,ramp right,arrive |
|
||||
|
||||
@@ -0,0 +1,284 @@
|
||||
@routing @guidance
|
||||
Feature: Fork Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Fork Same Road Class
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Do not fork on link type
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary_link |
|
||||
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| a,d | abc,bd,bd | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Fork in presence of other roads
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | e | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
| eb | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Turning Slight Left
|
||||
Given the node map
|
||||
| | | | | | c |
|
||||
| | | | | | |
|
||||
| a | | b | | | |
|
||||
| | | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Turning Slight Right
|
||||
Given the node map
|
||||
| | | | | c | |
|
||||
| a | | b | | | |
|
||||
| | | | | | |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Do not fork on service
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | residential |
|
||||
| bd | service |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| a,d | abc,bd,bd | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Fork Both Turning Slight Right
|
||||
Given the node map
|
||||
| a | | b | | | |
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Both Turning Slight Left
|
||||
Given the node map
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
| a | | b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Both Turning Slight Right - Unnamed
|
||||
Given the node map
|
||||
| a | | b | | | |
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | primary | |
|
||||
| bc | primary | |
|
||||
| bd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ,, | depart,fork slight left,arrive |
|
||||
| a,d | ,, | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Both Turning Slight Left - Unnamed
|
||||
Given the node map
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
| a | | b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | primary | |
|
||||
| bc | primary | |
|
||||
| bd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ,, | depart,fork slight left,arrive |
|
||||
| a,d | ,, | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Both Turning Very Slightly Right - Unnamed
|
||||
Given the node map
|
||||
| a | | b | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | c | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | primary | |
|
||||
| bc | primary | |
|
||||
| bd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ,, | depart,fork slight left,arrive |
|
||||
| a,d | ,, | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork Both Turning Very Slightly Right - Unnamed Ramps
|
||||
Given the node map
|
||||
| a | | b | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | c | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | motorway_link | |
|
||||
| bc | motorway_link | |
|
||||
| bd | motorway_link | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ,, | depart,fork slight left,arrive |
|
||||
| a,d | ,, | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Non-Fork on complex intersection - left
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | e | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | secondary |
|
||||
| bd | tertiary |
|
||||
| eb | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| a,d | abc,bd,bd | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Non-Fork on complex intersection - right
|
||||
Given the node map
|
||||
| | e | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abd | secondary |
|
||||
| bc | tertiary |
|
||||
| eb | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abd,bc,bc | depart,turn slight left,arrive |
|
||||
| a,d | abd,abd | depart,arrive |
|
||||
|
||||
@pr2275 @bug
|
||||
Scenario: Tripple fork
|
||||
Given the node map
|
||||
| | | | | | | | | c |
|
||||
| a | | b | | d | | | | |
|
||||
| | | | | | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | secondary |
|
||||
| bc | secondary |
|
||||
| bd | secondary |
|
||||
| be | secondary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork straight,arrive |
|
||||
| a,e | ab,be,be | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Tripple fork -- middle obvious
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | d |
|
||||
| | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abd | secondary |
|
||||
| bc | secondary |
|
||||
| be | secondary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abd,bc,bc | depart,turn slight left,arrive |
|
||||
| a,d | abd,abd | depart,arrive |
|
||||
| a,e | abd,be,be | depart,turn slight right,arrive |
|
||||
@@ -0,0 +1,52 @@
|
||||
@routing @guidance
|
||||
Feature: Merging
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Merge on Four Way Intersection
|
||||
Given the node map
|
||||
| d | | |
|
||||
| a | b | c |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| db | primary |
|
||||
| eb | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight right,arrive |
|
||||
| e,c | eb,abc,abc | depart,merge slight left,arrive |
|
||||
|
||||
Scenario: Merge on Three Way Intersection Right
|
||||
Given the node map
|
||||
| d | | |
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight right,arrive |
|
||||
|
||||
Scenario: Merge on Three Way Intersection Right
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight left,arrive |
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
@routing @guidance
|
||||
Feature: Motorway Guidance
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Ramp Exit Right
|
||||
Given the node map
|
||||
| a | b | c | d | e |
|
||||
| | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| bfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,bfg,bfg | depart,ramp slight right,arrive |
|
||||
|
||||
Scenario: Ramp Exit Right Curved Right
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | f | d | |
|
||||
| | | | g | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| bfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,bfg,bfg | depart,ramp right,arrive |
|
||||
|
||||
Scenario: Ramp Exit Right Curved Left
|
||||
Given the node map
|
||||
| | | | | e |
|
||||
| | | | d | g |
|
||||
| a | b | c | f | |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| cfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,cfg,cfg | depart,ramp slight right,arrive |
|
||||
|
||||
|
||||
Scenario: Ramp Exit Left
|
||||
Given the node map
|
||||
| | | | f | g |
|
||||
| a | b | c | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| bfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,bfg,bfg | depart,ramp slight left,arrive |
|
||||
|
||||
Scenario: Ramp Exit Left Curved Left
|
||||
Given the node map
|
||||
| | | | g | e |
|
||||
| | | f | d | |
|
||||
| a | b | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| bfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,bfg,bfg | depart,ramp left,arrive |
|
||||
|
||||
Scenario: Ramp Exit Left Curved Right
|
||||
Given the node map
|
||||
| a | b | c | f | |
|
||||
| | | | d | g |
|
||||
| | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| cfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,cfg,cfg | depart,ramp slight left,arrive |
|
||||
|
||||
Scenario: On Ramp Right
|
||||
Given the node map
|
||||
| a | b | c | d | e |
|
||||
| f | g | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| fgd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| f,e | fgd,abcde,abcde | depart,merge slight left,arrive |
|
||||
|
||||
Scenario: On Ramp Left
|
||||
Given the node map
|
||||
| f | g | | | |
|
||||
| a | b | c | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| fgd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| f,e | fgd,abcde,abcde | depart,merge slight right,arrive |
|
||||
|
||||
Scenario: Highway Fork
|
||||
Given the node map
|
||||
| | | | | d | e |
|
||||
| a | b | c | | | |
|
||||
| | | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| cfg | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde,abcde | depart,fork slight left,arrive |
|
||||
| a,g | abcde,cfg,cfg | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Fork After Ramp
|
||||
Given the node map
|
||||
| | | | | d | e |
|
||||
| a | b | c | | | |
|
||||
| | | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | motorway_link |
|
||||
| cde | motorway |
|
||||
| cfg | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abc,cde,cde | depart,fork slight left,arrive |
|
||||
| a,g | abc,cfg,cfg | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: On And Off Ramp Right
|
||||
Given the node map
|
||||
| a | b | | c | | d | e |
|
||||
| f | g | | | | h | i |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| fgc | motorway_link |
|
||||
| chi | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| f,e | fgc,abcde,abcde | depart,merge slight left,arrive |
|
||||
| a,i | abcde,chi,chi | depart,ramp slight right,arrive |
|
||||
| f,i | fgc,chi,chi | depart,ramp right,arrive |
|
||||
|
||||
Scenario: On And Off Ramp Left
|
||||
Given the node map
|
||||
| f | g | | | | h | i |
|
||||
| a | b | | c | | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| fgc | motorway_link |
|
||||
| chi | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| f,e | fgc,abcde,abcde | depart,merge slight right,arrive |
|
||||
| a,i | abcde,chi,chi | depart,ramp slight left,arrive |
|
||||
| f,i | fgc,chi,chi | depart,ramp left,arrive |
|
||||
|
||||
Scenario: Merging Motorways
|
||||
Given the node map
|
||||
| e | | |
|
||||
| a | b | c |
|
||||
| d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | motorway |
|
||||
| db | motorway |
|
||||
| eb | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight left,arrive |
|
||||
| e,c | eb,abc,abc | depart,merge slight right,arrive |
|
||||
@@ -0,0 +1,135 @@
|
||||
@routing @guidance
|
||||
Feature: New-Name Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Undisturbed name Change
|
||||
Given the node map
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name straight,arrive |
|
||||
|
||||
|
||||
Scenario: Undisturbed Name Change with unannounced Turn Right
|
||||
Given the node map
|
||||
| a | | b | | |
|
||||
| | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name slight right,arrive |
|
||||
|
||||
Scenario: Undisturbed Name Change with unannounced Turn Left
|
||||
Given the node map
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name slight left,arrive |
|
||||
|
||||
Scenario: Disturbed Name Change with Turn
|
||||
Given the node map
|
||||
| a | | b | | |
|
||||
| | d | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| db |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name slight right,arrive |
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Left
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name left,arrive |
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Sharp Left
|
||||
Given the node map
|
||||
| c | | |
|
||||
| a | | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name sharp left,arrive |
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Right
|
||||
Given the node map
|
||||
| a | | b |
|
||||
| | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name right,arrive |
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Sharp Right
|
||||
Given the node map
|
||||
| a | | b |
|
||||
| c | | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name sharp right,arrive |
|
||||
|
||||
|
||||
Scenario: Disturbed Name Change with minor road class
|
||||
Given the node map
|
||||
| a | | b | | d |
|
||||
| | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | residential |
|
||||
| bc | residential |
|
||||
| bd | service |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,new name slight right,arrive |
|
||||
@@ -0,0 +1,229 @@
|
||||
@routing @guidance
|
||||
Feature: Ramp Guidance
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Ramp On Through Street Right
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp right,arrive |
|
||||
|
||||
Scenario: Ramp On Through Street Left
|
||||
Given the node map
|
||||
| | d | |
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp left,arrive |
|
||||
|
||||
Scenario: Ramp On Through Street Left and Right
|
||||
Given the node map
|
||||
| | e | |
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| be | motorway_link |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp right,arrive |
|
||||
| a,e | abc,be,be | depart,ramp left,arrive |
|
||||
|
||||
Scenario: Ramp On Three Way Intersection Right
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | tertiary |
|
||||
| bc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd,bd | depart,ramp right,arrive |
|
||||
|
||||
Scenario: Ramp On Three Way Intersection Right
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | tertiary |
|
||||
| bc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd,bd | depart,ramp right,arrive |
|
||||
|
||||
Scenario: Ramp Off Though Street
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp right,arrive |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
|
||||
Scenario: Straight Ramp Off Turning Though Street
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | b | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp straight,arrive |
|
||||
| a,c | abc,abc,abc | depart,continue left,arrive |
|
||||
|
||||
Scenario: Fork Ramp Off Turning Though Street
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp right,arrive |
|
||||
| a,c | abc,abc,abc | depart,continue left,arrive |
|
||||
|
||||
Scenario: Fork Ramp
|
||||
Given the node map
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | tertiary |
|
||||
| bc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd,bd | depart,ramp right,arrive |
|
||||
| a,c | ab,bc,bc | depart,turn left,arrive |
|
||||
|
||||
Scenario: Fork Slight Ramp
|
||||
Given the node map
|
||||
| | | | c |
|
||||
| a | b | | |
|
||||
| | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | tertiary |
|
||||
| bc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd,bd | depart,ramp slight right,arrive |
|
||||
| a,c | ab,bc,bc | depart,turn slight left,arrive |
|
||||
|
||||
Scenario: Fork Slight Ramp on Through Street
|
||||
Given the node map
|
||||
| | | | c |
|
||||
| a | b | | |
|
||||
| | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp slight right,arrive |
|
||||
| a,c | abc,abc,abc | depart,continue slight left,arrive |
|
||||
|
||||
Scenario: Fork Slight Ramp on Obvious Through Street
|
||||
Given the node map
|
||||
| | | | c |
|
||||
| a | b | | |
|
||||
| | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,ramp slight right,arrive |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
|
||||
Scenario: Two Ramps Joining into common Motorway
|
||||
Given the node map
|
||||
| a | | | |
|
||||
| | | c | d |
|
||||
| b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ac | motorway_link |
|
||||
| bc | motorway_link |
|
||||
| cd | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ac,cd,cd | depart,new name slight left,arrive |
|
||||
| b,d | bc,cd,cd | depart,new name slight right,arrive |
|
||||
|
||||
Scenario: Two Ramps Joining into common Motorway Unnamed
|
||||
Given the node map
|
||||
| a | | | |
|
||||
| | | c | d |
|
||||
| b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ac | motorway_link | |
|
||||
| bc | motorway_link | |
|
||||
| cd | motorway | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | , | depart,arrive |
|
||||
| b,d | , | depart,arrive |
|
||||
@@ -0,0 +1,167 @@
|
||||
@routing @guidance
|
||||
Feature: Rotary
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 30 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,bgecb-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,bgecb-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,bgecb-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,bgecb-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,bgecb-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,bgecb-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,bgecb-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,bgecb-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,bgecb-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,bgecb-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,bgecb-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,bgecb-exit-1,arrive |
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| a,e | ab,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| a,g | ab,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| d,e | cd,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| d,g | cd,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| d,b | cd,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| f,g | ef,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| f,b | ef,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| f,c | ef,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| h,b | gh,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| h,c | gh,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| h,e | gh,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,d | bcegb,cd,cd | depart,bcegb-exit-1,arrive |
|
||||
| b,f | bcegb,ef,ef | depart,bcegb-exit-2,arrive |
|
||||
| b,h | bcegb,gh,gh | depart,bcegb-exit-3,arrive |
|
||||
| c,f | bcegb,ef,ef | depart,bcegb-exit-1,arrive |
|
||||
| c,h | bcegb,gh,gh | depart,bcegb-exit-2,arrive |
|
||||
| c,a | bcegb,ab,ab | depart,bcegb-exit-3,arrive |
|
||||
| e,h | bcegb,gh,gh | depart,bcegb-exit-1,arrive |
|
||||
| e,a | bcegb,ab,ab | depart,bcegb-exit-2,arrive |
|
||||
| e,d | bcegb,cd,cd | depart,bcegb-exit-3,arrive |
|
||||
| g,a | bcegb,ab,ab | depart,bcegb-exit-1,arrive |
|
||||
| g,d | bcegb,cd,cd | depart,bcegb-exit-2,arrive |
|
||||
| g,f | bcegb,ef,ef | depart,bcegb-exit-3,arrive |
|
||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,c | bcegb,bcegb | depart,arrive |
|
||||
| b,e | bcegb,bcegb | depart,arrive |
|
||||
| b,g | bcegb,bcegb | depart,arrive |
|
||||
| c,e | bcegb,bcegb | depart,arrive |
|
||||
| c,g | bcegb,bcegb | depart,arrive |
|
||||
| c,b | bcegb,bcegb | depart,arrive |
|
||||
| e,g | bcegb,bcegb | depart,arrive |
|
||||
| e,b | bcegb,bcegb | depart,arrive |
|
||||
| e,c | bcegb,bcegb | depart,arrive |
|
||||
| g,b | bcegb,bcegb | depart,arrive |
|
||||
| g,c | bcegb,bcegb | depart,arrive |
|
||||
| g,e | bcegb,bcegb | depart,arrive |
|
||||
|
||||
#needs to be adjusted when name-discovery works for entrys
|
||||
Scenario: Mixed Entry and Exit
|
||||
Given the node map
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
| abc | | yes |
|
||||
| def | | yes |
|
||||
| ghi | | yes |
|
||||
| jkl | | yes |
|
||||
| bkheb | roundabout | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,rotary-exit-1,arrive |
|
||||
| a,l | abc,jkl,jkl | depart,bkheb-exit-2,arrive |
|
||||
| a,i | abc,ghi,ghi | depart,bkheb-exit-3,arrive |
|
||||
| a,f | abc,def,def | depart,bkheb-exit-4,arrive |
|
||||
| d,f | def,def,def | depart,rotary-exit-1,arrive |
|
||||
| d,c | def,abc,abc | depart,bkheb-exit-2,arrive |
|
||||
| d,l | def,jkl,jkl | depart,bkheb-exit-3,arrive |
|
||||
| d,i | def,ghi,ghi | depart,bkheb-exit-4,arrive |
|
||||
| g,i | ghi,ghi,ghi | depart,rotary-exit-1,arrive |
|
||||
| g,f | ghi,def,def | depart,bkheb-exit-2,arrive |
|
||||
| g,c | ghi,abc,abc | depart,bkheb-exit-3,arrive |
|
||||
| g,l | ghi,jkl,jkl | depart,bkheb-exit-4,arrive |
|
||||
| j,l | jkl,jkl,jkl | depart,rotary-exit-1,arrive |
|
||||
| j,i | jkl,ghi,ghi | depart,bkheb-exit-2,arrive |
|
||||
| j,f | jkl,def,def | depart,bkheb-exit-3,arrive |
|
||||
| j,c | jkl,abc,abc | depart,bkheb-exit-4,arrive |
|
||||
@@ -0,0 +1,262 @@
|
||||
@routing @guidance
|
||||
Feature: Rotary
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 30 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,bgecb-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,bgecb-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,bgecb-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,bgecb-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,bgecb-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,bgecb-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,bgecb-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,bgecb-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,bgecb-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,bgecb-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,bgecb-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,bgecb-exit-1,arrive |
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| a,e | ab,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| a,g | ab,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| d,e | cd,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| d,g | cd,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| d,b | cd,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| f,g | ef,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| f,b | ef,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| f,c | ef,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| h,b | gh,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| h,c | gh,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
| h,e | gh,bcegb,bcegb | depart,bcegb-exit-undefined,arrive |
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,d | bcegb,cd,cd | depart,bcegb-exit-1,arrive |
|
||||
| b,f | bcegb,ef,ef | depart,bcegb-exit-2,arrive |
|
||||
| b,h | bcegb,gh,gh | depart,bcegb-exit-3,arrive |
|
||||
| c,f | bcegb,ef,ef | depart,bcegb-exit-1,arrive |
|
||||
| c,h | bcegb,gh,gh | depart,bcegb-exit-2,arrive |
|
||||
| c,a | bcegb,ab,ab | depart,bcegb-exit-3,arrive |
|
||||
| e,h | bcegb,gh,gh | depart,bcegb-exit-1,arrive |
|
||||
| e,a | bcegb,ab,ab | depart,bcegb-exit-2,arrive |
|
||||
| e,d | bcegb,cd,cd | depart,bcegb-exit-3,arrive |
|
||||
| g,a | bcegb,ab,ab | depart,bcegb-exit-1,arrive |
|
||||
| g,d | bcegb,cd,cd | depart,bcegb-exit-2,arrive |
|
||||
| g,f | bcegb,ef,ef | depart,bcegb-exit-3,arrive |
|
||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,c | bcegb,bcegb | depart,arrive |
|
||||
| b,e | bcegb,bcegb | depart,arrive |
|
||||
| b,g | bcegb,bcegb | depart,arrive |
|
||||
| c,e | bcegb,bcegb | depart,arrive |
|
||||
| c,g | bcegb,bcegb | depart,arrive |
|
||||
| c,b | bcegb,bcegb | depart,arrive |
|
||||
| e,g | bcegb,bcegb | depart,arrive |
|
||||
| e,b | bcegb,bcegb | depart,arrive |
|
||||
| e,c | bcegb,bcegb | depart,arrive |
|
||||
| g,b | bcegb,bcegb | depart,arrive |
|
||||
| g,c | bcegb,bcegb | depart,arrive |
|
||||
| g,e | bcegb,bcegb | depart,arrive |
|
||||
|
||||
#needs to be adjusted when name-discovery works for entrys
|
||||
Scenario: Mixed Entry and Exit
|
||||
Given the node map
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
| abc | | yes |
|
||||
| def | | yes |
|
||||
| ghi | | yes |
|
||||
| jkl | | yes |
|
||||
| bkheb | roundabout | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,rotary-exit-1,arrive |
|
||||
| a,l | abc,jkl,jkl | depart,bkheb-exit-2,arrive |
|
||||
| a,i | abc,ghi,ghi | depart,bkheb-exit-3,arrive |
|
||||
| a,f | abc,def,def | depart,bkheb-exit-4,arrive |
|
||||
| d,f | def,def,def | depart,rotary-exit-1,arrive |
|
||||
| d,c | def,abc,abc | depart,bkheb-exit-2,arrive |
|
||||
| d,l | def,jkl,jkl | depart,bkheb-exit-3,arrive |
|
||||
| d,i | def,ghi,ghi | depart,bkheb-exit-4,arrive |
|
||||
| g,i | ghi,ghi,ghi | depart,rotary-exit-1,arrive |
|
||||
| g,f | ghi,def,def | depart,bkheb-exit-2,arrive |
|
||||
| g,c | ghi,abc,abc | depart,bkheb-exit-3,arrive |
|
||||
| g,l | ghi,jkl,jkl | depart,bkheb-exit-4,arrive |
|
||||
| j,l | jkl,jkl,jkl | depart,rotary-exit-1,arrive |
|
||||
| j,i | jkl,ghi,ghi | depart,bkheb-exit-2,arrive |
|
||||
| j,f | jkl,def,def | depart,bkheb-exit-3,arrive |
|
||||
| j,c | jkl,abc,abc | depart,bkheb-exit-4,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| b | | |
|
||||
| c | d | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| d | | |
|
||||
| b | c | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| c | | |
|
||||
| d | b | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| f | | |
|
||||
| d | c | e |
|
||||
| | b | |
|
||||
| | a | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| f | | |
|
||||
| d | c | e |
|
||||
| b | | |
|
||||
| a | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
||||
@@ -0,0 +1,166 @@
|
||||
@routing @guidance
|
||||
Feature: Basic Roundabout
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| a,e | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| a,g | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| d,e | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| d,g | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| d,b | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| f,g | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| f,b | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| f,c | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,b | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,c | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,e | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,d | bcegb,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| b,f | bcegb,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| b,h | bcegb,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| c,f | bcegb,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
| c,h | bcegb,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| c,a | bcegb,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| e,h | bcegb,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| e,a | bcegb,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| e,d | bcegb,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| g,a | bcegb,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| g,d | bcegb,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| g,f | bcegb,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,c | bcegb,bcegb | depart,arrive |
|
||||
| b,e | bcegb,bcegb | depart,arrive |
|
||||
| b,g | bcegb,bcegb | depart,arrive |
|
||||
| c,e | bcegb,bcegb | depart,arrive |
|
||||
| c,g | bcegb,bcegb | depart,arrive |
|
||||
| c,b | bcegb,bcegb | depart,arrive |
|
||||
| e,g | bcegb,bcegb | depart,arrive |
|
||||
| e,b | bcegb,bcegb | depart,arrive |
|
||||
| e,c | bcegb,bcegb | depart,arrive |
|
||||
| g,b | bcegb,bcegb | depart,arrive |
|
||||
| g,c | bcegb,bcegb | depart,arrive |
|
||||
| g,e | bcegb,bcegb | depart,arrive |
|
||||
|
||||
Scenario: Mixed Entry and Exit
|
||||
Given the node map
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
| abc | | yes |
|
||||
| def | | yes |
|
||||
| ghi | | yes |
|
||||
| jkl | | yes |
|
||||
| bkheb | roundabout | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,roundabout-exit-1,arrive |
|
||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-2,arrive |
|
||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-3,arrive |
|
||||
| a,f | abc,def,def | depart,roundabout-exit-4,arrive |
|
||||
| d,f | def,def,def | depart,roundabout-exit-1,arrive |
|
||||
| d,c | def,abc,abc | depart,roundabout-exit-2,arrive |
|
||||
| d,l | def,jkl,jkl | depart,roundabout-exit-3,arrive |
|
||||
| d,i | def,ghi,ghi | depart,roundabout-exit-4,arrive |
|
||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-1,arrive |
|
||||
| g,f | ghi,def,def | depart,roundabout-exit-2,arrive |
|
||||
| g,c | ghi,abc,abc | depart,roundabout-exit-3,arrive |
|
||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-4,arrive |
|
||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-1,arrive |
|
||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-2,arrive |
|
||||
| j,f | jkl,def,def | depart,roundabout-exit-3,arrive |
|
||||
| j,c | jkl,abc,abc | depart,roundabout-exit-4,arrive |
|
||||
@@ -0,0 +1,261 @@
|
||||
@routing @guidance
|
||||
Feature: Basic Roundabout
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| a,e | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| a,g | ab,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| d,e | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| d,g | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| d,b | cd,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| f,g | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| f,b | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| f,c | ef,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,b | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,c | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,e | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,d | bcegb,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| b,f | bcegb,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| b,h | bcegb,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| c,f | bcegb,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
| c,h | bcegb,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| c,a | bcegb,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| e,h | bcegb,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| e,a | bcegb,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| e,d | bcegb,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| g,a | bcegb,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| g,d | bcegb,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| g,f | bcegb,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bcegb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,c | bcegb,bcegb | depart,arrive |
|
||||
| b,e | bcegb,bcegb | depart,arrive |
|
||||
| b,g | bcegb,bcegb | depart,arrive |
|
||||
| c,e | bcegb,bcegb | depart,arrive |
|
||||
| c,g | bcegb,bcegb | depart,arrive |
|
||||
| c,b | bcegb,bcegb | depart,arrive |
|
||||
| e,g | bcegb,bcegb | depart,arrive |
|
||||
| e,b | bcegb,bcegb | depart,arrive |
|
||||
| e,c | bcegb,bcegb | depart,arrive |
|
||||
| g,b | bcegb,bcegb | depart,arrive |
|
||||
| g,c | bcegb,bcegb | depart,arrive |
|
||||
| g,e | bcegb,bcegb | depart,arrive |
|
||||
|
||||
Scenario: Mixed Entry and Exit
|
||||
Given the node map
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
| abc | | yes |
|
||||
| def | | yes |
|
||||
| ghi | | yes |
|
||||
| jkl | | yes |
|
||||
| bkheb | roundabout | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc,abc | depart,roundabout-exit-1,arrive |
|
||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-2,arrive |
|
||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-3,arrive |
|
||||
| a,f | abc,def,def | depart,roundabout-exit-4,arrive |
|
||||
| d,f | def,def,def | depart,roundabout-exit-1,arrive |
|
||||
| d,c | def,abc,abc | depart,roundabout-exit-2,arrive |
|
||||
| d,l | def,jkl,jkl | depart,roundabout-exit-3,arrive |
|
||||
| d,i | def,ghi,ghi | depart,roundabout-exit-4,arrive |
|
||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-1,arrive |
|
||||
| g,f | ghi,def,def | depart,roundabout-exit-2,arrive |
|
||||
| g,c | ghi,abc,abc | depart,roundabout-exit-3,arrive |
|
||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-4,arrive |
|
||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-1,arrive |
|
||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-2,arrive |
|
||||
| j,f | jkl,def,def | depart,roundabout-exit-3,arrive |
|
||||
| j,c | jkl,abc,abc | depart,roundabout-exit-4,arrive |
|
||||
|
||||
Scenario: Collinear in X
|
||||
Given the node map
|
||||
| a | b | c | d | f |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in Y
|
||||
Given the node map
|
||||
| a | |
|
||||
| b | |
|
||||
| c | e |
|
||||
| d | |
|
||||
| f | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| b | | |
|
||||
| c | d | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| d | | |
|
||||
| b | c | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| c | | |
|
||||
| d | b | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
@routing @guidance
|
||||
Feature: Suppressed Turns
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Do not announce passing a exit ramp
|
||||
Given the node map
|
||||
| a | b | c | d | e |
|
||||
| | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abcde | motorway |
|
||||
| bfg | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
|
||||
Scenario: Do not announce reference changes
|
||||
Given the node map
|
||||
| a | b | c | d | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | ref |
|
||||
| ab | motorway | highway | A1 |
|
||||
| bc | motorway | highway | A1,A2 |
|
||||
| cd | motorway | highway | A2 |
|
||||
| de | motorway | highway | |
|
||||
| ef | motorway | highway | A1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,f | highway (A1),highway (A1) | depart,arrive |
|
||||
|
||||
|
||||
Scenario: Don't Announce Turn on following major road class -- service
|
||||
Given the node map
|
||||
| a | b | d |
|
||||
| | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | service |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
|
||||
Scenario: Don't Announce Turn on following major road class -- residential
|
||||
Given the node map
|
||||
| a | b | d |
|
||||
| | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | residential |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| a,d | abc,bd,bd | depart,turn straight,arrive |
|
||||
@@ -0,0 +1,813 @@
|
||||
@routing @guidance
|
||||
Feature: Simple Turns
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Four Way Intersection
|
||||
Given the node map
|
||||
| | c | |
|
||||
| a | b | e |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| db | primary |
|
||||
| eb | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive |
|
||||
| a,e | ab,eb,eb | depart,new name straight,arrive |
|
||||
| a,d | ab,db,db | depart,turn right,arrive |
|
||||
| c,a | cb,ab,ab | depart,turn right,arrive |
|
||||
| c,d | cb,db,db | depart,new name straight,arrive |
|
||||
| c,e | cb,eb,eb | depart,turn left,arrive |
|
||||
| d,a | db,ab,ab | depart,turn left,arrive |
|
||||
| d,c | db,cb,cb | depart,new name straight,arrive |
|
||||
| d,e | db,eb,eb | depart,turn right,arrive |
|
||||
| e,a | eb,ab,ab | depart,new name straight,arrive |
|
||||
| e,c | eb,cb,cb | depart,turn right,arrive |
|
||||
| e,d | eb,db,db | depart,turn left,arrive |
|
||||
|
||||
Scenario: Rotated Four Way Intersection
|
||||
Given the node map
|
||||
| a | | c |
|
||||
| | b | |
|
||||
| d | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| db | primary |
|
||||
| eb | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive |
|
||||
| a,e | ab,eb,eb | depart,new name straight,arrive |
|
||||
| a,d | ab,db,db | depart,turn right,arrive |
|
||||
| c,a | cb,ab,ab | depart,turn right,arrive |
|
||||
| c,d | cb,db,db | depart,new name straight,arrive |
|
||||
| c,e | cb,eb,eb | depart,turn left,arrive |
|
||||
| d,a | db,ab,ab | depart,turn left,arrive |
|
||||
| d,c | db,cb,cb | depart,new name straight,arrive |
|
||||
| d,e | db,eb,eb | depart,turn right,arrive |
|
||||
| e,a | eb,ab,ab | depart,new name straight,arrive |
|
||||
| e,c | eb,cb,cb | depart,turn right,arrive |
|
||||
| e,d | eb,db,db | depart,turn left,arrive |
|
||||
|
||||
|
||||
Scenario: Four Way Intersection Through Street
|
||||
Given the node map
|
||||
| | c | |
|
||||
| a | b | e |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abe | primary |
|
||||
| cb | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abe,cb,cb | depart,turn left,arrive |
|
||||
| a,e | abe,abe | depart,arrive |
|
||||
| a,d | abe,db,db | depart,turn right,arrive |
|
||||
| c,a | cb,abe,abe | depart,turn right,arrive |
|
||||
| c,d | cb,db,db | depart,new name straight,arrive |
|
||||
| c,e | cb,abe,abe | depart,turn left,arrive |
|
||||
| d,a | db,abe,abe | depart,turn left,arrive |
|
||||
| d,c | db,cb,cb | depart,new name straight,arrive |
|
||||
| d,e | db,abe,abe | depart,turn right,arrive |
|
||||
| e,a | abe,abe | depart,arrive |
|
||||
| e,c | abe,cb,cb | depart,turn right,arrive |
|
||||
| e,d | abe,db,db | depart,turn left,arrive |
|
||||
|
||||
Scenario: Four Way Intersection Double Through Street
|
||||
Given the node map
|
||||
| | c | |
|
||||
| a | b | e |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abe | primary |
|
||||
| cbd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abe,cbd,cbd | depart,turn left,arrive |
|
||||
| a,e | abe,abe | depart,arrive |
|
||||
| a,d | abe,cbd,cbd | depart,turn right,arrive |
|
||||
| c,a | cbd,abe,abe | depart,turn right,arrive |
|
||||
| c,d | cbd,cbd | depart,arrive |
|
||||
| c,e | cbd,abe,abe | depart,turn left,arrive |
|
||||
| d,a | cbd,abe,abe | depart,turn left,arrive |
|
||||
| d,c | cbd,cbd | depart,arrive |
|
||||
| d,e | cbd,abe,abe | depart,turn right,arrive |
|
||||
| e,a | abe,abe | depart,arrive |
|
||||
| e,c | abe,cbd,cbd | depart,turn right,arrive |
|
||||
| e,d | abe,cbd,cbd | depart,turn left,arrive |
|
||||
|
||||
Scenario: Three Way Intersection
|
||||
Given the node map
|
||||
| | c | |
|
||||
| a | b | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive |
|
||||
| a,d | ab,db,db | depart,new name straight,arrive |
|
||||
| d,c | db,cb,cb | depart,turn right,arrive |
|
||||
| d,a | db,ab,ab | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Three Way Intersection on Through Street
|
||||
Given the node map
|
||||
| | d | |
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| a,d | abc,db,db | depart,turn left,arrive |
|
||||
| c,a | abc,abc | depart,arrive |
|
||||
| c,d | abc,db,db | depart,turn right,arrive |
|
||||
|
||||
Scenario: High Degree Intersection
|
||||
Given the node map
|
||||
| i | | b | | c |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| h | | a | | d |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| g | | f | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| ac | primary |
|
||||
| ad | primary |
|
||||
| ae | primary |
|
||||
| af | primary |
|
||||
| ag | primary |
|
||||
| ah | primary |
|
||||
| ai | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,c | ab,ac,ac | depart,turn sharp left,arrive |
|
||||
| b,d | ab,ad,ad | depart,turn left,arrive |
|
||||
| b,e | ab,ae,ae | depart,turn slight left,arrive |
|
||||
| b,f | ab,af,af | depart,new name straight,arrive |
|
||||
| b,g | ab,ag,ag | depart,turn slight right,arrive |
|
||||
| b,h | ab,ah,ah | depart,turn right,arrive |
|
||||
| b,i | ab,ai,ai | depart,turn sharp right,arrive |
|
||||
|
||||
Scenario: Disturbed High Degree Intersection
|
||||
Given the node map
|
||||
| | | b | | |
|
||||
| i | | | | c |
|
||||
| | | | | |
|
||||
| h | | a | | d |
|
||||
| | | | | |
|
||||
| g | | | | e |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| ac | primary |
|
||||
| ad | primary |
|
||||
| ae | primary |
|
||||
| af | primary |
|
||||
| ag | primary |
|
||||
| ah | primary |
|
||||
| ai | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| b,c | ab,ac,ac | depart,turn sharp left,arrive |
|
||||
| b,d | ab,ad,ad | depart,turn left,arrive |
|
||||
| b,e | ab,ae,ae | depart,turn slight left,arrive |
|
||||
| b,f | ab,af,af | depart,new name straight,arrive |
|
||||
| b,g | ab,ag,ag | depart,turn slight right,arrive |
|
||||
| b,h | ab,ah,ah | depart,turn right,arrive |
|
||||
| b,i | ab,ai,ai | depart,turn sharp right,arrive |
|
||||
|
||||
Scenario: Turn instructions at high latitude
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 55.68740 | 12.52430 |
|
||||
| b | 55.68745 | 12.52409 |
|
||||
| c | 55.68711 | 12.52383 |
|
||||
| d | 55.68745 | 12.52450 |
|
||||
| e | 55.68755 | 12.52450 |
|
||||
| x | -55.68740 | 12.52430 |
|
||||
| y | -55.68745 | 12.52409 |
|
||||
| z | -55.68711 | 12.52383 |
|
||||
| v | -55.68745 | 12.52450 |
|
||||
| w | -55.68755 | 12.52450 |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| bd |
|
||||
| be |
|
||||
| xy |
|
||||
| yz |
|
||||
| vy |
|
||||
| wy |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | c | ab,bc,bc | depart,turn left,arrive |
|
||||
| c | a | bc,ab,ab | depart,turn right,arrive |
|
||||
| x | z | xy,yz,yz | depart,turn right,arrive |
|
||||
| z | x | yz,xy,xy | depart,turn left,arrive |
|
||||
|
||||
Scenario: Four Way Intersection Double Through Street Segregated
|
||||
Given the node map
|
||||
| | b | | c | |
|
||||
| i | | | | d |
|
||||
| | | a | | |
|
||||
| h | | | | e |
|
||||
| | g | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | name |
|
||||
| ha | primary | yes | first |
|
||||
| ai | primary | yes | first |
|
||||
| ae | primary | yes | first |
|
||||
| da | primary | yes | first |
|
||||
| ba | primary | yes | second |
|
||||
| ac | primary | yes | second |
|
||||
| fa | primary | yes | second |
|
||||
| ag | primary | yes | second |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| f,e | second,first,first | depart,turn right,arrive |
|
||||
| f,c | second,second | depart,arrive |
|
||||
| f,i | second,first,first | depart,turn left,arrive |
|
||||
| f,g | second,second,second | depart,continue uturn,arrive |
|
||||
| d,c | first,second,second | depart,turn right,arrive |
|
||||
| d,i | first,first | depart,arrive |
|
||||
| d,g | first,second,second | depart,turn left,arrive |
|
||||
| d,e | first,first,first | depart,continue uturn,arrive |
|
||||
| b,i | second,first,first | depart,turn right,arrive |
|
||||
| b,g | second,second | depart,arrive |
|
||||
| b,e | second,first,first | depart,turn left,arrive |
|
||||
| b,c | second,second,second | depart,continue uturn,arrive |
|
||||
| h,g | first,second,second | depart,turn right,arrive |
|
||||
| h,e | first,first | depart,arrive |
|
||||
| h,c | first,second,second | depart,turn left,arrive |
|
||||
| h,i | first,first,first | depart,continue uturn,arrive |
|
||||
|
||||
Scenario: Three Way Similar Sharp Turns
|
||||
Given the node map
|
||||
| a | | | | b |
|
||||
| c | | | | |
|
||||
| | d | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| bd | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,bc,bc | depart,turn sharp right,arrive |
|
||||
| a,d | ab,bd,bd | depart,turn sharp right,arrive |
|
||||
| d,c | bd,bc,bc | depart,turn sharp left,arrive |
|
||||
| d,a | bd,ab,ab | depart,turn sharp left,arrive |
|
||||
|
||||
Scenario: Left Turn Assignment (1)
|
||||
Given the node map
|
||||
| | | | | d |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn slight left,arrive |
|
||||
|
||||
Scenario: Left Turn Assignment (2)
|
||||
Given the node map
|
||||
| | | | | d |
|
||||
| | | | | |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn left,arrive |
|
||||
|
||||
Scenario: Left Turn Assignment (3)
|
||||
Given the node map
|
||||
| | | | d | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn left,arrive |
|
||||
|
||||
Scenario: Left Turn Assignment (4)
|
||||
Given the node map
|
||||
| | | d | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn left,arrive |
|
||||
|
||||
Scenario: Left Turn Assignment (5)
|
||||
Given the node map
|
||||
| | d | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn left,arrive |
|
||||
|
||||
@bug @pr2275
|
||||
Scenario: Left Turn Assignment (6)
|
||||
Given the node map
|
||||
| d | | | | |
|
||||
| | | | | |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp left,arrive |
|
||||
|
||||
Scenario: Left Turn Assignment (7)
|
||||
Given the node map
|
||||
| d | | | | |
|
||||
| a | | b | | c |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp left,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment (1)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment (2)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment (3)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment (4)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment (5)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | d | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
|
||||
@bug @pr2275
|
||||
Scenario: Right Turn Assignment (6)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| d | | | | |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment (7)
|
||||
Given the node map
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| d | | | | |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Two Turns
|
||||
Given the node map
|
||||
| | | f | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| d | e | | | |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
|
||||
| a,e | abc,be,be | depart,turn right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Two Turns (2)
|
||||
Given the node map
|
||||
| | | f | c | |
|
||||
| a | | b | | |
|
||||
| | | | | e |
|
||||
| | | | d | |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
| a,e | abc,be,be | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Two Turns (3)
|
||||
Given the node map
|
||||
| | | f | | |
|
||||
| a | | b | | c |
|
||||
| | | | | e |
|
||||
| | | | d | |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
| a,e | abc,be,be | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Two Turns (4)
|
||||
Given the node map
|
||||
| | | f | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | d | | e |
|
||||
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||
| a,e | abc,be,be | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Three Turns
|
||||
Given the node map
|
||||
| | | g | | |
|
||||
| a | | b | | c |
|
||||
| | d | | f | |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
| bg | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
|
||||
| a,e | abc,be,be | depart,turn right,arrive |
|
||||
| a,f | abc,bf,bf | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Slight Turn involving Oneways
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | | | |
|
||||
| | | b | | e |
|
||||
| d | | | | |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | primary | yes |
|
||||
| dbe | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| d,e | dbe,dbe | depart,arrive |
|
||||
| e,d | dbe,dbe | depart,arrive |
|
||||
|
||||
@bug @pr2275
|
||||
Scenario: Slight Turn involving Oneways
|
||||
Given the node map
|
||||
| | | | a | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | b | | e |
|
||||
| d | | | | |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | primary | yes |
|
||||
| dbe | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| d,e | dbe,dbe | depart,arrive |
|
||||
| e,d | dbe,dbe | depart,arrive |
|
||||
|
||||
|
||||
Scenario: Slight Turn involving Oneways - Name Change
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | | | |
|
||||
| | | b | | e |
|
||||
| d | | | | |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | primary | yes |
|
||||
| db | primary | no |
|
||||
| be | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| d,e | db,be,be | depart,new name slight right,arrive |
|
||||
| e,d | be,db,db | depart,new name slight left,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 1
|
||||
Given the node map
|
||||
| | | g | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | d | e | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | primary | no |
|
||||
| db | primary | yes |
|
||||
| eb | primary | no |
|
||||
| fb | primary | no |
|
||||
| bg | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abc,eb,eb | depart,turn right,arrive |
|
||||
| a,f | abc,fb,fb | depart,turn slight right,arrive |
|
||||
|
||||
@bug @pr2275
|
||||
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 2
|
||||
Given the node map
|
||||
| | | g | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | d | e | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | primary | no |
|
||||
| db | primary | no |
|
||||
| eb | primary | yes |
|
||||
| fb | primary | no |
|
||||
| bg | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,db,db | depart,turn sharp right,arrive |
|
||||
| a,f | abc,fb,fb | depart,turn right,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 3
|
||||
Given the node map
|
||||
| | | g | | |
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | d | e | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | primary | no |
|
||||
| db | primary | no |
|
||||
| be | primary | no |
|
||||
| fb | primary | yes |
|
||||
| bg | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,db,db | depart,turn sharp right,arrive |
|
||||
| a,e | abc,be,be | depart,turn right,arrive |
|
||||
|
||||
Scenario: Conflicting Turns with well distinguished turn
|
||||
Given the node map
|
||||
| a | | | b | | | c |
|
||||
| | | | | | | |
|
||||
| f | | | | | | d |
|
||||
| | | | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn slight right,arrive |
|
||||
| a,e | abc,be,be | depart,turn right,arrive |
|
||||
| a,f | abc,bf,bf | depart,turn sharp right,arrive |
|
||||
|
||||
@bug @pr2275
|
||||
Scenario: Conflicting Turns with well distinguished turn (back)
|
||||
Given the node map
|
||||
| a | | | b | | | c |
|
||||
| | | | | | | |
|
||||
| d | | | | | | f |
|
||||
| | e | | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| bd | primary |
|
||||
| be | primary |
|
||||
| bf | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
|
||||
| a,e | abc,be,be | depart,turn right,arrive |
|
||||
| a,f | abc,bf,bf | depart,turn slight right,arrive |
|
||||
|
||||
@@ -13,13 +13,6 @@ Feature: osrm-routed command line options: help
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--trial"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--hsgrdata arg"
|
||||
And stdout should contain "--nodesdata arg"
|
||||
And stdout should contain "--edgesdata arg"
|
||||
And stdout should contain "--ramindex arg"
|
||||
And stdout should contain "--fileindex arg"
|
||||
And stdout should contain "--namesdata arg"
|
||||
And stdout should contain "--timestamp arg"
|
||||
And stdout should contain "--ip"
|
||||
And stdout should contain "--port"
|
||||
And stdout should contain "--threads"
|
||||
@@ -39,13 +32,6 @@ Feature: osrm-routed command line options: help
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--trial"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--hsgrdata arg"
|
||||
And stdout should contain "--nodesdata arg"
|
||||
And stdout should contain "--edgesdata arg"
|
||||
And stdout should contain "--ramindex arg"
|
||||
And stdout should contain "--fileindex arg"
|
||||
And stdout should contain "--namesdata arg"
|
||||
And stdout should contain "--timestamp arg"
|
||||
And stdout should contain "--ip"
|
||||
And stdout should contain "--port"
|
||||
And stdout should contain "--threads"
|
||||
@@ -65,13 +51,6 @@ Feature: osrm-routed command line options: help
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "--trial"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--hsgrdata arg"
|
||||
And stdout should contain "--nodesdata arg"
|
||||
And stdout should contain "--edgesdata arg"
|
||||
And stdout should contain "--ramindex arg"
|
||||
And stdout should contain "--fileindex arg"
|
||||
And stdout should contain "--namesdata arg"
|
||||
And stdout should contain "--timestamp arg"
|
||||
And stdout should contain "--ip"
|
||||
And stdout should contain "--port"
|
||||
And stdout should contain "--threads"
|
||||
|
||||
@@ -13,7 +13,6 @@ Feature: osrm-routed command line options: invalid options
|
||||
|
||||
Scenario: osrm-routed - Missing file
|
||||
When I run "osrm-routed over-the-rainbow.osrm"
|
||||
Then stdout should contain "over-the-rainbow.osrm"
|
||||
And stderr should contain "exception"
|
||||
Then stderr should contain "over-the-rainbow.osrm"
|
||||
And stderr should contain "not found"
|
||||
And it should exit with code 1
|
||||
|
||||
@@ -35,12 +35,12 @@ Feature: Raster - weights
|
||||
When I run "osrm-extract {osm_base}.osm -p {profile}"
|
||||
And I run "osrm-contract {osm_base}.osm"
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 36 km/h |
|
||||
| a | c | ab,bc | 36 km/h |
|
||||
| b | c | bc | 36 km/h |
|
||||
| a | d | ad | 36 km/h |
|
||||
| d | c | dc | 36 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 36 km/h |
|
||||
| a | c | ab,bc,bc | 36 km/h |
|
||||
| b | c | bc,bc | 36 km/h |
|
||||
| a | d | ad,ad | 36 km/h |
|
||||
| d | c | dc,dc | 36 km/h |
|
||||
|
||||
Scenario: Weighting based on raster sources
|
||||
Given the profile "rasterbot"
|
||||
@@ -48,32 +48,32 @@ Feature: Raster - weights
|
||||
Then stdout should contain "evaluating segment"
|
||||
And I run "osrm-contract {osm_base}.osm"
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 8 km/h |
|
||||
| a | c | ad,dc | 15 km/h |
|
||||
| b | c | bc | 8 km/h |
|
||||
| a | d | ad | 15 km/h |
|
||||
| d | c | dc | 15 km/h |
|
||||
| d | e | de | 10 km/h |
|
||||
| e | b | eb | 10 km/h |
|
||||
| d | f | df | 15 km/h |
|
||||
| f | b | fb | 7 km/h |
|
||||
| d | b | de,eb | 10 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 8 km/h |
|
||||
| a | c | ad,dc,dc | 15 km/h |
|
||||
| b | c | bc,bc | 8 km/h |
|
||||
| a | d | ad,ad | 15 km/h |
|
||||
| d | c | dc,dc | 15 km/h |
|
||||
| d | e | de,de | 10 km/h |
|
||||
| e | b | eb,eb | 10 km/h |
|
||||
| d | f | df,df | 15 km/h |
|
||||
| f | b | fb,fb | 7 km/h |
|
||||
| d | b | de,eb,eb | 10 km/h |
|
||||
|
||||
Scenario: Weighting based on raster sources
|
||||
Given the profile "rasterbot-interp"
|
||||
Given the profile "rasterbotinterp"
|
||||
When I run "osrm-extract {osm_base}.osm -p {profile}"
|
||||
Then stdout should contain "evaluating segment"
|
||||
And I run "osrm-contract {osm_base}.osm"
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 8 km/h |
|
||||
| a | c | ad,dc | 15 km/h |
|
||||
| b | c | bc | 8 km/h |
|
||||
| a | d | ad | 15 km/h |
|
||||
| d | c | dc | 15 km/h |
|
||||
| d | e | de | 10 km/h |
|
||||
| e | b | eb | 10 km/h |
|
||||
| d | f | df | 15 km/h |
|
||||
| f | b | fb | 7 km/h |
|
||||
| d | b | de,eb | 10 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 8 km/h |
|
||||
| a | c | ad,dc,dc | 15 km/h |
|
||||
| b | c | bc,bc | 8 km/h |
|
||||
| a | d | ad,ad | 15 km/h |
|
||||
| d | c | dc,dc | 15 km/h |
|
||||
| d | e | de,de | 10 km/h |
|
||||
| e | b | eb,eb | 10 km/h |
|
||||
| d | f | df,df | 15 km/h |
|
||||
| f | b | fb,fb | 7 km/h |
|
||||
| d | b | de,eb,eb | 10 km/h |
|
||||
|
||||
@@ -43,14 +43,13 @@ module.exports = function () {
|
||||
if (err) return callback(err);
|
||||
if (!response.body.length) return callback(new Error('Invalid response body'));
|
||||
|
||||
var jsonResult = JSON.parse(response.body),
|
||||
result = jsonResult['distance_table'].map((row) => {
|
||||
var hashes = {};
|
||||
row.forEach((c, j) => {
|
||||
hashes[tableRows[0][j+1]] = c;
|
||||
});
|
||||
return hashes;
|
||||
});
|
||||
var json = JSON.parse(response.body);
|
||||
|
||||
var result = json['durations'].map(row => {
|
||||
var hashes = {};
|
||||
row.forEach((v, i) => { hashes[tableRows[0][i+1]] = isNaN(parseInt(v)) ? '' : v; });
|
||||
return hashes;
|
||||
});
|
||||
|
||||
var testRow = (row, ri, cb) => {
|
||||
var ok = true;
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = function () {
|
||||
this.scenarioTitle = scenario.getName();
|
||||
|
||||
this.loadMethod = this.DEFAULT_LOAD_METHOD;
|
||||
this.queryParams = [];
|
||||
this.queryParams = {};
|
||||
var d = new Date();
|
||||
this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
|
||||
this.resetData();
|
||||
|
||||
@@ -47,12 +47,12 @@ module.exports = function () {
|
||||
|
||||
if (headers.has('route')) {
|
||||
if (json.matchings.length != 1) throw new Error('*** Checking route only supported for matchings with one subtrace');
|
||||
route = this.wayList(json.matchings[0].instructions);
|
||||
route = this.wayList(json.matchings[0]);
|
||||
}
|
||||
|
||||
if (headers.has('duration')) {
|
||||
if (json.matchings.length != 1) throw new Error('*** Checking duration only supported for matchings with one subtrace');
|
||||
duration = json.matchings[0].route_summary.total_time;
|
||||
duration = json.matchings[0].duration;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ module.exports = function () {
|
||||
trace.push(node);
|
||||
}
|
||||
if (row.timestamps) {
|
||||
timestamps = row.timestamps.split(' ').filter(s => !!s).map(t => parseInt(t));
|
||||
timestamps = row.timestamps.split(' ').filter(s => !!s).map(t => parseInt(t, 10));
|
||||
}
|
||||
got.trace = row.trace;
|
||||
this.requestMatching(trace, timestamps, params, afterRequest);
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = function () {
|
||||
if (response.statusCode === 200 && response.body.length) {
|
||||
var json = JSON.parse(response.body);
|
||||
|
||||
coord = json.mapped_coordinate;
|
||||
coord = json.waypoints[0].location;
|
||||
|
||||
var got = { in: row.in, out: row.out };
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ module.exports = function () {
|
||||
});
|
||||
|
||||
this.Given(/^the query options$/, (table, callback) => {
|
||||
table.raw().forEach((tuple) => {
|
||||
this.queryParams.push(tuple);
|
||||
table.raw().forEach(tuple => {
|
||||
this.queryParams[tuple[0]] = tuple[1];
|
||||
});
|
||||
|
||||
callback();
|
||||
|
||||
@@ -3,7 +3,7 @@ var assert = require('assert');
|
||||
module.exports = function () {
|
||||
this.When(/^I request \/(.*)$/, (path, callback) => {
|
||||
this.reprocessAndLoadData(() => {
|
||||
this.requestPath(path, [], (err, res, body) => {
|
||||
this.requestPath(path, {}, (err, res, body) => {
|
||||
this.response = res;
|
||||
callback(err, res, body);
|
||||
});
|
||||
@@ -44,12 +44,9 @@ module.exports = function () {
|
||||
|
||||
this.Then(/^response should be a well-formed route$/, () => {
|
||||
this.ShouldBeWellFormed();
|
||||
assert.equal(typeof this.json.status_message, 'string');
|
||||
assert.equal(typeof this.json.route_summary, 'object');
|
||||
assert.equal(typeof this.json.route_geometry, 'string');
|
||||
assert.ok(Array.isArray(this.json.route_instructions));
|
||||
assert.ok(Array.isArray(this.json.via_points));
|
||||
assert.ok(Array.isArray(this.json.via_indices));
|
||||
assert.equal(this.json.code, 'ok');
|
||||
assert.ok(Array.isArray(this.json.routes));
|
||||
assert.ok(Array.isArray(this.json.waypoints));
|
||||
});
|
||||
|
||||
this.Then(/^"([^"]*)" should return code (\d+)$/, (binary, code) => {
|
||||
|
||||
@@ -5,18 +5,20 @@ var classes = require('../support/data_classes');
|
||||
module.exports = function () {
|
||||
this.Then(/^routability should be$/, (table, callback) => {
|
||||
this.buildWaysFromTable(table, () => {
|
||||
var directions = ['forw','backw','bothw'];
|
||||
var directions = ['forw','backw','bothw'],
|
||||
headers = new Set(Object.keys(table.hashes()[0]));
|
||||
|
||||
if (!directions.some(k => !!table.hashes()[0].hasOwnProperty(k))) {
|
||||
if (!directions.some(k => !!headers.has(k))) {
|
||||
throw new Error('*** routability table must contain either "forw", "backw" or "bothw" column');
|
||||
}
|
||||
|
||||
this.reprocessAndLoadData(() => {
|
||||
var testRow = (row, i, cb) => {
|
||||
var outputRow = row;
|
||||
|
||||
testRoutabilityRow(i, (err, result) => {
|
||||
if (err) return cb(err);
|
||||
directions.filter(d => !!table.hashes()[0][d]).forEach((direction) => {
|
||||
directions.filter(d => headers.has(d)).forEach((direction) => {
|
||||
var want = this.shortcutsHash[row[direction]] || row[direction];
|
||||
|
||||
switch (true) {
|
||||
@@ -66,13 +68,13 @@ module.exports = function () {
|
||||
|
||||
r.query = this.query;
|
||||
r.json = JSON.parse(body);
|
||||
r.status = r.json.status === 200 ? 'x' : null;
|
||||
r.status = res.statusCode === 200 ? 'x' : null;
|
||||
if (r.status) {
|
||||
r.route = this.wayList(r.json.route_instructions);
|
||||
r.route = this.wayList(r.json.routes[0]);
|
||||
|
||||
if (r.route === util.format('w%d', i)) {
|
||||
r.time = r.json.route_summary.total_time;
|
||||
r.distance = r.json.route_summary.total_distance;
|
||||
if (r.route.split(',')[0] === util.format('w%d', i)) {
|
||||
r.time = r.json.routes[0].duration;
|
||||
r.distance = r.json.routes[0].distance;
|
||||
r.speed = r.time > 0 ? parseInt(3.6 * r.distance / r.time) : null;
|
||||
} else {
|
||||
r.status = null;
|
||||
@@ -83,7 +85,7 @@ module.exports = function () {
|
||||
});
|
||||
};
|
||||
|
||||
d3.queue()
|
||||
d3.queue(1)
|
||||
.defer(testDirection, 'forw')
|
||||
.defer(testDirection, 'backw')
|
||||
.awaitAll((err, res) => {
|
||||
@@ -96,15 +98,23 @@ module.exports = function () {
|
||||
});
|
||||
|
||||
result.bothw = {};
|
||||
['status', 'time', 'distance', 'speed'].forEach((key) => {
|
||||
|
||||
var sq = d3.queue();
|
||||
|
||||
var parseRes = (key, scb) => {
|
||||
if (result.forw[key] === result.backw[key]) {
|
||||
result.bothw[key] = result.forw[key];
|
||||
} else {
|
||||
result.bothw[key] = 'diff';
|
||||
}
|
||||
scb();
|
||||
};
|
||||
|
||||
['status', 'time', 'distance', 'speed'].forEach((key) => {
|
||||
sq.defer(parseRes, key);
|
||||
});
|
||||
|
||||
cb(null, result);
|
||||
sq.awaitAll(() => { cb(null, result); });
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -44,7 +44,12 @@ module.exports = function () {
|
||||
var subTrips;
|
||||
if (res.statusCode === 200) {
|
||||
if (headers.has('trips')) {
|
||||
subTrips = json.trips.filter(t => !!t).map(sub => sub.via_points);
|
||||
subTrips = json.trips.filter(t => !!t).map(t => t.legs).map(tl => Array.prototype.concat.apply([], tl.map((sl, i) => {
|
||||
var toAdd = [];
|
||||
if (i === 0) toAdd.push(sl.steps[0].maneuver.location);
|
||||
toAdd.push(sl.steps[sl.steps.length-1].maneuver.location);
|
||||
return toAdd;
|
||||
})));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +110,7 @@ module.exports = function () {
|
||||
} else {
|
||||
var params = this.queryParams,
|
||||
waypoints = [];
|
||||
params['steps'] = 'true';
|
||||
if (row.from && row.to) {
|
||||
var fromNode = this.findNodeByName(row.from);
|
||||
if (!fromNode) throw new Error(util.format('*** unknown from-node "%s"', row.from));
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
var builder = require('xmlbuilder');
|
||||
|
||||
var ensureDecimal = (i) => {
|
||||
if (parseInt(i) === i) return i.toFixed(1);
|
||||
else return i;
|
||||
};
|
||||
|
||||
class DB {
|
||||
constructor () {
|
||||
this.nodes = new Array();
|
||||
@@ -39,8 +44,8 @@ class DB {
|
||||
uid: n.OSM_UID,
|
||||
user: n.OSM_USER,
|
||||
timestamp: n.OSM_TIMESTAMP,
|
||||
lon: n.lon,
|
||||
lat: n.lat
|
||||
lon: ensureDecimal(n.lon),
|
||||
lat: ensureDecimal(n.lat)
|
||||
});
|
||||
|
||||
for (var k in n.tags) {
|
||||
|
||||
@@ -94,13 +94,13 @@ module.exports = function () {
|
||||
q.awaitAll(callback);
|
||||
};
|
||||
|
||||
var ensureDecimal = (i) => {
|
||||
this.ensureDecimal = (i) => {
|
||||
if (parseInt(i) === i) return i.toFixed(1);
|
||||
else return i;
|
||||
};
|
||||
|
||||
this.tableCoordToLonLat = (ci, ri) => {
|
||||
return [this.origin[0] + ci * this.zoom, this.origin[1] - ri * this.zoom].map(ensureDecimal);
|
||||
return [this.origin[0] + ci * this.zoom, this.origin[1] - ri * this.zoom].map(this.ensureDecimal);
|
||||
};
|
||||
|
||||
this.addOSMNode = (name, lon, lat, id) => {
|
||||
@@ -151,7 +151,6 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
this.writeOSM = (callback) => {
|
||||
|
||||
fs.exists(this.DATA_FOLDER, (exists) => {
|
||||
var mkDirFn = exists ? (cb) => { cb(); } : fs.mkdir.bind(fs.mkdir, this.DATA_FOLDER);
|
||||
mkDirFn((err) => {
|
||||
@@ -202,6 +201,7 @@ module.exports = function () {
|
||||
exec(cmd, (err) => {
|
||||
if (err) {
|
||||
this.log(util.format('*** Exited with code %d', err.code), 'preprocess');
|
||||
process.chdir('../');
|
||||
return callback(this.ExtractError(err.code, util.format('osrm-extract exited with code %d', err.code)));
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ module.exports = function () {
|
||||
});
|
||||
};
|
||||
|
||||
['osrm','osrm.names','osrm.restrictions','osrm.ebg','osrm.enw','osrm.edges','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex'].forEach(file => {
|
||||
['osrm','osrm.names','osrm.restrictions','osrm.ebg','osrm.enw','osrm.edges','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex','osrm.properties'].forEach(file => {
|
||||
q.defer(rename, file);
|
||||
});
|
||||
|
||||
@@ -248,6 +248,7 @@ module.exports = function () {
|
||||
exec(cmd, (err) => {
|
||||
if (err) {
|
||||
this.log(util.format('*** Exited with code %d', err.code), 'preprocess');
|
||||
process.chdir('../');
|
||||
return callback(this.ContractError(err.code, util.format('osrm-contract exited with code %d', err.code)));
|
||||
}
|
||||
|
||||
@@ -272,11 +273,11 @@ module.exports = function () {
|
||||
|
||||
var q = d3.queue();
|
||||
|
||||
['osrm.hsgr','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex','osrm.core','osrm.edges'].forEach((file) => {
|
||||
['osrm.hsgr','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex','osrm.core','osrm.edges','osrm.datasource_indexes','osrm.datasource_names','osrm.level'].forEach((file) => {
|
||||
q.defer(rename, file);
|
||||
});
|
||||
|
||||
['osrm.names','osrm.restrictions','osrm'].forEach((file) => {
|
||||
['osrm.names','osrm.restrictions','osrm.properties','osrm'].forEach((file) => {
|
||||
q.defer(copy, file);
|
||||
});
|
||||
|
||||
@@ -329,7 +330,7 @@ module.exports = function () {
|
||||
this.processRowsAndDiff = (table, fn, callback) => {
|
||||
var q = d3.queue(1);
|
||||
|
||||
table.hashes().forEach((row, i) => q.defer(fn, row, i));
|
||||
table.hashes().forEach((row, i) => { q.defer(fn, row, i); });
|
||||
|
||||
q.awaitAll((err, actual) => {
|
||||
if (err) return callback(err);
|
||||
|
||||
@@ -78,8 +78,8 @@ module.exports = {
|
||||
}
|
||||
|
||||
matchLocation (got, want) {
|
||||
return this.match(got[0], util.format('%d ~0.0025%', want.lat)) &&
|
||||
this.match(got[1], util.format('%d ~0.0025%', want.lon));
|
||||
return this.match(got[0], util.format('%d ~0.0025%', want.lon)) &&
|
||||
this.match(got[1], util.format('%d ~0.0025%', want.lat));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,8 @@ var d3 = require('d3-queue');
|
||||
module.exports = function () {
|
||||
this.initializeEnv = (callback) => {
|
||||
this.DEFAULT_PORT = 5000;
|
||||
this.DEFAULT_TIMEOUT = 2000;
|
||||
// OSX builds on Travis hit a timeout of ~2000 from time to time
|
||||
this.DEFAULT_TIMEOUT = 5000;
|
||||
this.setDefaultTimeout(this.DEFAULT_TIMEOUT);
|
||||
this.ROOT_FOLDER = process.cwd();
|
||||
this.OSM_USER = 'osrm';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
var util = require('util');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var chalk = require('chalk');
|
||||
|
||||
var OSRMError = class extends Error {
|
||||
constructor (process, code, msg, log, lines) {
|
||||
@@ -17,18 +19,18 @@ var OSRMError = class extends Error {
|
||||
this.logTail(this.log, this.lines, callback);
|
||||
}
|
||||
|
||||
toString (callback) {
|
||||
this.extract((tail) => {
|
||||
callback(util.format('*** %s\nLast %s from %s:\n%s\n', this.msg, this.lines, this.log, tail));
|
||||
});
|
||||
}
|
||||
// toString (callback) {
|
||||
// this.extract((tail) => {
|
||||
// callback(util.format('*** %s\nLast %s from %s:\n%s\n', this.msg, this.lines, this.log, tail));
|
||||
// });
|
||||
// }
|
||||
|
||||
logTail (path, n, callback) {
|
||||
var expanded = path.resolve(this.TEST_FOLDER, path);
|
||||
logTail (logPath, n, callback) {
|
||||
var expanded = path.resolve(this.TEST_FOLDER, logPath);
|
||||
fs.exists(expanded, (exists) => {
|
||||
if (exists) {
|
||||
fs.readFile(expanded, (err, data) => {
|
||||
var lines = data.trim().split('\n');
|
||||
var lines = data.toString().trim().split('\n');
|
||||
callback(lines
|
||||
.slice(lines.length - n)
|
||||
.map(line => util.format(' %s', line))
|
||||
@@ -100,8 +102,8 @@ module.exports = {
|
||||
|
||||
if (rowError) {
|
||||
bad++;
|
||||
this.diff.push(Object.assign({}, row, {status: 'undefined'}));
|
||||
this.diff.push(Object.assign({}, actual[i], {status: 'comment'}));
|
||||
this.diff.push(Object.assign({}, row, {c_status: 'undefined'}));
|
||||
this.diff.push(Object.assign({}, actual[i], {c_status: 'comment'}));
|
||||
} else {
|
||||
good++;
|
||||
this.diff.push(row);
|
||||
@@ -117,9 +119,9 @@ module.exports = {
|
||||
this.diff.forEach((row) => {
|
||||
var rowString = '| ';
|
||||
this.headers.forEach((header) => {
|
||||
if (!row.status) rowString += ' ' + row[header] + ' | ';
|
||||
else if (row.status === 'undefined') rowString += '(-) ' + row[header] + ' | ';
|
||||
else rowString += '(+) ' + row[header] + ' | ';
|
||||
if (!row.c_status) rowString += chalk.green(' ' + row[header] + ' | ');
|
||||
else if (row.c_status === 'undefined') rowString += chalk.yellow('(-) ' + row[header] + ' | ');
|
||||
else rowString += chalk.red('(+) ' + row[header] + ' | ');
|
||||
});
|
||||
s.push(rowString);
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = function () {
|
||||
this.scenarioTitle = scenario.getName();
|
||||
|
||||
this.loadMethod = this.DEFAULT_LOAD_METHOD;
|
||||
this.queryParams = [];
|
||||
this.queryParams = {};
|
||||
var d = new Date();
|
||||
this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
|
||||
this.resetData();
|
||||
|
||||
+17
-13
@@ -2,11 +2,21 @@ var Timeout = require('node-timeout');
|
||||
var request = require('request');
|
||||
|
||||
module.exports = function () {
|
||||
// Converts an array [["param","val1"], ["param","val2"]] into param=val1¶m=val2
|
||||
this.paramsToString = (params) => {
|
||||
var kvPairs = params.map((kv) => kv[0].toString() + '=' + kv[1].toString());
|
||||
var url = kvPairs.length ? kvPairs.join('&') : '';
|
||||
return url.trim();
|
||||
var paramString = '';
|
||||
if (params.coordinates !== undefined) {
|
||||
// FIXME this disables passing the output if its a default
|
||||
// Remove after #2173 is fixed.
|
||||
var outputString = (params.output && params.output !== 'json') ? ('.' + params.output) : '';
|
||||
paramString = params.coordinates.join(';') + outputString;
|
||||
delete params.coordinates;
|
||||
delete params.output;
|
||||
}
|
||||
if (Object.keys(params).length) {
|
||||
paramString += '?' + Object.keys(params).map(k => k + '=' + params[k]).join('&');
|
||||
}
|
||||
|
||||
return paramString;
|
||||
};
|
||||
|
||||
this.sendRequest = (baseUri, parameters, callback) => {
|
||||
@@ -14,16 +24,9 @@ module.exports = function () {
|
||||
|
||||
var runRequest = (cb) => {
|
||||
var params = this.paramsToString(parameters);
|
||||
this.query = baseUri + (params.length ? '/' + params : '');
|
||||
|
||||
this.query = baseUri + (params.length ? '?' + params : '');
|
||||
|
||||
var options = this.httpMethod === 'POST' ? {
|
||||
method: 'POST',
|
||||
body: params,
|
||||
url: baseUri
|
||||
} : this.query;
|
||||
|
||||
request(options, (err, res, body) => {
|
||||
request(this.query, (err, res, body) => {
|
||||
if (err && err.code === 'ECONNREFUSED') {
|
||||
throw new Error('*** osrm-routed is not running.');
|
||||
} else if (err && err.statusCode === 408) {
|
||||
@@ -41,6 +44,7 @@ module.exports = function () {
|
||||
else if (err.code === 'ECONNREFUSED')
|
||||
return callback(this.RoutedError('*** osrm-routed is not running'));
|
||||
}
|
||||
//console.log(body+"\n");
|
||||
return callback(err, res, body);
|
||||
}));
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ var OSRMBaseLoader = class {
|
||||
});
|
||||
};
|
||||
|
||||
runLaunch(limit((e) => { if (e) callback(e); callback(); }));
|
||||
runLaunch(limit((e) => { if (e) callback(e); else callback(); }));
|
||||
}
|
||||
|
||||
shutdown (callback) {
|
||||
@@ -30,7 +30,7 @@ var OSRMBaseLoader = class {
|
||||
this.osrmDown(cb);
|
||||
};
|
||||
|
||||
runShutdown(limit((e) => { if (e) callback(e); callback(); }));
|
||||
runShutdown(limit((e) => { if (e) callback(e); else callback(); }));
|
||||
}
|
||||
|
||||
osrmIsRunning () {
|
||||
@@ -62,7 +62,7 @@ var OSRMBaseLoader = class {
|
||||
|
||||
waitForShutdown (callback) {
|
||||
var check = () => {
|
||||
if (!this.osrmIsRunning()) callback();
|
||||
if (!this.osrmIsRunning()) return callback();
|
||||
};
|
||||
setTimeout(check, 100);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ var OSRMDirectLoader = class extends OSRMBaseLoader {
|
||||
fs.appendFile(this.scope.OSRM_ROUTED_LOG_FILE, data, (err) => { if (err) throw err; });
|
||||
};
|
||||
|
||||
var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), [this.inputFile, util.format('-p%d', this.scope.OSRM_PORT)], {detached: true});
|
||||
var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), [this.inputFile, util.format('-p%d', this.scope.OSRM_PORT)]);
|
||||
this.scope.pid = child.pid;
|
||||
child.stdout.on('data', writeToLog);
|
||||
child.stderr.on('data', writeToLog);
|
||||
@@ -111,7 +111,7 @@ var OSRMDatastoreLoader = class extends OSRMBaseLoader {
|
||||
|
||||
loadData (callback) {
|
||||
this.scope.runBin('osrm-datastore', this.inputFile, (err) => {
|
||||
if (err) return callback(new this.LaunchError(this.exitCode, 'datastore', err));
|
||||
if (err) return callback(this.scope.LaunchError(this.exitCode, 'datastore', err));
|
||||
callback();
|
||||
});
|
||||
}
|
||||
@@ -122,7 +122,7 @@ var OSRMDatastoreLoader = class extends OSRMBaseLoader {
|
||||
fs.appendFile(this.scope.OSRM_ROUTED_LOG_FILE, data, (err) => { if (err) throw err; });
|
||||
};
|
||||
|
||||
var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), ['--shared-memory=1', util.format('-p%d', this.scope.OSRM_PORT)], {detached: true});
|
||||
var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), ['--shared-memory=1', util.format('-p%d', this.scope.OSRM_PORT)]);
|
||||
this.child = child;
|
||||
this.scope.pid = child.pid;
|
||||
child.stdout.on('data', writeToLog);
|
||||
|
||||
+77
-66
@@ -3,7 +3,13 @@ var request = require('request');
|
||||
|
||||
module.exports = function () {
|
||||
this.requestPath = (service, params, callback) => {
|
||||
var uri = [this.HOST, service].join('/');
|
||||
var uri;
|
||||
if (service == 'timestamp') {
|
||||
uri = [this.HOST, service].join('/');
|
||||
} else {
|
||||
uri = [this.HOST, service, 'v1', this.profile].join('/');
|
||||
}
|
||||
|
||||
return this.sendRequest(uri, params, callback);
|
||||
};
|
||||
|
||||
@@ -28,133 +34,138 @@ module.exports = function () {
|
||||
// Overwrites the default values in defaults
|
||||
// e.g. [[a, 1], [b, 2]], [[a, 5], [d, 10]] => [[a, 5], [b, 2], [d, 10]]
|
||||
this.overwriteParams = (defaults, other) => {
|
||||
var merged = {};
|
||||
var overwrite = (o) => {
|
||||
merged[o[0]] = o[1];
|
||||
};
|
||||
|
||||
defaults.forEach(overwrite);
|
||||
other.forEach(overwrite);
|
||||
|
||||
return Object.keys(merged).map((key) => [key, merged[key]]);
|
||||
var otherMap = {};
|
||||
for (var key in other) otherMap[key] = other[key];
|
||||
return Object.assign({}, defaults, otherMap);
|
||||
};
|
||||
|
||||
var encodeWaypoints = (waypoints) => {
|
||||
return waypoints.map(w => ['loc', [w.lat, w.lon].join(',')]);
|
||||
return waypoints.map(w => [w.lon, w.lat].map(this.ensureDecimal).join(','));
|
||||
};
|
||||
|
||||
this.requestRoute = (waypoints, bearings, userParams, callback) => {
|
||||
if (bearings.length && bearings.length !== waypoints.length) throw new Error('*** number of bearings does not equal the number of waypoints');
|
||||
|
||||
var defaults = [['output','json'], ['instructions','true'], ['alt',false]],
|
||||
var defaults = {
|
||||
output: 'json',
|
||||
steps: 'true',
|
||||
alternatives: 'false'
|
||||
},
|
||||
params = this.overwriteParams(defaults, userParams),
|
||||
encodedWaypoints = encodeWaypoints(waypoints);
|
||||
|
||||
params.coordinates = encodedWaypoints;
|
||||
|
||||
if (bearings.length) {
|
||||
var encodedBearings = bearings.map(b => ['b', b.toString()]);
|
||||
params = Array.prototype.concat.apply(params, encodedWaypoints.map((o, i) => [o, encodedBearings[i]]));
|
||||
} else {
|
||||
params = params.concat(encodedWaypoints);
|
||||
params.bearings = bearings.map(b => {
|
||||
var bs = b.split(',');
|
||||
if (bs.length === 2) return b;
|
||||
else return b += ',10';
|
||||
}).join(';');
|
||||
}
|
||||
|
||||
return this.requestPath('viaroute', params, callback);
|
||||
return this.requestPath('route', params, callback);
|
||||
};
|
||||
|
||||
this.requestNearest = (node, userParams, callback) => {
|
||||
var defaults = [['output', 'json']],
|
||||
var defaults = {
|
||||
output: 'json'
|
||||
},
|
||||
params = this.overwriteParams(defaults, userParams);
|
||||
params.push(['loc', [node.lat, node.lon].join(',')]);
|
||||
params.coordinates = [[node.lon, node.lat].join(',')];
|
||||
|
||||
return this.requestPath('nearest', params, callback);
|
||||
};
|
||||
|
||||
this.requestTable = (waypoints, userParams, callback) => {
|
||||
var defaults = [['output', 'json']],
|
||||
var defaults = {
|
||||
output: 'json'
|
||||
},
|
||||
params = this.overwriteParams(defaults, userParams);
|
||||
params = params.concat(waypoints.map(w => [w.type, [w.coord.lat, w.coord.lon].join(',')]));
|
||||
|
||||
params.coordinates = waypoints.map(w => [w.coord.lon, w.coord.lat].join(','));
|
||||
var srcs = waypoints.map((w, i) => [w.type, i]).filter(w => w[0] === 'src').map(w => w[1]),
|
||||
dsts = waypoints.map((w, i) => [w.type, i]).filter(w => w[0] === 'dst').map(w => w[1]);
|
||||
if (srcs.length) params.sources = srcs.join(';');
|
||||
if (dsts.length) params.destinations = dsts.join(';');
|
||||
|
||||
return this.requestPath('table', params, callback);
|
||||
};
|
||||
|
||||
this.requestTrip = (waypoints, userParams, callback) => {
|
||||
var defaults = [['output', 'json']],
|
||||
var defaults = {
|
||||
output: 'json'
|
||||
},
|
||||
params = this.overwriteParams(defaults, userParams);
|
||||
params = params.concat(encodeWaypoints(waypoints));
|
||||
|
||||
params.coordinates = encodeWaypoints(waypoints);
|
||||
|
||||
return this.requestPath('trip', params, callback);
|
||||
};
|
||||
|
||||
this.requestMatching = (waypoints, timestamps, userParams, callback) => {
|
||||
var defaults = [['output', 'json']],
|
||||
var defaults = {
|
||||
output: 'json'
|
||||
},
|
||||
params = this.overwriteParams(defaults, userParams);
|
||||
var encodedWaypoints = encodeWaypoints(waypoints);
|
||||
|
||||
params.coordinates = encodeWaypoints(waypoints);
|
||||
|
||||
if (timestamps.length) {
|
||||
var encodedTimestamps = timestamps.map(t => ['t', t.toString()]);
|
||||
params = Array.prototype.concat.apply(params, encodedWaypoints.map((o, i) => [o, encodedTimestamps[i]]));
|
||||
} else {
|
||||
params = params.concat(encodedWaypoints);
|
||||
params.timestamps = timestamps.join(';');
|
||||
}
|
||||
|
||||
return this.requestPath('match', params, callback);
|
||||
};
|
||||
|
||||
this.extractInstructionList = (instructions, index, postfix) => {
|
||||
this.extractInstructionList = (instructions, keyFinder, postfix) => {
|
||||
postfix = postfix || null;
|
||||
if (instructions) {
|
||||
return instructions.filter(r => r[0].toString() !== this.DESTINATION_REACHED.toString())
|
||||
.map(r => r[index])
|
||||
.map(r => (isNaN(parseInt(r)) && (!r || r == '')) ? '""' : '' + r + (postfix || ''))
|
||||
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
|
||||
.map(keyFinder)
|
||||
.join(',');
|
||||
}
|
||||
};
|
||||
|
||||
this.wayList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, 1);
|
||||
};
|
||||
|
||||
this.compassList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, 6);
|
||||
return this.extractInstructionList(instructions, s => s.name);
|
||||
};
|
||||
|
||||
this.bearingList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, 7);
|
||||
return this.extractInstructionList(instructions, s => s.maneuver.bearing_after);
|
||||
};
|
||||
|
||||
this.turnList = (instructions) => {
|
||||
var types = {
|
||||
'0': 'none',
|
||||
'1': 'straight',
|
||||
'2': 'slight_right',
|
||||
'3': 'right',
|
||||
'4': 'sharp_right',
|
||||
'5': 'u_turn',
|
||||
'6': 'sharp_left',
|
||||
'7': 'left',
|
||||
'8': 'slight_left',
|
||||
'9': 'via',
|
||||
'10': 'head',
|
||||
'11': 'enter_roundabout',
|
||||
'12': 'leave_roundabout',
|
||||
'13': 'stay_roundabout',
|
||||
'14': 'start_end_of_street',
|
||||
'15': 'destination',
|
||||
'16': 'name_changes',
|
||||
'17': 'enter_contraflow',
|
||||
'18': 'leave_contraflow'
|
||||
};
|
||||
|
||||
// replace instructions codes with strings, e.g. '11-3' gets converted to 'enter_roundabout-3'
|
||||
return instructions ? instructions.map(r => r[0].toString().replace(/^(\d*)/, (match, num) => types[num])).join(',') : instructions;
|
||||
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
|
||||
.map(v => {
|
||||
switch (v.maneuver.type) {
|
||||
case 'depart':
|
||||
case 'arrive':
|
||||
return v.maneuver.type;
|
||||
case 'roundabout':
|
||||
return 'roundabout-exit-' + v.maneuver.exit;
|
||||
case 'rotary':
|
||||
if( 'rotary_name' in v )
|
||||
return v.rotary_name + '-exit-' + v.maneuver.exit;
|
||||
else
|
||||
return 'rotary-exit-' + v.maneuver.exit;
|
||||
// FIXME this is a little bit over-simplistic for merge/fork instructions
|
||||
default:
|
||||
return v.maneuver.type + ' ' + v.maneuver.modifier;
|
||||
}
|
||||
})
|
||||
.join(',');
|
||||
};
|
||||
|
||||
this.modeList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, 8);
|
||||
return this.extractInstructionList(instructions, s => s.mode);
|
||||
};
|
||||
|
||||
this.timeList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, 4, 's');
|
||||
return this.extractInstructionList(instructions, s => s.duration + 's');
|
||||
};
|
||||
|
||||
this.distanceList = (instructions) => {
|
||||
return this.extractInstructionList(instructions, 2, 'm');
|
||||
return this.extractInstructionList(instructions, s => s.distance + 'm');
|
||||
};
|
||||
};
|
||||
|
||||
@@ -26,34 +26,32 @@ module.exports = function () {
|
||||
var headers = new Set(table.raw()[0]);
|
||||
|
||||
var requestRow = (row, ri, cb) => {
|
||||
var got,
|
||||
json;
|
||||
var got;
|
||||
|
||||
var afterRequest = (err, res, body) => {
|
||||
if (err) return cb(err);
|
||||
if (body && body.length) {
|
||||
var instructions, bearings, compasses, turns, modes, times, distances;
|
||||
var instructions, bearings, turns, modes, times, distances;
|
||||
|
||||
json = JSON.parse(body);
|
||||
var json = JSON.parse(body);
|
||||
|
||||
var hasRoute = json.status === 200;
|
||||
var hasRoute = json.code === 'Ok';
|
||||
|
||||
if (hasRoute) {
|
||||
instructions = this.wayList(json.route_instructions);
|
||||
bearings = this.bearingList(json.route_instructions);
|
||||
compasses = this.compassList(json.route_instructions);
|
||||
turns = this.turnList(json.route_instructions);
|
||||
modes = this.modeList(json.route_instructions);
|
||||
times = this.timeList(json.route_instructions);
|
||||
distances = this.distanceList(json.route_instructions);
|
||||
instructions = this.wayList(json.routes[0]);
|
||||
bearings = this.bearingList(json.routes[0]);
|
||||
turns = this.turnList(json.routes[0]);
|
||||
modes = this.modeList(json.routes[0]);
|
||||
times = this.timeList(json.routes[0]);
|
||||
distances = this.distanceList(json.routes[0]);
|
||||
}
|
||||
|
||||
if (headers.has('status')) {
|
||||
got.status = json.status.toString();
|
||||
got.status = res.statusCode.toString();
|
||||
}
|
||||
|
||||
if (headers.has('message')) {
|
||||
got.message = json.status_message;
|
||||
got.message = json.message || '';
|
||||
}
|
||||
|
||||
if (headers.has('#')) {
|
||||
@@ -61,28 +59,22 @@ module.exports = function () {
|
||||
got['#'] = row['#'];
|
||||
}
|
||||
|
||||
if (headers.has('start')) {
|
||||
got.start = instructions ? json.route_summary.start_point : null;
|
||||
}
|
||||
|
||||
if (headers.has('end')) {
|
||||
got.end = instructions ? json.route_summary.end_point : null;
|
||||
}
|
||||
|
||||
if (headers.has('geometry')) {
|
||||
got.geometry = json.route_geometry;
|
||||
got.geometry = json.routes[0].geometry;
|
||||
}
|
||||
|
||||
if (headers.has('route')) {
|
||||
got.route = (instructions || '').trim();
|
||||
|
||||
if (headers.has('alternative')) {
|
||||
got.alternative = json.found_alternative ?
|
||||
this.wayList(json.alternative_instructions[0]) : '';
|
||||
// TODO examine more than first alternative?
|
||||
got.alternative ='';
|
||||
if (json.routes && json.routes.length > 1)
|
||||
got.alternative = this.wayList(json.routes[1]);
|
||||
}
|
||||
|
||||
var distance = hasRoute && json.route_summary.total_distance,
|
||||
time = hasRoute && json.route_summary.total_time;
|
||||
var distance = hasRoute && json.routes[0].distance,
|
||||
time = hasRoute && json.routes[0].duration;
|
||||
|
||||
if (headers.has('distance')) {
|
||||
if (row.distance.length) {
|
||||
@@ -116,7 +108,6 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
putValue('bearing', bearings);
|
||||
putValue('compass', compasses);
|
||||
putValue('turns', turns);
|
||||
putValue('modes', modes);
|
||||
putValue('times', times);
|
||||
|
||||
@@ -19,5 +19,5 @@ Feature: Support 64bit node IDs
|
||||
| cdec |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| x | y | abc | head,destination |
|
||||
| from | to | route | turns |
|
||||
| x | y | abc,abc | depart,arrive |
|
||||
|
||||
@@ -25,16 +25,16 @@ Feature: Alternative route
|
||||
|
||||
Scenario: Enabled alternative
|
||||
Given the query options
|
||||
| alt | true |
|
||||
| alternatives | true |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | alternative |
|
||||
| a | z | ab,bc,cd,dz | ag,gh,hi,ij,jz |
|
||||
| from | to | route | alternative |
|
||||
| a | z | ab,bc,cd,dz,dz | ag,gh,hi,ij,jz,jz |
|
||||
|
||||
Scenario: Disabled alternative
|
||||
Given the query options
|
||||
| alt | false |
|
||||
| alternatives | false |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | alternative |
|
||||
| a | z | ab,bc,cd,dz | |
|
||||
| from | to | route | alternative |
|
||||
| a | z | ab,bc,cd,dz,dz | |
|
||||
|
||||
@@ -19,11 +19,11 @@ Feature: Alternative route
|
||||
| ca | yes |
|
||||
|
||||
And the query options
|
||||
| alt | true |
|
||||
| alternatives | true |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | alternative |
|
||||
| 1 | 2 | ab,bd,dc,ca,ab | |
|
||||
| 3 | 4 | bd,dc,ca,ab,bd | |
|
||||
| 5 | 6 | dc,ca,ab,bd,dc | |
|
||||
| 7 | 8 | ca,ab,bd,dc,ca | |
|
||||
| from | to | route | alternative |
|
||||
| 1 | 2 | ab,bd,dc,ca,ab,ab | |
|
||||
| 3 | 4 | bd,dc,ca,ab,bd,bd | |
|
||||
| 5 | 6 | dc,ca,ab,bd,dc,dc | |
|
||||
| 7 | 8 | ca,ab,bd,dc,ca,ca | |
|
||||
|
||||
@@ -23,8 +23,8 @@ Feature: Handle bad data in a graceful manner
|
||||
| abcde | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | d | abcde |
|
||||
| from | to | route |
|
||||
| b | d | abcde,abcde |
|
||||
|
||||
@todo
|
||||
Scenario: Start/end point at the same location
|
||||
@@ -78,7 +78,7 @@ Feature: Handle bad data in a graceful manner
|
||||
# | b | c | cd |
|
||||
# | a | d | cd |
|
||||
# | c | d | cd |
|
||||
| d | e | de |
|
||||
| d | e | de,de |
|
||||
# | k | l | kl |
|
||||
# | l | m | lm |
|
||||
# | o | l | lm |
|
||||
|
||||
@@ -14,9 +14,9 @@ Feature: Basic Routing
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | ab |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| b | a | ab,ab |
|
||||
|
||||
Scenario: Routing in between two nodes of way
|
||||
Given the node map
|
||||
@@ -27,9 +27,9 @@ Feature: Basic Routing
|
||||
| abcd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | 2 | abcd |
|
||||
| 2 | 1 | abcd |
|
||||
| from | to | route |
|
||||
| 1 | 2 | abcd,abcd |
|
||||
| 2 | 1 | abcd,abcd |
|
||||
|
||||
Scenario: Routing between the middle nodes of way
|
||||
Given the node map
|
||||
@@ -40,19 +40,19 @@ Feature: Basic Routing
|
||||
| abcdef |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | abcdef |
|
||||
| b | d | abcdef |
|
||||
| b | e | abcdef |
|
||||
| c | b | abcdef |
|
||||
| c | d | abcdef |
|
||||
| c | e | abcdef |
|
||||
| d | b | abcdef |
|
||||
| d | c | abcdef |
|
||||
| d | e | abcdef |
|
||||
| e | b | abcdef |
|
||||
| e | c | abcdef |
|
||||
| e | d | abcdef |
|
||||
| from | to | route |
|
||||
| b | c | abcdef,abcdef |
|
||||
| b | d | abcdef,abcdef |
|
||||
| b | e | abcdef,abcdef |
|
||||
| c | b | abcdef,abcdef |
|
||||
| c | d | abcdef,abcdef |
|
||||
| c | e | abcdef,abcdef |
|
||||
| d | b | abcdef,abcdef |
|
||||
| d | c | abcdef,abcdef |
|
||||
| d | e | abcdef,abcdef |
|
||||
| e | b | abcdef,abcdef |
|
||||
| e | c | abcdef,abcdef |
|
||||
| e | d | abcdef,abcdef |
|
||||
|
||||
Scenario: Two ways connected in a straight line
|
||||
Given the node map
|
||||
@@ -64,13 +64,13 @@ Feature: Basic Routing
|
||||
| bc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc |
|
||||
| c | a | bc,ab |
|
||||
| a | b | ab |
|
||||
| b | a | ab |
|
||||
| b | c | bc |
|
||||
| c | b | bc |
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
| c | a | bc,ab,ab |
|
||||
| a | b | ab,ab |
|
||||
| b | a | ab,ab |
|
||||
| b | c | bc,bc |
|
||||
| c | b | bc,bc |
|
||||
|
||||
Scenario: 2 unconnected parallel ways
|
||||
Given the node map
|
||||
@@ -83,33 +83,33 @@ Feature: Basic Routing
|
||||
| def |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abc |
|
||||
| b | a | abc |
|
||||
| b | c | abc |
|
||||
| c | b | abc |
|
||||
| d | e | def |
|
||||
| e | d | def |
|
||||
| e | f | def |
|
||||
| f | e | def |
|
||||
| a | d | |
|
||||
| d | a | |
|
||||
| b | d | |
|
||||
| d | b | |
|
||||
| c | d | |
|
||||
| d | c | |
|
||||
| a | e | |
|
||||
| e | a | |
|
||||
| b | e | |
|
||||
| e | b | |
|
||||
| c | e | |
|
||||
| e | c | |
|
||||
| a | f | |
|
||||
| f | a | |
|
||||
| b | f | |
|
||||
| f | b | |
|
||||
| c | f | |
|
||||
| f | c | |
|
||||
| from | to | route |
|
||||
| a | b | abc,abc |
|
||||
| b | a | abc,abc |
|
||||
| b | c | abc,abc |
|
||||
| c | b | abc,abc |
|
||||
| d | e | def,def |
|
||||
| e | d | def,def |
|
||||
| e | f | def,def |
|
||||
| f | e | def,def |
|
||||
| a | d | |
|
||||
| d | a | |
|
||||
| b | d | |
|
||||
| d | b | |
|
||||
| c | d | |
|
||||
| d | c | |
|
||||
| a | e | |
|
||||
| e | a | |
|
||||
| b | e | |
|
||||
| e | b | |
|
||||
| c | e | |
|
||||
| e | c | |
|
||||
| a | f | |
|
||||
| f | a | |
|
||||
| b | f | |
|
||||
| f | b | |
|
||||
| c | f | |
|
||||
| f | c | |
|
||||
|
||||
Scenario: 3 ways connected in a triangle
|
||||
Given the node map
|
||||
@@ -124,13 +124,13 @@ Feature: Basic Routing
|
||||
| ca |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ca |
|
||||
| b | c | bc |
|
||||
| b | a | ab |
|
||||
| c | a | ca |
|
||||
| c | b | bc |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ca,ca |
|
||||
| b | c | bc,bc |
|
||||
| b | a | ab,ab |
|
||||
| c | a | ca,ca |
|
||||
| c | b | bc,bc |
|
||||
|
||||
Scenario: 3 connected triangles
|
||||
Given a grid size of 100 meters
|
||||
@@ -157,12 +157,12 @@ Feature: Basic Routing
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ca |
|
||||
| b | c | bc |
|
||||
| b | a | ab |
|
||||
| c | a | ca |
|
||||
| c | b | bc |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ca,ca |
|
||||
| b | c | bc,bc |
|
||||
| b | a | ab,ab |
|
||||
| c | a | ca,ca |
|
||||
| c | b | bc,bc |
|
||||
|
||||
Scenario: To ways connected at a 45 degree angle
|
||||
Given the node map
|
||||
@@ -176,13 +176,13 @@ Feature: Basic Routing
|
||||
| cde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | d | abc,cde |
|
||||
| a | e | abc,cde |
|
||||
| a | c | abc |
|
||||
| c | a | abc |
|
||||
| c | e | cde |
|
||||
| e | c | cde |
|
||||
| from | to | route |
|
||||
| b | d | abc,cde,cde |
|
||||
| a | e | abc,cde,cde |
|
||||
| a | c | abc,abc |
|
||||
| c | a | abc,abc |
|
||||
| c | e | cde,cde |
|
||||
| e | c | cde,cde |
|
||||
|
||||
Scenario: Grid city center
|
||||
Given the node map
|
||||
@@ -203,11 +203,11 @@ Feature: Basic Routing
|
||||
| dhlp |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| f | g | efgh |
|
||||
| g | f | efgh |
|
||||
| f | j | bfjn |
|
||||
| j | f | bfjn |
|
||||
| from | to | route |
|
||||
| f | g | efgh,efgh |
|
||||
| g | f | efgh,efgh |
|
||||
| f | j | bfjn,bfjn |
|
||||
| j | f | bfjn,bfjn |
|
||||
|
||||
Scenario: Grid city periphery
|
||||
Given the node map
|
||||
@@ -228,11 +228,11 @@ Feature: Basic Routing
|
||||
| dhlp |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | abcd |
|
||||
| d | a | abcd |
|
||||
| a | m | aeim |
|
||||
| m | a | aeim |
|
||||
| from | to | route |
|
||||
| a | d | abcd,abcd |
|
||||
| d | a | abcd,abcd |
|
||||
| a | m | aeim,aeim |
|
||||
| m | a | aeim,aeim |
|
||||
|
||||
Scenario: Testbot - Triangle challenge
|
||||
Given the node map
|
||||
@@ -249,5 +249,5 @@ Feature: Basic Routing
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| d | c | de,ce |
|
||||
| e | d | de |
|
||||
| d | c | de,ce,ce |
|
||||
| e | d | de,de |
|
||||
|
||||
@@ -14,8 +14,8 @@ Feature: Compass bearing
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | NW | 315 |
|
||||
| from | to | route | bearing |
|
||||
| a | b | ab,ab | 315,0 |
|
||||
|
||||
Scenario: Bearing when going west
|
||||
Given the node map
|
||||
@@ -26,8 +26,8 @@ Feature: Compass bearing
|
||||
| ab |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | W | 270 |
|
||||
| from | to | route | bearing |
|
||||
| a | b | ab,ab | 270,0 |
|
||||
|
||||
Scenario: Bearing af 45 degree intervals
|
||||
Given the node map
|
||||
@@ -47,15 +47,15 @@ Feature: Compass bearing
|
||||
| xh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| x | a | xa | N | 0 |
|
||||
| x | b | xb | NW | 315 |
|
||||
| x | c | xc | W | 270 |
|
||||
| x | d | xd | SW | 225 |
|
||||
| x | e | xe | S | 180 |
|
||||
| x | f | xf | SE | 135 |
|
||||
| x | g | xg | E | 90 |
|
||||
| x | h | xh | NE | 45 |
|
||||
| from | to | route | bearing |
|
||||
| x | a | xa,xa | 0,0 |
|
||||
| x | b | xb,xb | 315,0 |
|
||||
| x | c | xc,xc | 270,0 |
|
||||
| x | d | xd,xd | 225,0 |
|
||||
| x | e | xe,xe | 180,0 |
|
||||
| x | f | xf,xf | 135,0 |
|
||||
| x | g | xg,xg | 90,0 |
|
||||
| x | h | xh,xh | 45,0 |
|
||||
|
||||
Scenario: Bearing in a roundabout
|
||||
Given the node map
|
||||
@@ -76,9 +76,9 @@ Feature: Compass bearing
|
||||
| ha | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 |
|
||||
| g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 |
|
||||
| from | to | route | bearing |
|
||||
| c | b | cd,de,ef,fg,gh,ha,ab,ab | 270,225,180,135,90,45,0,0 |
|
||||
| g | f | gh,ha,ab,bc,cd,de,ef,ef | 90,45,0,315,270,225,180,0 |
|
||||
|
||||
Scenario: Bearing should stay constant when zig-zagging
|
||||
Given the node map
|
||||
@@ -96,8 +96,8 @@ Feature: Compass bearing
|
||||
| gh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 |
|
||||
| from | to | route | bearing |
|
||||
| a | h | ab,bc,cd,de,ef,fg,gh,gh | 0,135,0,135,0,135,0,0 |
|
||||
|
||||
Scenario: Bearings on an east-west way.
|
||||
Given the node map
|
||||
@@ -108,37 +108,37 @@ Feature: Compass bearing
|
||||
| abcdef |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | abcdef | E | 90 |
|
||||
| a | c | abcdef | E | 90 |
|
||||
| a | d | abcdef | E | 90 |
|
||||
| a | e | abcdef | E | 90 |
|
||||
| a | f | abcdef | E | 90 |
|
||||
| b | a | abcdef | W | 270 |
|
||||
| b | c | abcdef | E | 90 |
|
||||
| b | d | abcdef | E | 90 |
|
||||
| b | e | abcdef | E | 90 |
|
||||
| b | f | abcdef | E | 90 |
|
||||
| c | a | abcdef | W | 270 |
|
||||
| c | b | abcdef | W | 270 |
|
||||
| c | d | abcdef | E | 90 |
|
||||
| c | e | abcdef | E | 90 |
|
||||
| c | f | abcdef | E | 90 |
|
||||
| d | a | abcdef | W | 270 |
|
||||
| d | b | abcdef | W | 270 |
|
||||
| d | c | abcdef | W | 270 |
|
||||
| d | e | abcdef | E | 90 |
|
||||
| d | f | abcdef | E | 90 |
|
||||
| e | a | abcdef | W | 270 |
|
||||
| e | b | abcdef | W | 270 |
|
||||
| e | c | abcdef | W | 270 |
|
||||
| e | d | abcdef | W | 270 |
|
||||
| e | f | abcdef | E | 90 |
|
||||
| f | a | abcdef | W | 270 |
|
||||
| f | b | abcdef | W | 270 |
|
||||
| f | c | abcdef | W | 270 |
|
||||
| f | d | abcdef | W | 270 |
|
||||
| f | e | abcdef | W | 270 |
|
||||
| from | to | route | bearing |
|
||||
| a | b | abcdef,abcdef | 90,0 |
|
||||
| a | c | abcdef,abcdef | 90,0 |
|
||||
| a | d | abcdef,abcdef | 90,0 |
|
||||
| a | e | abcdef,abcdef | 90,0 |
|
||||
| a | f | abcdef,abcdef | 90,0 |
|
||||
| b | a | abcdef,abcdef | 270,0 |
|
||||
| b | c | abcdef,abcdef | 90,0 |
|
||||
| b | d | abcdef,abcdef | 90,0 |
|
||||
| b | e | abcdef,abcdef | 90,0 |
|
||||
| b | f | abcdef,abcdef | 90,0 |
|
||||
| c | a | abcdef,abcdef | 270,0 |
|
||||
| c | b | abcdef,abcdef | 270,0 |
|
||||
| c | d | abcdef,abcdef | 90,0 |
|
||||
| c | e | abcdef,abcdef | 90,0 |
|
||||
| c | f | abcdef,abcdef | 90,0 |
|
||||
| d | a | abcdef,abcdef | 270,0 |
|
||||
| d | b | abcdef,abcdef | 270,0 |
|
||||
| d | c | abcdef,abcdef | 270,0 |
|
||||
| d | e | abcdef,abcdef | 90,0 |
|
||||
| d | f | abcdef,abcdef | 90,0 |
|
||||
| e | a | abcdef,abcdef | 270,0 |
|
||||
| e | b | abcdef,abcdef | 270,0 |
|
||||
| e | c | abcdef,abcdef | 270,0 |
|
||||
| e | d | abcdef,abcdef | 270,0 |
|
||||
| e | f | abcdef,abcdef | 90,0 |
|
||||
| f | a | abcdef,abcdef | 270,0 |
|
||||
| f | b | abcdef,abcdef | 270,0 |
|
||||
| f | c | abcdef,abcdef | 270,0 |
|
||||
| f | d | abcdef,abcdef | 270,0 |
|
||||
| f | e | abcdef,abcdef | 270,0 |
|
||||
|
||||
Scenario: Bearings at high latitudes
|
||||
# The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html,
|
||||
@@ -161,19 +161,19 @@ Feature: Compass bearing
|
||||
| bd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | N | 0 |
|
||||
| b | c | bc | E | 90 |
|
||||
| c | d | cd | S | 180 |
|
||||
| d | a | da | W | 270 |
|
||||
| b | a | ab | S | 180 |
|
||||
| c | b | bc | W | 270 |
|
||||
| d | c | cd | N | 0 |
|
||||
| a | d | da | E | 90 |
|
||||
| a | c | ac | NE | 45 |
|
||||
| c | a | ac | SW | 225 |
|
||||
| b | d | bd | SE | 135 |
|
||||
| d | b | bd | NW | 315 |
|
||||
| from | to | route | bearing |
|
||||
| a | b | ab,ab | 0,0 |
|
||||
| b | c | bc,bc | 90,0 |
|
||||
| c | d | cd,cd | 180,0 |
|
||||
| d | a | da,da | 270,0 |
|
||||
| b | a | ab,ab | 180,0 |
|
||||
| c | b | bc,bc | 270,0 |
|
||||
| d | c | cd,cd | 0,0 |
|
||||
| a | d | da,da | 90,0 |
|
||||
| a | c | ac,ac | 45,0 |
|
||||
| c | a | ac,ac | 225,0 |
|
||||
| b | d | bd,bd | 135,0 |
|
||||
| d | b | bd,bd | 315,0 |
|
||||
|
||||
Scenario: Bearings at high negative latitudes
|
||||
# The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html,
|
||||
@@ -196,16 +196,16 @@ Feature: Compass bearing
|
||||
| bd |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | compass | bearing |
|
||||
| a | b | ab | S | 180 |
|
||||
| b | c | bc | E | 90 |
|
||||
| c | d | cd | N | 0 |
|
||||
| d | a | da | W | 270 |
|
||||
| b | a | ab | N | 0 |
|
||||
| c | b | bc | W | 270 |
|
||||
| d | c | cd | S | 180 |
|
||||
| a | d | da | E | 90 |
|
||||
| a | c | ac | SE | 135 |
|
||||
| c | a | ac | NW | 315 |
|
||||
| b | d | bd | NE | 45 |
|
||||
| d | b | bd | SW | 225 |
|
||||
| from | to | route | bearing |
|
||||
| a | b | ab,ab | 180,0 |
|
||||
| b | c | bc,bc | 90,0 |
|
||||
| c | d | cd,cd | 0,0 |
|
||||
| d | a | da,da | 270,0 |
|
||||
| b | a | ab,ab | 0,0 |
|
||||
| c | b | bc,bc | 270,0 |
|
||||
| d | c | cd,cd | 180,0 |
|
||||
| a | d | da,da | 90,0 |
|
||||
| a | c | ac,ac | 135,0 |
|
||||
| c | a | ac,ac | 315,0 |
|
||||
| b | d | bd,bd | 45,0 |
|
||||
| d | b | bd,bd | 225,0 |
|
||||
|
||||
@@ -15,11 +15,11 @@ Feature: Bearing parameter
|
||||
|
||||
When I route I should get
|
||||
| from | to | bearings | route | bearing |
|
||||
| b | c | 90 90 | ad | 90 |
|
||||
| b | c | 90 90 | ad,ad | 90,0 |
|
||||
| b | c | 180 90 | | |
|
||||
| b | c | 80 100 | ad | 90 |
|
||||
| b | c | 80 100 | ad,ad | 90,0 |
|
||||
| b | c | 79 100 | | |
|
||||
| b | c | 79,11 100 | ad | 90 |
|
||||
| b | c | 79,11 100 | ad,ad | 90,0 |
|
||||
|
||||
Scenario: Testbot - Intial bearing in simple case
|
||||
Given the node map
|
||||
@@ -35,10 +35,10 @@ Feature: Bearing parameter
|
||||
When I route I should get
|
||||
| from | to | bearings | route | bearing |
|
||||
| 0 | c | 0 0 | | |
|
||||
| 0 | c | 45 45 | bc | 45 ~3% |
|
||||
| 0 | c | 45 45 | bc,bc | 45 ~3% |
|
||||
| 0 | c | 85 85 | | |
|
||||
| 0 | c | 95 95 | | |
|
||||
| 0 | c | 135 135 | ac | 135 ~1% |
|
||||
| 0 | c | 135 135 | ac,ac | 135 ~1% |
|
||||
| 0 | c | 180 180 | | |
|
||||
|
||||
Scenario: Testbot - Initial bearing on split way
|
||||
@@ -55,19 +55,19 @@ Feature: Bearing parameter
|
||||
|
||||
When I route I should get
|
||||
| from | to | bearings | route | bearing |
|
||||
| 0 | b | 10 10 | bc | 0 |
|
||||
| 0 | b | 90 90 | ab | 90 |
|
||||
| 0 | b | 10 10 | bc,bc | 0,0 |
|
||||
| 0 | b | 90 90 | ab,ab | 90,0 |
|
||||
# The returned bearing is wrong here, it's based on the snapped
|
||||
# coordinates, not the acutal edge bearing. This should be
|
||||
# fixed one day, but it's only a problem when we snap too vias
|
||||
# fixed one day, but it's only a problem when we snap two vias
|
||||
# to the same point - DP
|
||||
#| 0 | b | 170 170 | da | 180 |
|
||||
#| 0 | b | 189 189 | da | 180 |
|
||||
| 0 | 1 | 90 270 | ab,bc,cd | 90,0,270 |
|
||||
| 1 | d | 10 10 | bc | 0 |
|
||||
| 1 | d | 90 90 | ab,bc,cd,da | 90,0,270,180 |
|
||||
| 1 | 0 | 189 189 | da | 180 |
|
||||
| 1 | d | 270 270 | cd | 270 |
|
||||
| 0 | 1 | 90 270 | ab,bc,cd,cd | 90,0,270,0 |
|
||||
| 1 | d | 10 10 | bc,bc | 0,0 |
|
||||
| 1 | d | 90 90 | ab,bc,cd,da,da | 90,0,270,180,0 |
|
||||
| 1 | 0 | 189 189 | da,da | 180,0 |
|
||||
| 1 | d | 270 270 | cd,cd | 270,0 |
|
||||
| 1 | d | 349 349 | | |
|
||||
|
||||
Scenario: Testbot - Initial bearing in all direction
|
||||
@@ -100,12 +100,12 @@ Feature: Bearing parameter
|
||||
| ha | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | bearings | route | bearing |
|
||||
| 0 | q | 0 90 | ia,ab,bc,cd,de,ef,fg,gh,ha | 0,90,180,180,270,270,0,0,90 |
|
||||
| 0 | a | 45 90 | jb,bc,cd,de,ef,fg,gh,ha | 45,180,180,270,270,0,0,90 |
|
||||
| 0 | q | 90 90 | kc,cd,de,ef,fg,gh,ha | 90,180,270,270,0,0,90 |
|
||||
| 0 | a | 135 90 | ld,de,ef,fg,gh,ha | 135,270,270,0,0,90 |
|
||||
| 0 | a | 180 90 | me,ef,fg,gh,ha | 180,270,0,0,90 |
|
||||
| 0 | a | 225 90 | nf,fg,gh,ha | 225,0,0,90 |
|
||||
| 0 | a | 270 90 | og,gh,ha | 270,0,90 |
|
||||
| 0 | a | 315 90 | ph,ha | 315,90 |
|
||||
| from | to | bearings | route | bearing |
|
||||
| 0 | q | 0 90 | ia,ab,bc,cd,de,ef,fg,gh,ha,ha | 0,90,180,180,270,270,0,0,90,0 |
|
||||
| 0 | a | 45 90 | jb,bc,cd,de,ef,fg,gh,ha,ha | 45,180,180,270,270,0,0,90,0 |
|
||||
| 0 | q | 90 90 | kc,cd,de,ef,fg,gh,ha,ha | 90,180,270,270,0,0,90,0 |
|
||||
| 0 | a | 135 90 | ld,de,ef,fg,gh,ha,ha | 135,270,270,0,0,90,0 |
|
||||
| 0 | a | 180 90 | me,ef,fg,gh,ha,ha | 180,270,0,0,90,0 |
|
||||
| 0 | a | 225 90 | nf,fg,gh,ha,ha | 225,0,0,90,0 |
|
||||
| 0 | a | 270 90 | og,gh,ha,ha | 270,0,90,0 |
|
||||
| 0 | a | 315 90 | ph,ha,ha | 315,90,0 |
|
||||
|
||||
@@ -17,6 +17,6 @@ Feature: Geometry Compression
|
||||
| fg |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | speed |
|
||||
| b | e | abcdef | 589m | 36 km/h |
|
||||
| e | b | abcdef | 589m | 36 km/h |
|
||||
| from | to | route | distance | speed |
|
||||
| b | e | abcdef,abcdef | 589m | 36 km/h |
|
||||
| e | b | abcdef,abcdef | 589m | 36 km/h |
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@routing @uturn @via @testbot
|
||||
@routing @continue_straight @via @testbot
|
||||
Feature: U-turns at via points
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
Scenario: U-turns at via points disabled by default
|
||||
Scenario: Continue straight at waypoints enabled by default
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| | e | f | g |
|
||||
@@ -20,16 +20,16 @@ Feature: U-turns at via points
|
||||
| fg |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e,c | ab,be,be,ef,fg,dg,cd | head,right,via,straight,straight,straight,straight,destination |
|
||||
| waypoints | route |
|
||||
| a,e,c | ab,be,be,ef,fg,dg,cd,cd |
|
||||
|
||||
Scenario: Query param to allow U-turns at all via points
|
||||
Scenario: Query parameter to disallow changing direction at all waypoints
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| | e | f | g |
|
||||
|
||||
And the query options
|
||||
| uturns | true |
|
||||
| continue_straight | false |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -42,17 +42,16 @@ Feature: U-turns at via points
|
||||
| fg |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,e,c | ab,be,be,be,bc |
|
||||
| waypoints | route |
|
||||
| a,e,c | ab,be,be,be,bc,bc |
|
||||
|
||||
@todo
|
||||
Scenario: Instructions at via points at u-turns
|
||||
Scenario: Instructions at waypoints at u-turns
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| | e | f | g |
|
||||
|
||||
And the query options
|
||||
| uturns | true |
|
||||
| continue_straight | false |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -65,8 +64,8 @@ Feature: U-turns at via points
|
||||
| fg |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e,c | ab,be,be,bc | head,right,uturn,right,destination |
|
||||
| waypoints | route |
|
||||
| a,e,c | ab,be,be,be,bc,bc |
|
||||
|
||||
Scenario: u-turn mixed with non-uturn vias
|
||||
Given the node map
|
||||
@@ -75,19 +74,19 @@ Feature: U-turns at via points
|
||||
| | | e | | f | | g |
|
||||
|
||||
And the query options
|
||||
| uturns | true |
|
||||
| continue_straight | false |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| cd |
|
||||
| be |
|
||||
| dg |
|
||||
| ef |
|
||||
| fg |
|
||||
| nodes | oneway |
|
||||
| ab | no |
|
||||
| bc | no |
|
||||
| cd | no |
|
||||
| be | yes |
|
||||
| dg | no |
|
||||
| ef | no |
|
||||
| fg | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| 1,2,3,4,5 | ab,be,be,be,bc,bc,cd,dg,dg,dg,cd |
|
||||
| waypoints | route |
|
||||
| 1,2,3,4,5 | ab,be,be,be,ef,fg,dg,cd,bc,bc,bc,cd,dg,dg,dg,cd,cd |
|
||||
|
||||
@@ -14,8 +14,8 @@ Feature: Temporary tests related to osrm-datastore
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | ab |
|
||||
| a | b | ab,ab |
|
||||
| b | a | ab,ab |
|
||||
|
||||
Scenario: Scenaria xy
|
||||
Given the node map
|
||||
@@ -27,5 +27,5 @@ Feature: Temporary tests related to osrm-datastore
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xy |
|
||||
| y | x | xy |
|
||||
| x | y | xy,xy |
|
||||
| y | x | xy,xy |
|
||||
|
||||
@@ -15,7 +15,7 @@ Feature: Distance calculation
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | ab | 100m +- 2 |
|
||||
| a | b | ab,ab | 100m +- 2 |
|
||||
|
||||
Scenario: Distance should equal sum of segments, leftwinded
|
||||
Given the node map
|
||||
@@ -28,8 +28,8 @@ Feature: Distance calculation
|
||||
| abcde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde | 300m +-2 |
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde,abcde | 300m +-2 |
|
||||
|
||||
Scenario: Distance should equal sum of segments, rightwinded
|
||||
Given the node map
|
||||
@@ -42,8 +42,8 @@ Feature: Distance calculation
|
||||
| abcde |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde | 300m +-2 |
|
||||
| from | to | route | distance |
|
||||
| a | d | abcde,abcde | 300m +-2 |
|
||||
|
||||
Scenario: 10m distances
|
||||
Given a grid size of 10 meters
|
||||
@@ -56,13 +56,13 @@ Feature: Distance calculation
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 10m +-2 |
|
||||
| b | a | abc | 10m +-2 |
|
||||
| b | c | abc | 10m +-2 |
|
||||
| c | b | abc | 10m +-2 |
|
||||
| a | c | abc | 20m +-4 |
|
||||
| c | a | abc | 20m +-4 |
|
||||
| from | to | route | distance |
|
||||
| a | b | abc,abc | 10m +-2 |
|
||||
| b | a | abc,abc | 10m +-2 |
|
||||
| b | c | abc,abc | 10m +-2 |
|
||||
| c | b | abc,abc | 10m +-2 |
|
||||
| a | c | abc,abc | 20m +-4 |
|
||||
| c | a | abc,abc | 20m +-4 |
|
||||
|
||||
Scenario: 100m distances
|
||||
Given a grid size of 100 meters
|
||||
@@ -75,13 +75,13 @@ Feature: Distance calculation
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 100m +-2 |
|
||||
| b | a | abc | 100m +-2 |
|
||||
| b | c | abc | 100m +-2 |
|
||||
| c | b | abc | 100m +-2 |
|
||||
| a | c | abc | 200m +-4 |
|
||||
| c | a | abc | 200m +-4 |
|
||||
| from | to | route | distance |
|
||||
| a | b | abc,abc | 100m +-2 |
|
||||
| b | a | abc,abc | 100m +-2 |
|
||||
| b | c | abc,abc | 100m +-2 |
|
||||
| c | b | abc,abc | 100m +-2 |
|
||||
| a | c | abc,abc | 200m +-4 |
|
||||
| c | a | abc,abc | 200m +-4 |
|
||||
|
||||
Scenario: 1km distance
|
||||
Given a grid size of 1000 meters
|
||||
@@ -94,13 +94,13 @@ Feature: Distance calculation
|
||||
| abc |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abc | 1000m +-2 |
|
||||
| b | a | abc | 1000m +-2 |
|
||||
| b | c | abc | 1000m +-2 |
|
||||
| c | b | abc | 1000m +-2 |
|
||||
| a | c | abc | 2000m +-4 |
|
||||
| c | a | abc | 2000m +-4 |
|
||||
| from | to | route | distance |
|
||||
| a | b | abc,abc | 1000m +-2 |
|
||||
| b | a | abc,abc | 1000m +-2 |
|
||||
| b | c | abc,abc | 1000m +-2 |
|
||||
| c | b | abc,abc | 1000m +-2 |
|
||||
| a | c | abc,abc | 2000m +-4 |
|
||||
| c | a | abc,abc | 2000m +-4 |
|
||||
|
||||
Scenario: Distance of a winding south-north path
|
||||
Given a grid size of 10 meters
|
||||
@@ -115,14 +115,14 @@ Feature: Distance calculation
|
||||
| abcdefgh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abcdefgh | 10m +-2 |
|
||||
| a | c | abcdefgh | 20m +-4 |
|
||||
| a | d | abcdefgh | 30m +-6 |
|
||||
| a | e | abcdefgh | 40m +-8 |
|
||||
| a | f | abcdefgh | 50m +-10 |
|
||||
| a | g | abcdefgh | 60m +-12 |
|
||||
| a | h | abcdefgh | 70m +-14 |
|
||||
| from | to | route | distance |
|
||||
| a | b | abcdefgh,abcdefgh | 10m +-2 |
|
||||
| a | c | abcdefgh,abcdefgh | 20m +-4 |
|
||||
| a | d | abcdefgh,abcdefgh | 30m +-6 |
|
||||
| a | e | abcdefgh,abcdefgh | 40m +-8 |
|
||||
| a | f | abcdefgh,abcdefgh | 50m +-10 |
|
||||
| a | g | abcdefgh,abcdefgh | 60m +-12 |
|
||||
| a | h | abcdefgh,abcdefgh | 70m +-14 |
|
||||
|
||||
Scenario: Distance of a winding east-west path
|
||||
Given a grid size of 10 meters
|
||||
@@ -135,14 +135,14 @@ Feature: Distance calculation
|
||||
| abcdefgh |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | b | abcdefgh | 10m +-2 |
|
||||
| a | c | abcdefgh | 20m +-4 |
|
||||
| a | d | abcdefgh | 30m +-6 |
|
||||
| a | e | abcdefgh | 40m +-8 |
|
||||
| a | f | abcdefgh | 50m +-10 |
|
||||
| a | g | abcdefgh | 60m +-12 |
|
||||
| a | h | abcdefgh | 70m +-14 |
|
||||
| from | to | route | distance |
|
||||
| a | b | abcdefgh,abcdefgh | 10m +-2 |
|
||||
| a | c | abcdefgh,abcdefgh | 20m +-4 |
|
||||
| a | d | abcdefgh,abcdefgh | 30m +-6 |
|
||||
| a | e | abcdefgh,abcdefgh | 40m +-8 |
|
||||
| a | f | abcdefgh,abcdefgh | 50m +-10 |
|
||||
| a | g | abcdefgh,abcdefgh | 60m +-12 |
|
||||
| a | h | abcdefgh,abcdefgh | 70m +-14 |
|
||||
|
||||
Scenario: Geometric distances
|
||||
Given a grid size of 100 meters
|
||||
@@ -184,30 +184,30 @@ Feature: Distance calculation
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| x | a | xa | 300m +-2 |
|
||||
| x | b | xb | 316m +-2 |
|
||||
| x | c | xc | 360m +-2 |
|
||||
| x | d | xd | 424m +-2 |
|
||||
| x | e | xe | 360m +-2 |
|
||||
| x | f | xf | 316m +-2 |
|
||||
| x | g | xg | 300m +-2 |
|
||||
| x | h | xh | 316m +-2 |
|
||||
| x | i | xi | 360m +-2 |
|
||||
| x | j | xj | 424m +-2 |
|
||||
| x | k | xk | 360m +-2 |
|
||||
| x | l | xl | 316m +-2 |
|
||||
| x | m | xm | 300m +-2 |
|
||||
| x | n | xn | 316m +-2 |
|
||||
| x | o | xo | 360m +-2 |
|
||||
| x | p | xp | 424m +-2 |
|
||||
| x | q | xq | 360m +-2 |
|
||||
| x | r | xr | 316m +-2 |
|
||||
| x | s | xs | 300m +-2 |
|
||||
| x | t | xt | 316m +-2 |
|
||||
| x | u | xu | 360m +-2 |
|
||||
| x | v | xv | 424m +-2 |
|
||||
| x | w | xw | 360m +-2 |
|
||||
| x | y | xy | 316m +-2 |
|
||||
| x | a | xa,xa | 300m +-2 |
|
||||
| x | b | xb,xb | 316m +-2 |
|
||||
| x | c | xc,xc | 360m +-2 |
|
||||
| x | d | xd,xd | 424m +-2 |
|
||||
| x | e | xe,xe | 360m +-2 |
|
||||
| x | f | xf,xf | 316m +-2 |
|
||||
| x | g | xg,xg | 300m +-2 |
|
||||
| x | h | xh,xh | 316m +-2 |
|
||||
| x | i | xi,xi | 360m +-2 |
|
||||
| x | j | xj,xj | 424m +-2 |
|
||||
| x | k | xk,xk | 360m +-2 |
|
||||
| x | l | xl,xl | 316m +-2 |
|
||||
| x | m | xm,xm | 300m +-2 |
|
||||
| x | n | xn,xn | 316m +-2 |
|
||||
| x | o | xo,xo | 360m +-2 |
|
||||
| x | p | xp,xp | 424m +-2 |
|
||||
| x | q | xq,xq | 360m +-2 |
|
||||
| x | r | xr,xr | 316m +-2 |
|
||||
| x | s | xs,xs | 300m +-2 |
|
||||
| x | t | xt,xt | 316m +-2 |
|
||||
| x | u | xu,xu | 360m +-2 |
|
||||
| x | v | xv,xv | 424m +-2 |
|
||||
| x | w | xw,xw | 360m +-2 |
|
||||
| x | y | xy,xy | 316m +-2 |
|
||||
|
||||
@maze
|
||||
Scenario: Distance of a maze of short segments
|
||||
@@ -224,5 +224,5 @@ Feature: Distance calculation
|
||||
| abcdefghijklmnopqrst |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance |
|
||||
| a | t | abcdefghijklmnopqrst | 133m +-2 |
|
||||
| from | to | route | distance |
|
||||
| a | t | abcdefghijklmnopqrst,abcdefghijklmnopqrst | 133m +-2 |
|
||||
|
||||
@@ -16,9 +16,9 @@ Feature: Basic Distance Matrix
|
||||
| ab |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | a | b |
|
||||
| a | 0 | 100 |
|
||||
| b | 100 | 0 |
|
||||
| | a | b |
|
||||
| a | 0 | 10 |
|
||||
| b | 10 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix with different way speeds
|
||||
Given the node map
|
||||
@@ -31,11 +31,11 @@ Feature: Basic Distance Matrix
|
||||
| cd | tertiary |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | a | b | c | d |
|
||||
| a | 0 | 100 | 300 | 600 |
|
||||
| b | 100 | 0 | 200 | 500 |
|
||||
| c | 300 | 200 | 0 | 300 |
|
||||
| d | 600 | 500 | 300 | 0 |
|
||||
| | a | b | c | d |
|
||||
| a | 0 | 10 | 30 | 60 |
|
||||
| b | 10 | 0 | 20 | 50 |
|
||||
| c | 30 | 20 | 0 | 30 |
|
||||
| d | 60 | 50 | 30 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix with fuzzy match
|
||||
Given the node map
|
||||
@@ -47,8 +47,8 @@ Feature: Basic Distance Matrix
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | a | b |
|
||||
| a | 0 | 95 +- 10 |
|
||||
| b | 95 ~10% | 0 |
|
||||
| a | 0 | 9 +- 2 |
|
||||
| b | 9 ~15% | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix of small grid
|
||||
Given the node map
|
||||
@@ -64,11 +64,11 @@ Feature: Basic Distance Matrix
|
||||
| cf |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | a | b | e | f |
|
||||
| a | 0 | 100 | 200 | 300 |
|
||||
| b | 100 | 0 | 100 | 200 |
|
||||
| e | 200 | 100 | 0 | 100 |
|
||||
| f | 300 | 200 | 100 | 0 |
|
||||
| | a | b | e | f |
|
||||
| a | 0 | 10 | 20 | 30 |
|
||||
| b | 10 | 0 | 10 | 20 |
|
||||
| e | 20 | 10 | 0 | 10 |
|
||||
| f | 30 | 20 | 10 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix of network with unroutable parts
|
||||
Given the node map
|
||||
@@ -79,9 +79,9 @@ Feature: Basic Distance Matrix
|
||||
| ab | yes |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | a | b |
|
||||
| a | 0 | 100 |
|
||||
| b | | 0 |
|
||||
| | a | b |
|
||||
| a | 0 | 10 |
|
||||
| b | | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix of network with oneways
|
||||
Given the node map
|
||||
@@ -95,11 +95,11 @@ Feature: Basic Distance Matrix
|
||||
| by | |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | x | y | d | e |
|
||||
| x | 0 | 300 | 400 | 300 |
|
||||
| y | 500 | 0 | 300 | 200 |
|
||||
| d | 200 | 300 | 0 | 300 |
|
||||
| e | 300 | 400 | 100 | 0 |
|
||||
| | x | y | d | e |
|
||||
| x | 0 | 30 | 40 | 30 |
|
||||
| y | 50 | 0 | 30 | 20 |
|
||||
| d | 20 | 30 | 0 | 30 |
|
||||
| e | 30 | 40 | 10 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix and with only one source
|
||||
Given the node map
|
||||
@@ -115,8 +115,8 @@ Feature: Basic Distance Matrix
|
||||
| cf |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | a | b | e | f |
|
||||
| a | 0 | 100 | 200 | 300 |
|
||||
| | a | b | e | f |
|
||||
| a | 0 | 10 | 20 | 30 |
|
||||
|
||||
Scenario: Testbot - Travel time 3x2 matrix
|
||||
Given the node map
|
||||
@@ -132,9 +132,9 @@ Feature: Basic Distance Matrix
|
||||
| cf |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | b | e | f |
|
||||
| a | 100 | 200 | 300 |
|
||||
| b | 0 | 100 | 200 |
|
||||
| | b | e | f |
|
||||
| a | 10 | 20 | 30 |
|
||||
| b | 0 | 10 | 20 |
|
||||
|
||||
Scenario: Testbot - All coordinates are from same small component
|
||||
Given a grid size of 300 meters
|
||||
@@ -152,9 +152,9 @@ Feature: Basic Distance Matrix
|
||||
| fg |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | f | g |
|
||||
| f | 0 | 300 |
|
||||
| g | 300 | 0 |
|
||||
| | f | g |
|
||||
| f | 0 | 30 |
|
||||
| g | 30 | 0 |
|
||||
|
||||
Scenario: Testbot - Coordinates are from different small component and snap to big CC
|
||||
Given a grid size of 300 meters
|
||||
@@ -173,11 +173,11 @@ Feature: Basic Distance Matrix
|
||||
| hi |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | f | g | h | i |
|
||||
| f | 0 | 300 | 0 | 300 |
|
||||
| g | 300 | 0 | 300 | 0 |
|
||||
| h | 0 | 300 | 0 | 300 |
|
||||
| i | 300 | 0 | 300 | 0 |
|
||||
| | f | g | h | i |
|
||||
| f | 0 | 30 | 0 | 30 |
|
||||
| g | 30 | 0 | 30 | 0 |
|
||||
| h | 0 | 30 | 0 | 30 |
|
||||
| i | 30 | 0 | 30 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel time matrix with loops
|
||||
Given the node map
|
||||
@@ -192,8 +192,8 @@ Feature: Basic Distance Matrix
|
||||
| da | yes |
|
||||
|
||||
When I request a travel time matrix I should get
|
||||
| | 1 | 2 | 3 | 4 |
|
||||
| 1 | 0 | 100 +-1 | 400 +-1 | 500 +-1 |
|
||||
| 2 | 700 +-1 | 0 | 300 +-1 | 400 +-1 |
|
||||
| 3 | 400 +-1 | 500 +-1 | 0 | 100 +-1 |
|
||||
| 4 | 300 +-1 | 400 +-1 | 700 +-1 | 0 |
|
||||
| | 1 | 2 | 3 | 4 |
|
||||
| 1 | 0 | 10 +-1 | 40 +-1 | 50 +-1 |
|
||||
| 2 | 70 +-1 | 0 | 30 +-1 | 40 +-1 |
|
||||
| 3 | 40 +-1 | 50 +-1 | 0 | 10 +-1 |
|
||||
| 4 | 30 +-1 | 40 +-1 | 70 +-1 | 0 |
|
||||
|
||||
@@ -20,11 +20,11 @@ Feature: Durations
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | time |
|
||||
| a | b | ab | 100m +-1 | 60s +-1 |
|
||||
| b | c | bc | 200m +-1 | 600s +-1 |
|
||||
| c | d | cd | 300m +-1 | 3600s +-1 |
|
||||
| d | e | de | 141m +-2 | 36000s +-1 |
|
||||
| e | f | ef | 224m +-2 | 3723s +-1 |
|
||||
| a | b | ab,ab | 100m +-1 | 60s +-1 |
|
||||
| b | c | bc,bc | 200m +-1 | 600s +-1 |
|
||||
| c | d | cd,cd | 300m +-1 | 3600s +-1 |
|
||||
| d | e | de,de | 141m +-2 | 36000s +-1 |
|
||||
| e | f | ef,ef | 224m +-2 | 3723s +-1 |
|
||||
|
||||
@todo
|
||||
Scenario: Partial duration of ways
|
||||
@@ -36,7 +36,7 @@ Feature: Durations
|
||||
| abc | primary | 0:01 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | distance | time |
|
||||
| a | c | abc | 300m +-1 | 60s +-1 |
|
||||
| a | b | ab | 100m +-1 | 20s +-1 |
|
||||
| b | c | bc | 200m +-1 | 40s +-1 |
|
||||
| from | to | route | distance | time |
|
||||
| a | c | abc,abc | 300m +-1 | 60s +-1 |
|
||||
| a | b | ab,ab | 100m +-1 | 20s +-1 |
|
||||
| b | c | bc,bc | 200m +-1 | 40s +-1 |
|
||||
|
||||
@@ -20,18 +20,18 @@ Feature: Testbot - Walkthrough
|
||||
| de | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abc |
|
||||
| a | c | abc |
|
||||
| a | d | abc,cd |
|
||||
| a | e | abc,ce |
|
||||
| b | a | abc |
|
||||
| b | c | abc |
|
||||
| b | d | abc,cd |
|
||||
| b | e | abc,ce |
|
||||
| d | a | de,ce,abc |
|
||||
| d | b | de,ce,abc |
|
||||
| d | e | de |
|
||||
| e | a | ce,abc |
|
||||
| e | b | ce,abc |
|
||||
| e | c | ce |
|
||||
| from | to | route |
|
||||
| a | b | abc,abc |
|
||||
| a | c | abc,abc |
|
||||
| a | d | abc,cd,cd |
|
||||
| a | e | abc,ce,ce |
|
||||
| b | a | abc,abc |
|
||||
| b | c | abc,abc |
|
||||
| b | d | abc,cd,cd |
|
||||
| b | e | abc,ce,ce |
|
||||
| d | a | de,ce,abc,abc |
|
||||
| d | b | de,ce,abc,abc |
|
||||
| d | e | de,de |
|
||||
| e | a | ce,abc,abc |
|
||||
| e | b | ce,abc,abc |
|
||||
| e | c | ce,ce |
|
||||
|
||||
@@ -18,9 +18,9 @@ Feature: Choosing fastest route
|
||||
| asb | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,atb,by |
|
||||
| y | x | by,atb,xa |
|
||||
| from | to | route |
|
||||
| x | y | xa,atb,by,by |
|
||||
| y | x | by,atb,xa,xa |
|
||||
|
||||
Scenario: Pick the fastest route, even when it's longer
|
||||
Given the node map
|
||||
@@ -33,6 +33,6 @@ Feature: Choosing fastest route
|
||||
| asb | secondary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | apb |
|
||||
| b | a | apb |
|
||||
| from | to | route |
|
||||
| a | b | apb,apb |
|
||||
| b | a | apb,apb |
|
||||
|
||||
@@ -32,11 +32,11 @@ Feature: Testbot - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| b | c | bc | 60s +-1 |
|
||||
| f | g | fg | 600s +-1 |
|
||||
| j | k | jk | 3600s +-1 |
|
||||
| n | o | no | 86400s +-1 |
|
||||
| r | s | rs | 345600s +-1 |
|
||||
| b | c | bc,bc | 60s +-1 |
|
||||
| f | g | fg,fg | 600s +-1 |
|
||||
| j | k | jk,jk | 3600s +-1 |
|
||||
| n | o | no,no | 86400s +-1 |
|
||||
| r | s | rs,rs | 345600s +-1 |
|
||||
|
||||
@todo
|
||||
Scenario: Testbot - Week long ferry routes
|
||||
@@ -59,9 +59,9 @@ Feature: Testbot - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| b | c | bc | 86400s +-1 |
|
||||
| f | g | fg | 604800s +-1 |
|
||||
| j | k | jk | 259200s +-1 |
|
||||
| b | c | bc,bc | 86400s +-1 |
|
||||
| f | g | fg,fg | 604800s +-1 |
|
||||
| j | k | jk,jk | 259200s +-1 |
|
||||
|
||||
Scenario: Testbot - Ferry duration, multiple nodes
|
||||
Given the node map
|
||||
@@ -76,8 +76,8 @@ Feature: Testbot - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | d | ad | 3600s +-1 |
|
||||
| d | a | ad | 3600s +-1 |
|
||||
| a | d | ad,ad | 3600s +-1 |
|
||||
| d | a | ad,ad | 3600s +-1 |
|
||||
|
||||
@todo
|
||||
Scenario: Testbot - Ferry duration, individual parts, fast
|
||||
@@ -95,11 +95,11 @@ Feature: Testbot - Handle ferry routes
|
||||
| abcd | | ferry | 0:06 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | d | abcd | 360s +-1 |
|
||||
| a | b | abcd | 60s +-1 |
|
||||
| b | c | abcd | 120s +-1 |
|
||||
| c | d | abcd | 180s +-1 |
|
||||
| from | to | route | time |
|
||||
| a | d | abcd,abcd | 360s +-1 |
|
||||
| a | b | abcd,abcd | 60s +-1 |
|
||||
| b | c | abcd,abcd | 120s +-1 |
|
||||
| c | d | abcd,abcd | 180s +-1 |
|
||||
|
||||
@todo
|
||||
Scenario: Testbot - Ferry duration, individual parts, slow
|
||||
@@ -116,11 +116,11 @@ Feature: Testbot - Handle ferry routes
|
||||
| abcd | | ferry | 1:00 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | d | abcd | 3600s ~1% |
|
||||
| a | b | abcd | 600s ~1% |
|
||||
| b | c | abcd | 1200s ~1% |
|
||||
| c | d | abcd | 1800s ~1% |
|
||||
| from | to | route | time |
|
||||
| a | d | abcd,abcd | 3600s ~1% |
|
||||
| a | b | abcd,abcd | 600s ~1% |
|
||||
| b | c | abcd,abcd | 1200s ~1% |
|
||||
| c | d | abcd,abcd | 1800s ~1% |
|
||||
|
||||
Scenario: Testbot - Ferry duration, connected routes
|
||||
Given the node map
|
||||
@@ -135,9 +135,9 @@ Feature: Testbot - Handle ferry routes
|
||||
| defg | | ferry | 0:30 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | g | abcd,defg | 3600s +-1 |
|
||||
| g | a | defg,abcd | 3600s +-1 |
|
||||
| from | to | route | time |
|
||||
| a | g | abcd,defg,defg | 3600s +-1 |
|
||||
| g | a | defg,abcd,abcd | 3600s +-1 |
|
||||
|
||||
Scenario: Testbot - Prefer road when faster than ferry
|
||||
Given the node map
|
||||
@@ -154,9 +154,9 @@ Feature: Testbot - Handle ferry routes
|
||||
| defg | | ferry | 0:01 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | g | xa,xy,yg | 60s +-25% |
|
||||
| g | a | yg,xy,xa | 60s +-25% |
|
||||
| from | to | route | time |
|
||||
| a | g | xa,xy,yg,yg | 60s +-25% |
|
||||
| g | a | yg,xy,xa,xa | 60s +-25% |
|
||||
|
||||
Scenario: Testbot - Long winding ferry route
|
||||
Given the node map
|
||||
@@ -170,9 +170,9 @@ Feature: Testbot - Handle ferry routes
|
||||
| abcdefg | | ferry | 6:30 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | g | abcdefg | 23400s +-2 |
|
||||
| g | a | abcdefg | 23400s +-2 |
|
||||
| from | to | route | time |
|
||||
| a | g | abcdefg,abcdefg | 23400s +-2 |
|
||||
| g | a | abcdefg,abcdefg | 23400s +-2 |
|
||||
|
||||
@todo
|
||||
Scenario: Testbot - Ferry duration formats
|
||||
@@ -194,12 +194,12 @@ Feature: Testbot - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | b | ab | 60s +-1 |
|
||||
| c | d | cd | 60s +-1 |
|
||||
| e | f | ef | 3600s +-1 |
|
||||
| g | h | gh | 3600s +-1 |
|
||||
| i | j | ij | 8400s +-1 |
|
||||
| k | l | kl | 36000s +-1 |
|
||||
| m | n | mn | 360000s +-1 |
|
||||
| o | p | mn | 3600000s +-1 |
|
||||
| q | r | mn | 36000000s +-1 |
|
||||
| a | b | ab,ab | 60s +-1 |
|
||||
| c | d | cd,cd | 60s +-1 |
|
||||
| e | f | ef,ef | 3600s +-1 |
|
||||
| g | h | gh,gh | 3600s +-1 |
|
||||
| i | j | ij,ij | 8400s +-1 |
|
||||
| k | l | kl,kl | 36000s +-1 |
|
||||
| m | n | mn,mn | 360000s +-1 |
|
||||
| o | p | mn,mn | 3600000s +-1 |
|
||||
| q | r | mn,mn | 36000000s +-1 |
|
||||
|
||||
@@ -22,5 +22,5 @@ Feature: Fixed bugs, kept to check for regressions
|
||||
| cdec |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| x | y | abc | head,destination |
|
||||
| from | to | route |
|
||||
| x | y | abc,abc |
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user