Compare commits
273 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9912b26b32 | |||
| 838b2a750e | |||
| c2dc7e9cd0 | |||
| 0fc1aa2711 | |||
| 89cf6d9e74 | |||
| 61c430c098 | |||
| 4b75cb8b0e | |||
| 53f87c08b5 | |||
| e23dc8977f | |||
| 421dc5b6ec | |||
| 247f1c120f | |||
| e011c60e12 | |||
| 26c909b64b | |||
| acb7916996 | |||
| 40b5045a0a | |||
| b17f40862c | |||
| 7702ebde61 | |||
| 6951eadc18 | |||
| cf2573157f | |||
| 80c55119d2 | |||
| 7323221e3b | |||
| fb5bd818d9 | |||
| 43a4e8db12 | |||
| 302390696e | |||
| 2508629d6c | |||
| 90c390d7a6 | |||
| 28178b12c7 | |||
| 95442d45aa | |||
| 6eb4f090f9 | |||
| b4ad6588ed | |||
| 56282b0e3f | |||
| 2385602500 | |||
| 628a154d7f | |||
| efaed59b9b | |||
| bdee13dea8 | |||
| c615910874 | |||
| 9e1398c68a | |||
| af10692d2d | |||
| e7abe37b10 | |||
| bc8617a9f4 | |||
| 00e243b23b | |||
| 27324d0270 | |||
| 0c838fb60c | |||
| 0713ef5862 | |||
| bee1ba8854 | |||
| da252c7597 | |||
| a4460abc83 | |||
| 261636febb | |||
| 21f15f0a29 | |||
| bd068ff2a6 | |||
| d09f5c0e3a | |||
| 45140ca9f7 | |||
| c6be2e768a | |||
| 6339395cba | |||
| bd6492bb38 | |||
| f93b331817 | |||
| 20e4096c4b | |||
| 97952a9289 | |||
| 960a595268 | |||
| a3c94ef632 | |||
| 84fd38ac9c | |||
| 303a8fae32 | |||
| 21686ee8a9 | |||
| c8b142a676 | |||
| 58061a68c4 | |||
| 9c11197768 | |||
| f347efb006 | |||
| af8ddac2af | |||
| b1358de9bb | |||
| f4dc93ae66 | |||
| 20a77f6d51 | |||
| c1ad275e71 | |||
| 6bae070091 | |||
| 3687b6cb4b | |||
| 196ed9eb46 | |||
| 37c941dff3 | |||
| 40a428d49f | |||
| 48eeef2d30 | |||
| c34520f3a4 | |||
| 36db965c39 | |||
| 4e81764ce2 | |||
| 1e9f983289 | |||
| 2e404c60f4 | |||
| 40857aae61 | |||
| a64145b712 | |||
| 945f6da85e | |||
| 76d5d054cb | |||
| 20cfa159ec | |||
| 3ff1a4263d | |||
| 3141eb5dce | |||
| 75d6f59026 | |||
| ae42ce7017 | |||
| e9c9c87bbc | |||
| 8a6dba46b1 | |||
| 93299d6651 | |||
| f34320a89b | |||
| a17b07bc4c | |||
| 3a01ba52ef | |||
| d796c66990 | |||
| 80b705e997 | |||
| 7069af3e20 | |||
| 209a926b45 | |||
| 71e0c7a3cf | |||
| b88d96f07d | |||
| 46f75c3d92 | |||
| 3b8e5cec88 | |||
| a420169109 | |||
| a8db269fd5 | |||
| a5efcfdede | |||
| 1ecc913fc2 | |||
| 08eb3b11bc | |||
| b59d9a2f27 | |||
| e9a5e32330 | |||
| be9bdfa47e | |||
| 153e934ed4 | |||
| 4757c96d9a | |||
| 1efc527281 | |||
| 468b59c53d | |||
| 15426975b6 | |||
| bbcf343e40 | |||
| f0d3cf4e43 | |||
| 4c965b9f44 | |||
| e5143247c2 | |||
| 3a676183b2 | |||
| 64265926a4 | |||
| df2d4daad3 | |||
| fd0d79e17b | |||
| 84ce97a31e | |||
| 7e0c9f7340 | |||
| 917a36eaee | |||
| 7620d419c6 | |||
| 50c90b29d2 | |||
| 0e77cf53f6 | |||
| 9dfbae69cc | |||
| c1ad4f6b45 | |||
| 8135f08958 | |||
| 645b1ffd75 | |||
| 8d0202d240 | |||
| b1809d1667 | |||
| 2e9a7d9c1a | |||
| 1f7aa6f812 | |||
| 032a189440 | |||
| be5fc50136 | |||
| 0affec8f17 | |||
| 8c9ae4d3b4 | |||
| dac6bb27aa | |||
| 6c0ab24100 | |||
| 95c7832c3e | |||
| c2e8d6160f | |||
| f609905267 | |||
| f7c8bac3fd | |||
| 58811d8f5c | |||
| 54960f9b5d | |||
| cd45ddda13 | |||
| 04acd2141b | |||
| 336ec4741c | |||
| 8da40419ee | |||
| 0b5c7a97a7 | |||
| d9e8caf369 | |||
| e208485c17 | |||
| 5a6dee80ac | |||
| 67fae1d1f0 | |||
| 1b31099f73 | |||
| 897518a297 | |||
| a9b6686725 | |||
| 2c7cb5baba | |||
| 29160eec9c | |||
| fe00a8a0ca | |||
| 64574c779f | |||
| 64e4b7eaa0 | |||
| 48824c4c8a | |||
| ababeb3a69 | |||
| cfa2a63323 | |||
| 9418f5613a | |||
| 22a3e06e1c | |||
| b91c2f0299 | |||
| 07416c7a46 | |||
| 440dccb81b | |||
| e413b25cd9 | |||
| 5ece65cade | |||
| c0c9ec1c7b | |||
| f2f00b99e0 | |||
| 7b755d6f8b | |||
| 7d63301039 | |||
| 49f0b1eb59 | |||
| b2ed46efb5 | |||
| 58b61c68a3 | |||
| 30b8225812 | |||
| 54530a14e9 | |||
| ee8ffcf57b | |||
| 5e9397fcca | |||
| 8508834e50 | |||
| 924a8a7e38 | |||
| 960e9178ba | |||
| a3257ff651 | |||
| 960f9ba29a | |||
| 3940cc1641 | |||
| a498ba6537 | |||
| 5b5a907023 | |||
| c1cb3ebff7 | |||
| 6a555a477b | |||
| 175d27691d | |||
| 5ede5577d1 | |||
| 0bfbe5ad16 | |||
| 54ceb05420 | |||
| fef0344be0 | |||
| b12fee5c0a | |||
| 1ef75c7a61 | |||
| 8c5ac84f0c | |||
| 44739f2dc3 | |||
| d52d530cbe | |||
| 5fb00ff7bf | |||
| 4c7aa8f1c0 | |||
| 2522f70f86 | |||
| e47e8ed335 | |||
| 2927b491c3 | |||
| ba2a0b3566 | |||
| 98caa0bcd9 | |||
| 4a2a100569 | |||
| 3073f4c0d1 | |||
| 7d900e3b5a | |||
| 6d78c11fd2 | |||
| 1bee82e288 | |||
| a41caf0efb | |||
| a3e0eb03db | |||
| 34f62b4894 | |||
| b28077a437 | |||
| 359ab2b56e | |||
| e42c23686b | |||
| d98f1a2632 | |||
| aa736dbe3a | |||
| 3534203083 | |||
| 517cb5f094 | |||
| b910ab9bcb | |||
| 5a29e29535 | |||
| 0fd71260d3 | |||
| 54367bfa98 | |||
| 1e9806f872 | |||
| 1e704aa7f2 | |||
| 8a404ea850 | |||
| e2e279bc85 | |||
| c914afdbf1 | |||
| 49a057ebc0 | |||
| d660c1609c | |||
| 74bc8966a8 | |||
| 9d8a3e3c97 | |||
| a308b86056 | |||
| 1b540fe0ba | |||
| 929e5a4de6 | |||
| df4f0d043a | |||
| 09df8d47a5 | |||
| c8b75c9046 | |||
| dd8f5ac01d | |||
| 22479ff5d8 | |||
| 688b1f8bef | |||
| e5464526c8 | |||
| 37b8d3acd4 | |||
| 4f13208ce8 | |||
| 383640caaf | |||
| 42f3401dd7 | |||
| 7fb57c924f | |||
| 97592e5bc3 | |||
| 9922c0f4f7 | |||
| f27434f2fb | |||
| 32d39b7b49 | |||
| 5c20c7b295 | |||
| df000debe9 | |||
| 31511416ed | |||
| 99b02cedfb | |||
| 4136bf2808 | |||
| 93d6fd05a9 | |||
| 73c4bc1411 | |||
| dc9b4bcfec |
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"plugins": ["transform-class-properties"],
|
||||||
"presets": [
|
"presets": [
|
||||||
"stage-0",
|
"stage-0",
|
||||||
"es2015",
|
"es2015",
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Explicitly declare text files you want to always be normalized and converted
|
||||||
|
# to native line endings on checkout.
|
||||||
|
*.cpp text
|
||||||
|
*.hpp text
|
||||||
|
|
||||||
|
# Declare files that will always have CRLF line endings on checkout.
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.cmd text eol=crlf
|
||||||
|
*.ps1 text eol=crlf
|
||||||
|
|
||||||
|
# Declare files that will always have LF line endings on checkout.
|
||||||
|
*.sh text eol=lf
|
||||||
@@ -46,6 +46,7 @@ Thumbs.db
|
|||||||
|
|
||||||
# build related files #
|
# build related files #
|
||||||
#######################
|
#######################
|
||||||
|
/_build*
|
||||||
/build/
|
/build/
|
||||||
/example/build/
|
/example/build/
|
||||||
/test/data/monaco*
|
/test/data/monaco*
|
||||||
@@ -61,6 +62,11 @@ Thumbs.db
|
|||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
|
|
||||||
|
# Visual Studio (Code) related files #
|
||||||
|
######################################
|
||||||
|
/.vs*
|
||||||
|
/*.local.bat
|
||||||
|
|
||||||
# stxxl related files #
|
# stxxl related files #
|
||||||
#######################
|
#######################
|
||||||
.stxxl
|
.stxxl
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
*
|
||||||
|
!README.md
|
||||||
|
!CHANGELOG.md
|
||||||
|
!CONTRIBUTING.MD
|
||||||
|
!LICENCE.TXT
|
||||||
|
!package.json
|
||||||
|
!package-lock.json
|
||||||
|
!yarn.lock
|
||||||
|
!docs
|
||||||
|
!example
|
||||||
|
!taginfo.json
|
||||||
|
!lib/*.js
|
||||||
|
!profiles/*
|
||||||
|
!profiles/lib/*
|
||||||
|
!profiles/examples/*
|
||||||
|
!scripts/node_install.sh
|
||||||
+29
-15
@@ -7,19 +7,15 @@ git:
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
node_js:
|
|
||||||
- "4"
|
|
||||||
- "6"
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- "5.8"
|
|
||||||
# enable building tags
|
# enable building tags
|
||||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
|
- 5.12
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
yarn: true
|
yarn: true
|
||||||
@@ -73,7 +69,7 @@ matrix:
|
|||||||
addons: &gcc6
|
addons: &gcc6
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' ENABLE_COVERAGE=ON CUCUMBER_TIMEOUT=20000
|
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' ENABLE_COVERAGE=ON CUCUMBER_TIMEOUT=20000
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
@@ -83,7 +79,7 @@ matrix:
|
|||||||
addons: &gcc6
|
addons: &gcc6
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_SANITIZER=ON CUCUMBER_TIMEOUT=20000
|
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_SANITIZER=ON CUCUMBER_TIMEOUT=20000
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
@@ -91,7 +87,7 @@ matrix:
|
|||||||
addons: &clang40
|
addons: &clang40
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['libstdc++-5-dev', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
packages: ['libstdc++-5-dev', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000
|
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
@@ -116,7 +112,7 @@ matrix:
|
|||||||
addons: &gcc6
|
addons: &gcc6
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
@@ -125,19 +121,35 @@ matrix:
|
|||||||
TARGET_ARCH='i686' CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
TARGET_ARCH='i686' CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
||||||
CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse'
|
CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse'
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: "gcc-6-stxxl"
|
||||||
|
addons: &gcc6
|
||||||
|
apt:
|
||||||
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
|
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
|
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' ENABLE_STXXL=On
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: "gcc-4.9-release"
|
compiler: "gcc-4.9-release"
|
||||||
addons: &gcc49
|
addons: &gcc49
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['g++-4.9', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
packages: ['g++-4.9', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||||
env: CCOMPILER='gcc-4.9' CXXCOMPILER='g++-4.9' BUILD_TYPE='Release'
|
env: CCOMPILER='gcc-4.9' CXXCOMPILER='g++-4.9' BUILD_TYPE='Release'
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode8.2
|
||||||
compiler: "mason-osx-release"
|
compiler: "mason-osx-release"
|
||||||
# we use the xcode provides clang and don't install our own
|
# we use the xcode provides clang and don't install our own
|
||||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON
|
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="4"
|
||||||
|
after_success:
|
||||||
|
- ./scripts/travis/publish.sh
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode8.2
|
||||||
|
compiler: "mason-osx-release"
|
||||||
|
# we use the xcode provides clang and don't install our own
|
||||||
|
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="6"
|
||||||
after_success:
|
after_success:
|
||||||
- ./scripts/travis/publish.sh
|
- ./scripts/travis/publish.sh
|
||||||
|
|
||||||
@@ -147,7 +159,7 @@ matrix:
|
|||||||
#- addons: &clang40
|
#- addons: &clang40
|
||||||
#- apt:
|
#- apt:
|
||||||
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
||||||
#- packages: ['clang-4.0', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
#- packages: ['clang-4.0', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
#- env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release'
|
#- env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release'
|
||||||
|
|
||||||
# Shared Library
|
# Shared Library
|
||||||
@@ -156,7 +168,7 @@ matrix:
|
|||||||
addons: &gcc6
|
addons: &gcc6
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||||
|
|
||||||
# Disabled because CI slowness
|
# Disabled because CI slowness
|
||||||
@@ -165,7 +177,7 @@ matrix:
|
|||||||
#- addons: &clang40
|
#- addons: &clang40
|
||||||
#- apt:
|
#- apt:
|
||||||
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
||||||
#- packages: ['clang-4.0', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
#- packages: ['clang-4.0', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||||
#- env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
#- env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||||
|
|
||||||
# Node build jobs. These skip running the tests.
|
# Node build jobs. These skip running the tests.
|
||||||
@@ -294,7 +306,7 @@ before_install:
|
|||||||
- mkdir -p ${CMAKE_DIR}
|
- mkdir -p ${CMAKE_DIR}
|
||||||
- travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR} || travis_terminate 1
|
- travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR} || travis_terminate 1
|
||||||
- export PATH=${CMAKE_DIR}/bin:${PATH}
|
- export PATH=${CMAKE_DIR}/bin:${PATH}
|
||||||
- ${MASON} install tbb 2017_20161128 && export LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_20161128)/lib/:${LD_LIBRARY_PATH}
|
- ${MASON} install tbb 2017_U7 && export LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_U7)/lib/:${LD_LIBRARY_PATH}
|
||||||
- ${MASON} install ccache ${CCACHE_VERSION} && export PATH=$(${MASON} prefix ccache ${CCACHE_VERSION})/bin:${PATH}
|
- ${MASON} install ccache ${CCACHE_VERSION} && export PATH=$(${MASON} prefix ccache ${CCACHE_VERSION})/bin:${PATH}
|
||||||
- |
|
- |
|
||||||
if [[ ! -z ${CLANG_VERSION} ]]; then
|
if [[ ! -z ${CLANG_VERSION} ]]; then
|
||||||
@@ -324,6 +336,7 @@ install:
|
|||||||
-DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \
|
-DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \
|
||||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||||
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
||||||
|
-DENABLE_STXXL=${ENABLE_STXXL:-OFF} \
|
||||||
-DBUILD_TOOLS=ON \
|
-DBUILD_TOOLS=ON \
|
||||||
-DENABLE_CCACHE=ON \
|
-DENABLE_CCACHE=ON \
|
||||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||||
@@ -353,6 +366,7 @@ script:
|
|||||||
- pushd ${OSRM_BUILD_DIR}
|
- pushd ${OSRM_BUILD_DIR}
|
||||||
- ./unit_tests/library-tests
|
- ./unit_tests/library-tests
|
||||||
- ./unit_tests/extractor-tests
|
- ./unit_tests/extractor-tests
|
||||||
|
- ./unit_tests/contractor-tests
|
||||||
- ./unit_tests/engine-tests
|
- ./unit_tests/engine-tests
|
||||||
- ./unit_tests/util-tests
|
- ./unit_tests/util-tests
|
||||||
- ./unit_tests/server-tests
|
- ./unit_tests/server-tests
|
||||||
|
|||||||
+101
-8
@@ -1,11 +1,104 @@
|
|||||||
# 5.8.1
|
# 5.12.0
|
||||||
- Changes from 5.8.0:
|
- Changes from 5.11.0
|
||||||
- Bugfixes:
|
- Guidance
|
||||||
- Fixes #4152: Superflous turn left instruction, when crossing a service-road.
|
- now announcing turning onto oneways at the end of a road (e.g. onto dual carriageways)
|
||||||
- Fixes #4189: Fixes missing turn lane information after a traffic light.
|
- Adds new instruction types at the exit of roundabouts and rotaries `exit roundabout` and `exit rotary`.
|
||||||
- Fixes #4199: Data race-condition when updating segment speeds.
|
- HTTP:
|
||||||
- Fixes #3987: Fixes obvious turn detection at T-intersections with slip-roads.
|
- New query parameter for route/table/match/trip plugings:
|
||||||
- Fixes #4161: Don't collapse U-Turns with other steps.
|
`exclude=` that can be used to exclude certain classes (e.g. exclude=motorway, exclude=toll).
|
||||||
|
This is configurable in the profile.
|
||||||
|
- NodeJS:
|
||||||
|
- New query option `exclude` for the route/table/match/trip plugins. (e.g. `exclude: ["motorway", "toll"]`)
|
||||||
|
- Profile:
|
||||||
|
- New property for profile table: `excludable` that can be used to configure which classes are excludable at query time.
|
||||||
|
- New optional property for profile table: `classes` that allows you to specify which classes you expect to be used.
|
||||||
|
We recommend this for better error messages around classes, otherwise the possible class names are infered automatically.
|
||||||
|
- Traffic:
|
||||||
|
- If traffic data files contain an empty 4th column, they will update edge durations but not modify the edge weight. This is useful for
|
||||||
|
updating ETAs returned, without changing route selection (for example, in a distance-based profile with traffic data loaded).
|
||||||
|
- Infrastructure:
|
||||||
|
- New file `.osrm.cell_metrics` created by `osrm-customize`.
|
||||||
|
- Debug tiles:
|
||||||
|
- Added new properties `type` and `modifier` to `turns` layer, useful for viewing guidance calculated turn types on the map
|
||||||
|
|
||||||
|
# 5.11.0
|
||||||
|
- Changes from 5.10:
|
||||||
|
- Features
|
||||||
|
- BREAKING: Added support for conditional via-way restrictions. This features changes the file format of osrm.restrictions and requires re-extraction
|
||||||
|
- Internals
|
||||||
|
- BREAKING: Traffic signals will no longer be represented as turns internally. This requires re-processing of data but enables via-way turn restrictions across highway=traffic_signals
|
||||||
|
- Additional checks for empty segments when loading traffic data files
|
||||||
|
- Tunes the constants for turns in sharp curves just a tiny bit to circumvent a mix-up in fork directions at a specific intersection (https://github.com/Project-OSRM/osrm-backend/issues/4331)
|
||||||
|
- Infrastructure
|
||||||
|
- Refactor datafacade to make implementing additional DataFacades simpler
|
||||||
|
- Bugfixes
|
||||||
|
- API docs are now buildable again
|
||||||
|
- Suppress unnecessary extra turn instruction when exiting a motorway via a motorway_link onto a primary road (https://github.com/Project-OSRM/osrm-backend/issues/4348 scenario 4)
|
||||||
|
- Suppress unnecessary extra turn instruction when taking a tertiary_link road from a teritary onto a residential road (https://github.com/Project-OSRM/osrm-backend/issues/4348 scenario 2)
|
||||||
|
- Various MSVC++ build environment fixes
|
||||||
|
- Avoid a bug that crashes GCC6
|
||||||
|
- Re-include .npmignore to slim down published modules
|
||||||
|
- Fix a pre-processing bug where incorrect directions could be issued when two turns would have similar instructions and we tried to give them distinct values (https://github.com/Project-OSRM/osrm-backend/pull/4375)
|
||||||
|
- The entry bearing for correct the cardinality of a direction value (https://github.com/Project-OSRM/osrm-backend/pull/4353
|
||||||
|
- Change timezones in West Africa to the WAT zone so they're recognized on the Windows platform
|
||||||
|
|
||||||
|
# 5.10.0
|
||||||
|
- Changes from 5.9:
|
||||||
|
- Profiles:
|
||||||
|
- New version 2 profile API which cleans up a number of things and makes it easier to for profiles to include each other. Profiles using the old version 0 and 1 APIs are still supported.
|
||||||
|
- New required `setup()` function that must return a configuration hash. Storing configuration in globals is deprecated.
|
||||||
|
- Passes the config hash returned in `setup()` as an argument to `process_node/way/segment/turn`.
|
||||||
|
- Properties are now set in `.properties` in the config hash returend by setup().
|
||||||
|
- initialize raster sources in `setup()` instead of in a separate callback.
|
||||||
|
- Renames the `sources` helper to `raster`.
|
||||||
|
- Renames `way_functions` to `process_way` (same for node, segment and turn).
|
||||||
|
- Removes `get_restrictions()`. Instead set `.restrictions` in the config hash in `setup()`.
|
||||||
|
- Removes `get_name_suffix_list()`. Instead set `.suffix_list` in the config hash in `setup()`.
|
||||||
|
- Renames `Handlers` to `WayHandlers`.
|
||||||
|
- Pass functions instead of strings to `WayHandlers.run()`, so it's possible to mix in your own functions.
|
||||||
|
- Reorders arguments to `WayHandlers` functions to match `process_way()`.
|
||||||
|
- Profiles must return a hash of profile functions. This makes it easier for profiles to include each other.
|
||||||
|
- Guidance: add support for throughabouts
|
||||||
|
- Bugfixes
|
||||||
|
- Properly save/retrieve datasource annotations for road segments ([#4346](https://github.com/Project-OSRM/osrm-backend/issues/4346)
|
||||||
|
- Fix conditional restriction grammer parsing so it works for single-day-of-week restrictions ([#4357](https://github.com/Project-OSRM/osrm-backend/pull/4357))
|
||||||
|
- Algorithm)
|
||||||
|
- BREAKING: the file format requires re-processing due to the changes on via-ways
|
||||||
|
- Added support for via-way restrictions
|
||||||
|
|
||||||
|
# 5.9.2
|
||||||
|
- API:
|
||||||
|
- `annotations=durations,weights,speeds` values no longer include turn penalty values ([#4330](https://github.com/Project-OSRM/osrm-backend/issues/4330))
|
||||||
|
|
||||||
|
# 5.9.1
|
||||||
|
- Infrastructure
|
||||||
|
- STXXL is not required by default
|
||||||
|
|
||||||
|
# 5.9.0
|
||||||
|
- Changes from 5.8:
|
||||||
|
- Algorithm:
|
||||||
|
- Multi-Level Dijkstra:
|
||||||
|
- Plugins supported: `table`
|
||||||
|
- Adds alternative routes support (see [#4047](https://github.com/Project-OSRM/osrm-backend/pull/4047) and [3905](https://github.com/Project-OSRM/osrm-backend/issues/3905)): provides reasonably looking alternative routes (many, if possible) with reasonable query times.
|
||||||
|
- API:
|
||||||
|
- Exposes `alternatives=Number` parameter overload in addition to the boolean flag.
|
||||||
|
- Support for exits numbers and names. New member `exits` in `RouteStep`, based on `junction:ref` on ways
|
||||||
|
- `Intersection` now has new parameter `classes` that can be set in the profile on each way.
|
||||||
|
- Profiles:
|
||||||
|
- `result.exits` allows you to set a way's exit numbers and names, see [`junction:ref`](http://wiki.openstreetmap.org/wiki/Proposed_features/junction_details)
|
||||||
|
- `ExtractionWay` now as new property `forward_classes` and `backward_classes` that can set in the `way_function`.
|
||||||
|
The maximum number of classes is 8.
|
||||||
|
- We now respect the `construction` tag. If the `construction` tag value is not on our whitelist (`minor`, `widening`, `no`) we will exclude the road.
|
||||||
|
- Node.js Bindings:
|
||||||
|
- Exposes `alternatives=Number` parameter overload in addition to the boolean flag
|
||||||
|
- Expose `EngineConfig` options in the node bindings
|
||||||
|
- Tools:
|
||||||
|
- Exposes engine limit on number of alternatives to generate `--max-alternatives` in `osrm-routed` (3 by default)
|
||||||
|
- Infrastructure
|
||||||
|
- STXXL is not required to build OSRM and is an optional dependency for back-compatibility (ENABLE_STXXL=On)
|
||||||
|
- OpenMP is only required when the optional STXXL dependency is used
|
||||||
|
- Bug fixes:
|
||||||
|
- #4278: Remove superflous continious instruction on a motorway.
|
||||||
|
|
||||||
# 5.8.0
|
# 5.8.0
|
||||||
- Changes from 5.7
|
- Changes from 5.7
|
||||||
|
|||||||
+60
-38
@@ -14,6 +14,11 @@ if(BUILD_AS_SUBPROJECT)
|
|||||||
message(STATUS "Building libosrm as subproject.")
|
message(STATUS "Building libosrm as subproject.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# set OSRM_BUILD_DIR location (might be used in various scripts)
|
||||||
|
if (NOT WIN32 AND NOT DEFINED ENV{OSRM_BUILD_DIR})
|
||||||
|
set(ENV{OSRM_BUILD_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENABLE_MASON "Use mason for dependencies" OFF)
|
option(ENABLE_MASON "Use mason for dependencies" OFF)
|
||||||
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
|
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
|
||||||
option(BUILD_TOOLS "Build OSRM tools" OFF)
|
option(BUILD_TOOLS "Build OSRM tools" OFF)
|
||||||
@@ -21,6 +26,7 @@ option(BUILD_PACKAGE "Build OSRM package" OFF)
|
|||||||
option(ENABLE_ASSERTIONS "Use assertions in release mode" OFF)
|
option(ENABLE_ASSERTIONS "Use assertions in release mode" OFF)
|
||||||
option(ENABLE_COVERAGE "Build with coverage instrumentalisation" OFF)
|
option(ENABLE_COVERAGE "Build with coverage instrumentalisation" OFF)
|
||||||
option(ENABLE_SANITIZER "Use memory sanitizer for Debug build" OFF)
|
option(ENABLE_SANITIZER "Use memory sanitizer for Debug build" OFF)
|
||||||
|
option(ENABLE_STXXL "Use STXXL library" OFF)
|
||||||
option(ENABLE_LTO "Use LTO if available" OFF)
|
option(ENABLE_LTO "Use LTO if available" OFF)
|
||||||
option(ENABLE_FUZZING "Fuzz testing using LLVM's libFuzzer" OFF)
|
option(ENABLE_FUZZING "Fuzz testing using LLVM's libFuzzer" OFF)
|
||||||
option(ENABLE_GOLD_LINKER "Use GNU gold linker if available" ON)
|
option(ENABLE_GOLD_LINKER "Use GNU gold linker if available" ON)
|
||||||
@@ -35,7 +41,7 @@ if(ENABLE_MASON)
|
|||||||
set(MASON_EXPAT_VERSION "2.2.0")
|
set(MASON_EXPAT_VERSION "2.2.0")
|
||||||
set(MASON_LUA_VERSION "5.2.4")
|
set(MASON_LUA_VERSION "5.2.4")
|
||||||
set(MASON_BZIP2_VERSION "1.0.6")
|
set(MASON_BZIP2_VERSION "1.0.6")
|
||||||
set(MASON_TBB_VERSION "2017_20161128")
|
set(MASON_TBB_VERSION "2017_U7")
|
||||||
set(MASON_LIBSHP_VERSION "1.3.0")
|
set(MASON_LIBSHP_VERSION "1.3.0")
|
||||||
|
|
||||||
message(STATUS "Enabling mason")
|
message(STATUS "Enabling mason")
|
||||||
@@ -54,8 +60,8 @@ if (POLICY CMP0048)
|
|||||||
endif()
|
endif()
|
||||||
project(OSRM C CXX)
|
project(OSRM C CXX)
|
||||||
set(OSRM_VERSION_MAJOR 5)
|
set(OSRM_VERSION_MAJOR 5)
|
||||||
set(OSRM_VERSION_MINOR 8)
|
set(OSRM_VERSION_MINOR 12)
|
||||||
set(OSRM_VERSION_PATCH 1)
|
set(OSRM_VERSION_PATCH 0)
|
||||||
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
||||||
|
|
||||||
add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
@@ -96,11 +102,11 @@ if(WIN32 AND MSVC_VERSION LESS 1900)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Strictly require GCC>=4.9 and Clang>=3.4 - GCC 4.8 is already too old for C++14.
|
# Strictly require GCC>=4.9 and Clang>=3.4 - GCC 4.8 is already too old for C++14.
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
||||||
message(FATAL_ERROR "GCC>=4.9 required. In case you are on Ubuntu upgrade via ppa:ubuntu-toolchain-r/test")
|
message(FATAL_ERROR "GCC>=4.9 required. In case you are on Ubuntu upgrade via ppa:ubuntu-toolchain-r/test")
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
|
||||||
message(FATAL_ERROR "Clang>=3.4 required. In case you are on Ubuntu upgrade via http://apt.llvm.org")
|
message(FATAL_ERROR "Clang>=3.4 required. In case you are on Ubuntu upgrade via http://apt.llvm.org")
|
||||||
endif()
|
endif()
|
||||||
@@ -176,7 +182,7 @@ endif()
|
|||||||
|
|
||||||
# Disable LTO when mason+gcc is detected before testing for / setting any flags.
|
# Disable LTO when mason+gcc is detected before testing for / setting any flags.
|
||||||
# Mason builds libraries with Clang, mixing does not work in the context of lto.
|
# Mason builds libraries with Clang, mixing does not work in the context of lto.
|
||||||
if(ENABLE_MASON AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND ENABLE_LTO)
|
if(ENABLE_MASON AND CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND ENABLE_LTO)
|
||||||
set(ENABLE_LTO OFF)
|
set(ENABLE_LTO OFF)
|
||||||
message(WARNING "Mason and GCC's LTO not work together. Disabling LTO.")
|
message(WARNING "Mason and GCC's LTO not work together. Disabling LTO.")
|
||||||
endif()
|
endif()
|
||||||
@@ -205,9 +211,9 @@ endif()
|
|||||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||||
message(STATUS "Configuring debug mode flags")
|
message(STATUS "Configuring debug mode flags")
|
||||||
set(ENABLE_ASSERTIONS ON)
|
set(ENABLE_ASSERTIONS ON)
|
||||||
if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-inline -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-inline -fno-omit-frame-pointer")
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ggdb")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ggdb")
|
||||||
else()
|
else()
|
||||||
@@ -226,7 +232,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES MinRelSize OR CM
|
|||||||
if(ENABLE_LTO AND LTO_AVAILABLE)
|
if(ENABLE_LTO AND LTO_AVAILABLE)
|
||||||
set(OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
set(OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||||
# GCC in addition allows parallelizing LTO
|
# GCC in addition allows parallelizing LTO
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
include(ProcessorCount)
|
include(ProcessorCount)
|
||||||
ProcessorCount(NPROC)
|
ProcessorCount(NPROC)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=${NPROC}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=${NPROC}")
|
||||||
@@ -249,7 +255,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES MinRelSize OR CM
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Since gcc 4.9 the LTO format is non-standart ('slim'), so we need to use the build-in tools
|
# Since gcc 4.9 the LTO format is non-standart ('slim'), so we need to use the build-in tools
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
|
||||||
NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0" AND NOT MINGW)
|
NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0" AND NOT MINGW)
|
||||||
find_program(GCC_AR gcc-ar)
|
find_program(GCC_AR gcc-ar)
|
||||||
find_program(GCC_RANLIB gcc-ranlib)
|
find_program(GCC_RANLIB gcc-ranlib)
|
||||||
@@ -265,7 +271,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES MinRelSize OR CM
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Same for clang LTO requires their own toolchain
|
# Same for clang LTO requires their own toolchain
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
find_program(LLVM_AR llvm-ar)
|
find_program(LLVM_AR llvm-ar)
|
||||||
find_program(LLVM_RANLIB llvm-ranlib)
|
find_program(LLVM_RANLIB llvm-ranlib)
|
||||||
if ("${LLVM_AR}" STREQUAL "LLVM_AR-NOTFOUND" OR "${LLVM_RANLIB}" STREQUAL "LLVM_RANLIB-NOTFOUND")
|
if ("${LLVM_AR}" STREQUAL "LLVM_AR-NOTFOUND" OR "${LLVM_RANLIB}" STREQUAL "LLVM_RANLIB-NOTFOUND")
|
||||||
@@ -279,7 +285,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES MinRelSize OR CM
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0")
|
||||||
message(STATUS "Disabling LTO on GCC < 4.9.0 since it is broken, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038")
|
message(STATUS "Disabling LTO on GCC < 4.9.0 since it is broken, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038")
|
||||||
set(CMAKE_CXX_FLAGS "${OLD_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${OLD_CXX_FLAGS}")
|
||||||
set(ENABLE_LTO Off)
|
set(ENABLE_LTO Off)
|
||||||
@@ -309,9 +315,9 @@ if (ENABLE_SANITIZER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configuring compilers
|
# Configuring compilers
|
||||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics -ftemplate-depth=1024 -Wno-unused-command-line-argument")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics -ftemplate-depth=1024 -Wno-unused-command-line-argument")
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
set(COLOR_FLAG "-fdiagnostics-color=auto")
|
set(COLOR_FLAG "-fdiagnostics-color=auto")
|
||||||
check_cxx_compiler_flag("-fdiagnostics-color=auto" HAS_COLOR_FLAG)
|
check_cxx_compiler_flag("-fdiagnostics-color=auto" HAS_COLOR_FLAG)
|
||||||
if(NOT HAS_COLOR_FLAG)
|
if(NOT HAS_COLOR_FLAG)
|
||||||
@@ -331,13 +337,14 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||||
# using Intel C++
|
# using Intel C++
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel -wd10237 -Wall -ipo -fPIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel -wd10237 -Wall -ipo -fPIC")
|
||||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib)
|
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32_LEAN_AND_MEAN") # avoid compiler error C2011 from dual #include of winsock.h and winsock2.h
|
||||||
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
|
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
|
||||||
add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS)
|
add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation
|
add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation
|
||||||
@@ -353,7 +360,7 @@ execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-Wl,--version" ERROR_QUIET OUTPUT
|
|||||||
# For ld.gold and ld.bfs (the GNU linkers) we optimize hard
|
# For ld.gold and ld.bfs (the GNU linkers) we optimize hard
|
||||||
if("${LINKER_VERSION}" MATCHES "GNU gold" OR "${LINKER_VERSION}" MATCHES "GNU ld")
|
if("${LINKER_VERSION}" MATCHES "GNU gold" OR "${LINKER_VERSION}" MATCHES "GNU ld")
|
||||||
message(STATUS "Setting linker optimizations")
|
message(STATUS "Setting linker optimizations")
|
||||||
if(NOT (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC" OR "${LD_AVOID_GC_SECTIONS}"))
|
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR "${LD_AVOID_GC_SECTIONS}"))
|
||||||
# Tell compiler to put every function in separate section, linker can then match sections and functions
|
# Tell compiler to put every function in separate section, linker can then match sections and functions
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
|
||||||
# Tell linker to do dead code and data eminination during link time discarding sections
|
# Tell linker to do dead code and data eminination during link time discarding sections
|
||||||
@@ -371,7 +378,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
|
|||||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||||
|
|
||||||
# Activate C++1y
|
# Activate C++1y
|
||||||
if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
||||||
set(OSRM_CXXFLAGS "${OSRM_CXXFLAGS} -std=c++1y")
|
set(OSRM_CXXFLAGS "${OSRM_CXXFLAGS} -std=c++1y")
|
||||||
endif()
|
endif()
|
||||||
@@ -428,9 +435,12 @@ if(ENABLE_MASON)
|
|||||||
mason_use(boost_libsystem VERSION ${MASON_BOOST_VERSION})
|
mason_use(boost_libsystem VERSION ${MASON_BOOST_VERSION})
|
||||||
set(Boost_SYSTEM_LIBRARY ${MASON_PACKAGE_boost_libsystem_STATIC_LIBS})
|
set(Boost_SYSTEM_LIBRARY ${MASON_PACKAGE_boost_libsystem_STATIC_LIBS})
|
||||||
|
|
||||||
mason_use(stxxl VERSION ${MASON_STXXL_VERSION})
|
if (ENABLE_STXXL)
|
||||||
add_dependency_includes(${MASON_PACKAGE_stxxl_INCLUDE_DIRS})
|
mason_use(stxxl VERSION ${MASON_STXXL_VERSION})
|
||||||
set(STXXL_LIBRARY ${MASON_PACKAGE_stxxl_STATIC_LIBS})
|
add_dependency_includes(${MASON_PACKAGE_stxxl_INCLUDE_DIRS})
|
||||||
|
set(MAYBE_STXXL_LIBRARY ${MASON_PACKAGE_stxxl_STATIC_LIBS})
|
||||||
|
add_definitions(-DUSE_STXXL_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
mason_use(expat VERSION ${MASON_EXPAT_VERSION})
|
mason_use(expat VERSION ${MASON_EXPAT_VERSION})
|
||||||
add_dependency_includes(${MASON_PACKAGE_expat_INCLUDE_DIRS})
|
add_dependency_includes(${MASON_PACKAGE_expat_INCLUDE_DIRS})
|
||||||
@@ -458,7 +468,7 @@ if(ENABLE_MASON)
|
|||||||
install(FILES ${TBBGlob} DESTINATION lib)
|
install(FILES ${TBBGlob} DESTINATION lib)
|
||||||
endforeach()
|
endforeach()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(LINKER_FLAGS "${TBB_LINKER_RPATHS} -Wl,-rpath -Wl,@executable_path")
|
set(LINKER_FLAGS "${TBB_LINKER_RPATHS} -Wl,-rpath -Wl,@loader_path")
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
set(LINKER_FLAGS "${TBB_LINKER_RPATHS} '-Wl,-rpath,$ORIGIN' -Wl,-z,origin")
|
set(LINKER_FLAGS "${TBB_LINKER_RPATHS} '-Wl,-rpath,$ORIGIN' -Wl,-z,origin")
|
||||||
endif()
|
endif()
|
||||||
@@ -493,8 +503,16 @@ else()
|
|||||||
find_package(EXPAT REQUIRED)
|
find_package(EXPAT REQUIRED)
|
||||||
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
||||||
|
|
||||||
find_package(STXXL REQUIRED)
|
if (ENABLE_STXXL)
|
||||||
add_dependency_includes(${STXXL_INCLUDE_DIR})
|
find_package(STXXL)
|
||||||
|
if (STXXL_FOUND)
|
||||||
|
add_dependency_includes(${STXXL_INCLUDE_DIR})
|
||||||
|
set(MAYBE_STXXL_LIBRARY ${STXXL_LIBRARY})
|
||||||
|
add_definitions(-DUSE_STXXL_LIBRARY)
|
||||||
|
else()
|
||||||
|
MESSAGE(STATUS "STXXL was requested but not found, default STL will be used")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(BZip2 REQUIRED)
|
find_package(BZip2 REQUIRED)
|
||||||
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
||||||
@@ -551,7 +569,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# prefix compilation with ccache by default if available and on clang or gcc
|
# prefix compilation with ccache by default if available and on clang or gcc
|
||||||
if(ENABLE_CCACHE AND (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU"))
|
if(ENABLE_CCACHE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
|
||||||
find_program(CCACHE_FOUND ccache)
|
find_program(CCACHE_FOUND ccache)
|
||||||
if(CCACHE_FOUND)
|
if(CCACHE_FOUND)
|
||||||
message(STATUS "Using ccache to speed up incremental builds")
|
message(STATUS "Using ccache to speed up incremental builds")
|
||||||
@@ -578,11 +596,13 @@ add_dependency_defines(-DBOOST_SPIRIT_USE_PHOENIX_V3)
|
|||||||
add_dependency_defines(-DBOOST_RESULT_OF_USE_DECLTYPE)
|
add_dependency_defines(-DBOOST_RESULT_OF_USE_DECLTYPE)
|
||||||
add_dependency_defines(-DBOOST_FILESYSTEM_NO_DEPRECATED)
|
add_dependency_defines(-DBOOST_FILESYSTEM_NO_DEPRECATED)
|
||||||
|
|
||||||
set(OpenMP_FIND_QUIETLY ON)
|
if (ENABLE_STXXL)
|
||||||
find_package(OpenMP)
|
set(OpenMP_FIND_QUIETLY ON)
|
||||||
if(OPENMP_FOUND)
|
find_package(OpenMP)
|
||||||
message(STATUS "OpenMP support found. Linking just in case for stxxl")
|
if(OPENMP_FOUND)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
message(STATUS "OpenMP support found. Linking just in case for stxxl")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(${OSRM_DEFINES})
|
add_definitions(${OSRM_DEFINES})
|
||||||
@@ -617,7 +637,7 @@ set(EXTRACTOR_LIBRARIES
|
|||||||
${EXPAT_LIBRARIES}
|
${EXPAT_LIBRARIES}
|
||||||
${USED_LUA_LIBRARIES}
|
${USED_LUA_LIBRARIES}
|
||||||
${OSMIUM_LIBRARIES}
|
${OSMIUM_LIBRARIES}
|
||||||
${STXXL_LIBRARY}
|
${MAYBE_STXXL_LIBRARY}
|
||||||
${TBB_LIBRARIES}
|
${TBB_LIBRARIES}
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
${MAYBE_COVERAGE_LIBRARIES})
|
${MAYBE_COVERAGE_LIBRARIES})
|
||||||
@@ -645,7 +665,7 @@ set(CONTRACTOR_LIBRARIES
|
|||||||
${BOOST_BASE_LIBRARIES}
|
${BOOST_BASE_LIBRARIES}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${USED_LUA_LIBRARIES}
|
${USED_LUA_LIBRARIES}
|
||||||
${STXXL_LIBRARY}
|
${MAYBE_STXXL_LIBRARY}
|
||||||
${TBB_LIBRARIES}
|
${TBB_LIBRARIES}
|
||||||
${MAYBE_RT_LIBRARY}
|
${MAYBE_RT_LIBRARY}
|
||||||
${MAYBE_COVERAGE_LIBRARIES})
|
${MAYBE_COVERAGE_LIBRARIES})
|
||||||
@@ -665,17 +685,17 @@ set(STORAGE_LIBRARIES
|
|||||||
set(UTIL_LIBRARIES
|
set(UTIL_LIBRARIES
|
||||||
${BOOST_BASE_LIBRARIES}
|
${BOOST_BASE_LIBRARIES}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${STXXL_LIBRARY}
|
${MAYBE_STXXL_LIBRARY}
|
||||||
${TBB_LIBRARIES}
|
${TBB_LIBRARIES}
|
||||||
${MAYBE_COVERAGE_LIBRARIES})
|
${MAYBE_COVERAGE_LIBRARIES})
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
target_link_libraries(osrm ${ENGINE_LIBRARIES})
|
target_link_libraries(osrm ${ENGINE_LIBRARIES})
|
||||||
target_link_libraries(osrm_update ${UPDATER_LIBRARIES})
|
target_link_libraries(osrm_update ${UPDATER_LIBRARIES})
|
||||||
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES} osrm_update)
|
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES} osrm_update osrm_store)
|
||||||
target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
||||||
target_link_libraries(osrm_partition ${PARTITIONER_LIBRARIES})
|
target_link_libraries(osrm_partition ${PARTITIONER_LIBRARIES})
|
||||||
target_link_libraries(osrm_customize ${CUSTOMIZER_LIBRARIES} osrm_update)
|
target_link_libraries(osrm_customize ${CUSTOMIZER_LIBRARIES} osrm_update osrm_store)
|
||||||
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
||||||
|
|
||||||
# BUILD_COMPONENTS
|
# BUILD_COMPONENTS
|
||||||
@@ -718,11 +738,11 @@ file(GLOB VariantGlob third_party/variant/include/mapbox/*.hpp)
|
|||||||
file(GLOB LibraryGlob include/osrm/*.hpp)
|
file(GLOB LibraryGlob include/osrm/*.hpp)
|
||||||
file(GLOB ParametersGlob include/engine/api/*_parameters.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/approach.hpp include/engine/phantom_node.hpp)
|
set(EngineHeader include/engine/status.hpp include/engine/engine_config.hpp include/engine/hint.hpp include/engine/bearing.hpp include/engine/approach.hpp include/engine/phantom_node.hpp)
|
||||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/alias.hpp include/util/exception.hpp)
|
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/alias.hpp include/util/exception.hpp include/util/bearing.hpp)
|
||||||
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp include/extractor/travel_mode.hpp)
|
set(ExtractorHeader include/extractor/extractor.hpp include/storage/io_config.hpp include/extractor/extractor_config.hpp include/extractor/travel_mode.hpp)
|
||||||
set(PartitionerHeader include/partition/partitioner.hpp include/partition/partition_config.hpp)
|
set(PartitionerHeader include/partition/partitioner.hpp include/partition/partition_config.hpp)
|
||||||
set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.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/io_config.hpp include/storage/storage_config.hpp)
|
||||||
install(FILES ${EngineHeader} DESTINATION include/osrm/engine)
|
install(FILES ${EngineHeader} DESTINATION include/osrm/engine)
|
||||||
install(FILES ${UtilHeader} DESTINATION include/osrm/util)
|
install(FILES ${UtilHeader} DESTINATION include/osrm/util)
|
||||||
install(FILES ${StorageHeader} DESTINATION include/osrm/storage)
|
install(FILES ${StorageHeader} DESTINATION include/osrm/storage)
|
||||||
@@ -734,12 +754,14 @@ install(FILES ${ParametersGlob} DESTINATION include/osrm/engine/api)
|
|||||||
install(FILES ${VariantGlob} DESTINATION include/mapbox)
|
install(FILES ${VariantGlob} DESTINATION include/mapbox)
|
||||||
install(TARGETS osrm-extract DESTINATION bin)
|
install(TARGETS osrm-extract DESTINATION bin)
|
||||||
install(TARGETS osrm-partition DESTINATION bin)
|
install(TARGETS osrm-partition DESTINATION bin)
|
||||||
|
install(TARGETS osrm-customize DESTINATION bin)
|
||||||
install(TARGETS osrm-contract DESTINATION bin)
|
install(TARGETS osrm-contract DESTINATION bin)
|
||||||
install(TARGETS osrm-datastore DESTINATION bin)
|
install(TARGETS osrm-datastore DESTINATION bin)
|
||||||
install(TARGETS osrm-routed DESTINATION bin)
|
install(TARGETS osrm-routed DESTINATION bin)
|
||||||
install(TARGETS osrm DESTINATION lib)
|
install(TARGETS osrm DESTINATION lib)
|
||||||
install(TARGETS osrm_extract DESTINATION lib)
|
install(TARGETS osrm_extract DESTINATION lib)
|
||||||
install(TARGETS osrm_partition DESTINATION lib)
|
install(TARGETS osrm_partition DESTINATION lib)
|
||||||
|
install(TARGETS osrm_customize DESTINATION lib)
|
||||||
install(TARGETS osrm_update DESTINATION lib)
|
install(TARGETS osrm_update DESTINATION lib)
|
||||||
install(TARGETS osrm_contract DESTINATION lib)
|
install(TARGETS osrm_contract DESTINATION lib)
|
||||||
install(TARGETS osrm_store DESTINATION lib)
|
install(TARGETS osrm_store DESTINATION lib)
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ if [ x"$remote" = xorigin ] ; then
|
|||||||
echo "Rejected push to $remote/master" ; exit 1
|
echo "Rejected push to $remote/master" ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./scripts/format.sh
|
./scripts/format.sh && ./scripts/error_on_dirty.sh
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "Unstaged format changes" ; exit 1
|
echo "Unstaged format changes" ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ The following services are available via HTTP API, C++ library interface and Nod
|
|||||||
|
|
||||||
To quickly try OSRM use our [demo server](http://map.project-osrm.org) which comes with both the backend and a frontend on top.
|
To quickly try OSRM use our [demo server](http://map.project-osrm.org) which comes with both the backend and a frontend on top.
|
||||||
|
|
||||||
|
For a quick introduction about how the road network is represented in OpenStreetMap and how to map specific road network features have a look at [this guide about mapping for navigation](https://www.mapbox.com/mapping/mapping-for-navigation/).
|
||||||
|
|
||||||
Related [Project-OSRM](https://github.com/Project-OSRM) repositories:
|
Related [Project-OSRM](https://github.com/Project-OSRM) repositories:
|
||||||
- [node-osrm](https://github.com/Project-OSRM/node-osrm) - Production-ready NodeJs bindings for the routing engine
|
- [node-osrm](https://www.npmjs.com/package/osrm) - Production-ready NodeJs bindings for the routing engine
|
||||||
- [osrm-frontend](https://github.com/Project-OSRM/osrm-frontend) - User-facing frontend with map. The demo server runs this on top of the backend
|
- [osrm-frontend](https://github.com/Project-OSRM/osrm-frontend) - User-facing frontend with map. The demo server runs this on top of the backend
|
||||||
- [osrm-text-instructions](https://github.com/Project-OSRM/osrm-text-instructions) - Text instructions from OSRM route response
|
- [osrm-text-instructions](https://github.com/Project-OSRM/osrm-text-instructions) - Text instructions from OSRM route response
|
||||||
- [osrm-backend-docker](https://hub.docker.com/r/osrm/osrm-backend/) - Ready to use Docker images
|
- [osrm-backend-docker](https://hub.docker.com/r/osrm/osrm-backend/) - Ready to use Docker images
|
||||||
@@ -119,7 +121,7 @@ osrm-routed berlin-latest.osrm
|
|||||||
Running Queries
|
Running Queries
|
||||||
|
|
||||||
```
|
```
|
||||||
curl http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true
|
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Request Against the Demo Server
|
### Request Against the Demo Server
|
||||||
@@ -128,9 +130,36 @@ Read the [API usage policy](https://github.com/Project-OSRM/osrm-backend/wiki/Ap
|
|||||||
Simple query with instructions and alternatives on Berlin:
|
Simple query with instructions and alternatives on Berlin:
|
||||||
|
|
||||||
```
|
```
|
||||||
curl https://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true
|
curl "https://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Using the Node.js Bindings
|
||||||
|
|
||||||
|
The Node.js bindings provide read-only access to the routing engine.
|
||||||
|
We provide API documentation and examples [here](docs/nodejs/api.md).
|
||||||
|
|
||||||
|
You will need a modern `libstdc++` toolchain (`>= GLIBCXX_3.4.20`) for binary compatibility if you want to use the pre-built binaries.
|
||||||
|
For older Ubuntu systems you can upgrade your standard library for example with:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y libstdc++-5-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
You can install the Node.js bindings via `npm install osrm` or from this repository either via
|
||||||
|
|
||||||
|
npm install
|
||||||
|
|
||||||
|
which will check and use pre-built binaries if they're available for this release and your Node version, or via
|
||||||
|
|
||||||
|
npm install --build-from-source
|
||||||
|
|
||||||
|
to always force building the Node.js bindings from source.
|
||||||
|
|
||||||
|
For usage details have a look [these API docs](docs/nodejs/api.md).
|
||||||
|
|
||||||
|
|
||||||
## References in publications
|
## References in publications
|
||||||
|
|
||||||
When using the code in a (scientific) publication, please cite
|
When using the code in a (scientific) publication, please cite
|
||||||
|
|||||||
+286
-286
@@ -1,286 +1,286 @@
|
|||||||
# Locate Intel Threading Building Blocks include paths and libraries
|
# Locate Intel Threading Building Blocks include paths and libraries
|
||||||
# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
|
# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
|
||||||
# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
|
# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
|
||||||
# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
|
# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
|
||||||
# Florian Uhlig <F.Uhlig _at_ gsi.de>,
|
# Florian Uhlig <F.Uhlig _at_ gsi.de>,
|
||||||
# Jiri Marsik <jiri.marsik89 _at_ gmail.com>
|
# Jiri Marsik <jiri.marsik89 _at_ gmail.com>
|
||||||
|
|
||||||
# The MIT License
|
# The MIT License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 Hannes Hofmann
|
# Copyright (c) 2011 Hannes Hofmann
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
# in the Software without restriction, including without limitation the rights
|
# in the Software without restriction, including without limitation the rights
|
||||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
# copies of the Software, and to permit persons to whom the Software is
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
# furnished to do so, subject to the following conditions:
|
# furnished to do so, subject to the following conditions:
|
||||||
#
|
#
|
||||||
# The above copyright notice and this permission notice shall be included in
|
# The above copyright notice and this permission notice shall be included in
|
||||||
# all copies or substantial portions of the Software.
|
# all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
|
# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
|
||||||
# e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
|
# e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
|
||||||
# TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
|
# TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
|
||||||
# in the TBB installation directory (TBB_INSTALL_DIR).
|
# in the TBB installation directory (TBB_INSTALL_DIR).
|
||||||
#
|
#
|
||||||
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
||||||
#
|
#
|
||||||
# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
|
# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
|
||||||
# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
|
# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
|
||||||
# which architecture to use
|
# which architecture to use
|
||||||
# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
|
# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
|
||||||
# which compiler to use (detected automatically on Windows)
|
# which compiler to use (detected automatically on Windows)
|
||||||
|
|
||||||
# This module respects
|
# This module respects
|
||||||
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
|
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
|
||||||
|
|
||||||
# This module defines
|
# This module defines
|
||||||
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
|
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
|
||||||
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
|
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
|
||||||
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
|
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
|
||||||
# TBB_INSTALL_DIR, the base TBB install directory
|
# TBB_INSTALL_DIR, the base TBB install directory
|
||||||
# TBB_LIBRARIES, the libraries to link against to use TBB.
|
# TBB_LIBRARIES, the libraries to link against to use TBB.
|
||||||
# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
|
# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
|
||||||
# TBB_FOUND, If false, don't try to use TBB.
|
# TBB_FOUND, If false, don't try to use TBB.
|
||||||
# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
|
# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
|
||||||
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# has em64t/vc8 em64t/vc9
|
# has em64t/vc8 em64t/vc9
|
||||||
# has ia32/vc7.1 ia32/vc8 ia32/vc9
|
# has ia32/vc7.1 ia32/vc8 ia32/vc9
|
||||||
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB")
|
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB")
|
||||||
set(_TBB_LIB_NAME "tbb")
|
set(_TBB_LIB_NAME "tbb")
|
||||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||||
if (MSVC71)
|
if (MSVC71)
|
||||||
set (_TBB_COMPILER "vc7.1")
|
set (_TBB_COMPILER "vc7.1")
|
||||||
endif(MSVC71)
|
endif(MSVC71)
|
||||||
if (MSVC80)
|
if (MSVC80)
|
||||||
set(_TBB_COMPILER "vc8")
|
set(_TBB_COMPILER "vc8")
|
||||||
endif(MSVC80)
|
endif(MSVC80)
|
||||||
if (MSVC90)
|
if (MSVC90)
|
||||||
set(_TBB_COMPILER "vc9")
|
set(_TBB_COMPILER "vc9")
|
||||||
endif(MSVC90)
|
endif(MSVC90)
|
||||||
if(MSVC10)
|
if(MSVC10)
|
||||||
set(_TBB_COMPILER "vc10")
|
set(_TBB_COMPILER "vc10")
|
||||||
endif(MSVC10)
|
endif(MSVC10)
|
||||||
# Todo: add other Windows compilers such as ICL.
|
# Todo: add other Windows compilers such as ICL.
|
||||||
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# MAC
|
# MAC
|
||||||
set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
|
set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
|
||||||
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
|
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
|
||||||
set(_TBB_LIB_NAME "tbb")
|
set(_TBB_LIB_NAME "tbb")
|
||||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||||
# default flavor on apple: ia32/cc4.0.1_os10.4.9
|
# default flavor on apple: ia32/cc4.0.1_os10.4.9
|
||||||
# Jiri: There is no reason to presume there is only one flavor and
|
# Jiri: There is no reason to presume there is only one flavor and
|
||||||
# that user's setting of variables should be ignored.
|
# that user's setting of variables should be ignored.
|
||||||
if(NOT TBB_COMPILER)
|
if(NOT TBB_COMPILER)
|
||||||
set(_TBB_COMPILER "cc4.0.1_os10.4.9")
|
set(_TBB_COMPILER "cc4.0.1_os10.4.9")
|
||||||
elseif (NOT TBB_COMPILER)
|
elseif (NOT TBB_COMPILER)
|
||||||
set(_TBB_COMPILER ${TBB_COMPILER})
|
set(_TBB_COMPILER ${TBB_COMPILER})
|
||||||
endif(NOT TBB_COMPILER)
|
endif(NOT TBB_COMPILER)
|
||||||
if(NOT TBB_ARCHITECTURE)
|
if(NOT TBB_ARCHITECTURE)
|
||||||
set(_TBB_ARCHITECTURE "ia32")
|
set(_TBB_ARCHITECTURE "ia32")
|
||||||
elseif(NOT TBB_ARCHITECTURE)
|
elseif(NOT TBB_ARCHITECTURE)
|
||||||
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
||||||
endif(NOT TBB_ARCHITECTURE)
|
endif(NOT TBB_ARCHITECTURE)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
# LINUX
|
# LINUX
|
||||||
set(_TBB_DEFAULT_INSTALL_DIR "/usr")
|
set(_TBB_DEFAULT_INSTALL_DIR "/usr")
|
||||||
set(_TBB_LIB_NAME "tbb")
|
set(_TBB_LIB_NAME "tbb")
|
||||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||||
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
|
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
|
||||||
# has ia32/*
|
# has ia32/*
|
||||||
# has itanium/*
|
# has itanium/*
|
||||||
set(_TBB_COMPILER ${TBB_COMPILER})
|
set(_TBB_COMPILER ${TBB_COMPILER})
|
||||||
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM MATCHES "SunOS.*")
|
if (CMAKE_SYSTEM MATCHES "SunOS.*")
|
||||||
# SUN
|
# SUN
|
||||||
# not yet supported
|
# not yet supported
|
||||||
# has em64t/cc3.4.3_kernel5.10
|
# has em64t/cc3.4.3_kernel5.10
|
||||||
# has ia32/*
|
# has ia32/*
|
||||||
endif (CMAKE_SYSTEM MATCHES "SunOS.*")
|
endif (CMAKE_SYSTEM MATCHES "SunOS.*")
|
||||||
|
|
||||||
|
|
||||||
#-- Clear the public variables
|
#-- Clear the public variables
|
||||||
set (TBB_FOUND "NO")
|
set (TBB_FOUND "NO")
|
||||||
|
|
||||||
|
|
||||||
#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
|
#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
|
||||||
# first: use CMake variable TBB_INSTALL_DIR
|
# first: use CMake variable TBB_INSTALL_DIR
|
||||||
if (TBB_INSTALL_DIR)
|
if (TBB_INSTALL_DIR)
|
||||||
set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
|
||||||
endif (TBB_INSTALL_DIR)
|
endif (TBB_INSTALL_DIR)
|
||||||
# second: use environment variable
|
# second: use environment variable
|
||||||
if (NOT _TBB_INSTALL_DIR)
|
if (NOT _TBB_INSTALL_DIR)
|
||||||
if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
||||||
# Intel recommends setting TBB21_INSTALL_DIR
|
# Intel recommends setting TBB21_INSTALL_DIR
|
||||||
if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
||||||
if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
||||||
if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
||||||
endif (NOT _TBB_INSTALL_DIR)
|
endif (NOT _TBB_INSTALL_DIR)
|
||||||
# third: try to find path automatically
|
# third: try to find path automatically
|
||||||
if (NOT _TBB_INSTALL_DIR)
|
if (NOT _TBB_INSTALL_DIR)
|
||||||
if (_TBB_DEFAULT_INSTALL_DIR)
|
if (_TBB_DEFAULT_INSTALL_DIR)
|
||||||
set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
|
||||||
endif (_TBB_DEFAULT_INSTALL_DIR)
|
endif (_TBB_DEFAULT_INSTALL_DIR)
|
||||||
endif (NOT _TBB_INSTALL_DIR)
|
endif (NOT _TBB_INSTALL_DIR)
|
||||||
# sanity check
|
# sanity check
|
||||||
if (NOT _TBB_INSTALL_DIR)
|
if (NOT _TBB_INSTALL_DIR)
|
||||||
message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
|
message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
|
||||||
else (NOT _TBB_INSTALL_DIR)
|
else (NOT _TBB_INSTALL_DIR)
|
||||||
# finally: set the cached CMake variable TBB_INSTALL_DIR
|
# finally: set the cached CMake variable TBB_INSTALL_DIR
|
||||||
if (NOT TBB_INSTALL_DIR)
|
if (NOT TBB_INSTALL_DIR)
|
||||||
set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
|
set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
|
||||||
mark_as_advanced(TBB_INSTALL_DIR)
|
mark_as_advanced(TBB_INSTALL_DIR)
|
||||||
endif (NOT TBB_INSTALL_DIR)
|
endif (NOT TBB_INSTALL_DIR)
|
||||||
|
|
||||||
|
|
||||||
#-- A macro to rewrite the paths of the library. This is necessary, because
|
#-- A macro to rewrite the paths of the library. This is necessary, because
|
||||||
# find_library() always found the em64t/vc9 version of the TBB libs
|
# find_library() always found the em64t/vc9 version of the TBB libs
|
||||||
macro(TBB_CORRECT_LIB_DIR var_name)
|
macro(TBB_CORRECT_LIB_DIR var_name)
|
||||||
# if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
# if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
||||||
string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
||||||
# endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
# endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
||||||
string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
endmacro(TBB_CORRECT_LIB_DIR var_content)
|
endmacro(TBB_CORRECT_LIB_DIR var_content)
|
||||||
|
|
||||||
|
|
||||||
#-- Look for include directory and set ${TBB_INCLUDE_DIR}
|
#-- Look for include directory and set ${TBB_INCLUDE_DIR}
|
||||||
set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
|
set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
|
||||||
# Jiri: tbbvars now sets the CPATH environment variable to the directory
|
# Jiri: tbbvars now sets the CPATH environment variable to the directory
|
||||||
# containing the headers.
|
# containing the headers.
|
||||||
find_path(TBB_INCLUDE_DIR
|
find_path(TBB_INCLUDE_DIR
|
||||||
tbb/task_scheduler_init.h
|
tbb/task_scheduler_init.h
|
||||||
HINTS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
HINTS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
||||||
)
|
)
|
||||||
mark_as_advanced(TBB_INCLUDE_DIR)
|
mark_as_advanced(TBB_INCLUDE_DIR)
|
||||||
|
|
||||||
#-- Look for libraries
|
#-- Look for libraries
|
||||||
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
|
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
|
||||||
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
||||||
set (_TBB_LIBRARY_DIR
|
set (_TBB_LIBRARY_DIR
|
||||||
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
|
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
|
||||||
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
|
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
|
||||||
)
|
)
|
||||||
endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
||||||
# Jiri: This block isn't mutually exclusive with the previous one
|
# Jiri: This block isn't mutually exclusive with the previous one
|
||||||
# (hence no else), instead I test if the user really specified
|
# (hence no else), instead I test if the user really specified
|
||||||
# the variables in question.
|
# the variables in question.
|
||||||
if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
||||||
# HH: deprecated
|
# HH: deprecated
|
||||||
message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
|
message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
|
||||||
# Jiri: It doesn't hurt to look in more places, so I store the hints from
|
# Jiri: It doesn't hurt to look in more places, so I store the hints from
|
||||||
# ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
|
# ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
|
||||||
# variables and search them both.
|
# variables and search them both.
|
||||||
set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
|
set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
|
||||||
endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
||||||
|
|
||||||
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
||||||
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
|
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
|
||||||
|
|
||||||
if(EXISTS ${_TBB_INSTALL_DIR}/build)
|
if(EXISTS ${_TBB_INSTALL_DIR}/build)
|
||||||
file(GLOB _TBB_BUILD_DIR_RELEASE ${_TBB_INSTALL_DIR}/build/*_release)
|
file(GLOB _TBB_BUILD_DIR_RELEASE ${_TBB_INSTALL_DIR}/build/*_release)
|
||||||
file(GLOB _TBB_BUILD_DIR_DEBUG ${_TBB_INSTALL_DIR}/build/*_debug)
|
file(GLOB _TBB_BUILD_DIR_DEBUG ${_TBB_INSTALL_DIR}/build/*_debug)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Jiri: No reason not to check the default paths. From recent versions,
|
# Jiri: No reason not to check the default paths. From recent versions,
|
||||||
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
|
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
|
||||||
# variables, which now point to the directories of the lib files.
|
# variables, which now point to the directories of the lib files.
|
||||||
# It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
|
# It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
|
||||||
# argument instead of the implicit PATHS as it isn't hard-coded
|
# argument instead of the implicit PATHS as it isn't hard-coded
|
||||||
# but computed by system introspection. Searching the LIBRARY_PATH
|
# but computed by system introspection. Searching the LIBRARY_PATH
|
||||||
# and LD_LIBRARY_PATH environment variables is now even more important
|
# and LD_LIBRARY_PATH environment variables is now even more important
|
||||||
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
|
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
|
||||||
# the use of TBB built from sources.
|
# the use of TBB built from sources.
|
||||||
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
|
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
|
||||||
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
|
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
|
||||||
|
|
||||||
#Extract path from TBB_LIBRARY name
|
#Extract path from TBB_LIBRARY name
|
||||||
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
|
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
|
||||||
|
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
|
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
|
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
|
||||||
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
|
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
|
||||||
|
|
||||||
#-- Look for debug libraries
|
#-- Look for debug libraries
|
||||||
# Jiri: Changed the same way as for the release libraries.
|
# Jiri: Changed the same way as for the release libraries.
|
||||||
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
|
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
|
||||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||||
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
|
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
|
||||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||||
|
|
||||||
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
||||||
# Extract path from TBB_LIBRARY_DEBUG name
|
# Extract path from TBB_LIBRARY_DEBUG name
|
||||||
get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
|
get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
|
||||||
|
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
|
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
|
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
|
||||||
mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
|
mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
|
||||||
|
|
||||||
|
|
||||||
if (TBB_INCLUDE_DIR)
|
if (TBB_INCLUDE_DIR)
|
||||||
if (TBB_LIBRARY)
|
if (TBB_LIBRARY)
|
||||||
set (TBB_FOUND "YES")
|
set (TBB_FOUND "YES")
|
||||||
set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
|
set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
|
||||||
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
|
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
|
||||||
set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
|
set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
|
||||||
set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
|
set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
|
||||||
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
||||||
set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
|
set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
|
||||||
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
|
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
|
||||||
message(STATUS "Found Intel TBB")
|
message(STATUS "Found Intel TBB")
|
||||||
endif (TBB_LIBRARY)
|
endif (TBB_LIBRARY)
|
||||||
endif (TBB_INCLUDE_DIR)
|
endif (TBB_INCLUDE_DIR)
|
||||||
|
|
||||||
if (NOT TBB_FOUND)
|
if (NOT TBB_FOUND)
|
||||||
message("ERROR: Intel TBB NOT found!")
|
message("ERROR: Intel TBB NOT found!")
|
||||||
message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
|
message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
|
||||||
# do only throw fatal, if this pkg is REQUIRED
|
# do only throw fatal, if this pkg is REQUIRED
|
||||||
if (TBB_FIND_REQUIRED)
|
if (TBB_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR "Could NOT find TBB library.")
|
message(FATAL_ERROR "Could NOT find TBB library.")
|
||||||
endif (TBB_FIND_REQUIRED)
|
endif (TBB_FIND_REQUIRED)
|
||||||
endif (NOT TBB_FOUND)
|
endif (NOT TBB_FOUND)
|
||||||
|
|
||||||
endif (NOT _TBB_INSTALL_DIR)
|
endif (NOT _TBB_INSTALL_DIR)
|
||||||
|
|
||||||
if (TBB_FOUND)
|
if (TBB_FOUND)
|
||||||
set(TBB_INTERFACE_VERSION 0)
|
set(TBB_INTERFACE_VERSION 0)
|
||||||
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
|
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
|
||||||
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
|
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
|
||||||
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
|
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
|
||||||
message(STATUS "TBB interface version: ${TBB_INTERFACE_VERSION}")
|
message(STATUS "TBB interface version: ${TBB_INTERFACE_VERSION}")
|
||||||
endif (TBB_FOUND)
|
endif (TBB_FOUND)
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
default: '--strict --tags ~@stress --tags ~@todo --require features/support --require features/step_definitions',
|
default: '--strict --tags ~@stress --tags ~@mld --tags ~@todo --require features/support --require features/step_definitions',
|
||||||
verify: '--strict --tags ~@stress --tags ~@todo -f progress --require features/support --require features/step_definitions',
|
verify: '--strict --tags ~@stress --tags ~@mld --tags ~@todo -f progress --require features/support --require features/step_definitions',
|
||||||
todo: '--strict --tags @todo --require features/support --require features/step_definitions',
|
todo: '--strict --tags @todo --require features/support --require features/step_definitions',
|
||||||
all: '--strict --require features/support --require features/step_definitions',
|
all: '--strict --require features/support --require features/step_definitions',
|
||||||
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@alternative --tags ~@matrix --tags ~@trip --require features/support --require features/step_definitions -f progress'
|
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@alternative --tags ~@ch --require features/support --require features/step_definitions -f progress'
|
||||||
}
|
};
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ A guard (ScopedGeojsonLoggerGuard) requires a logging policy. Per default we pro
|
|||||||
|
|
||||||
The initialisation to do so looks like this:
|
The initialisation to do so looks like this:
|
||||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
|
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||||
Make sure to give the guar a name, so it actually gets a lifetime.
|
Make sure to give the guard a name, so it actually gets a lifetime.
|
||||||
|
|
||||||
The field `data-for-conversion` can be an arbitrary long set of features and needs to match the parameters used for constructing our policy (in this case `util::NodeIdVectorToLineString`).
|
The field `data-for-conversion` can be an arbitrary long set of features and needs to match the parameters used for constructing our policy (in this case `util::NodeIdVectorToLineString`).
|
||||||
|
|
||||||
|
|||||||
+26
-14
@@ -31,6 +31,7 @@ To pass parameters to each location some options support an array like encoding:
|
|||||||
|generate\_hints |`true` (default), `false` |Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. |
|
|generate\_hints |`true` (default), `false` |Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. |
|
||||||
|hints |`{hint};{hint}[;{hint} ...]` |Hint from previous request to derive position in street network. |
|
|hints |`{hint};{hint}[;{hint} ...]` |Hint from previous request to derive position in street network. |
|
||||||
|approaches |`{approach};{approach}[;{approach} ...]` |Keep waypoints on curb side. |
|
|approaches |`{approach};{approach}[;{approach} ...]` |Keep waypoints on curb side. |
|
||||||
|
|exclude |`{class}[,{class}]` |Additive list of classes to avoid, order does not matter. |
|
||||||
|
|
||||||
Where the elements follow the following format:
|
Where the elements follow the following format:
|
||||||
|
|
||||||
@@ -40,12 +41,13 @@ Where the elements follow the following format:
|
|||||||
|radius |`double >= 0` or `unlimited` (default) |
|
|radius |`double >= 0` or `unlimited` (default) |
|
||||||
|hint |Base64 `string` |
|
|hint |Base64 `string` |
|
||||||
|approach |`curb` or `unrestricted` (default) |
|
|approach |`curb` or `unrestricted` (default) |
|
||||||
|
|class |A class name determined by the profile or `none`. |
|
||||||
|
|
||||||
```
|
```
|
||||||
{option}={element};{element}[;{element} ... ]
|
{option}={element};{element}[;{element} ... ]
|
||||||
```
|
```
|
||||||
|
|
||||||
The number of elements must match exactly the number of locations. If you don't want to pass a value but instead use the default you can pass an empty `element`.
|
The number of elements must match exactly the number of locations (except for `generate_hints` and `exclude`). If you don't want to pass a value but instead use the default you can pass an empty `element`.
|
||||||
|
|
||||||
Example: 2nd location use the default value for `option`:
|
Example: 2nd location use the default value for `option`:
|
||||||
|
|
||||||
@@ -59,6 +61,9 @@ Example: 2nd location use the default value for `option`:
|
|||||||
# Query on Berlin with three coordinates:
|
# Query on Berlin with three coordinates:
|
||||||
curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false'
|
curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false'
|
||||||
|
|
||||||
|
# Query on Berlin excluding the usage of motorways:
|
||||||
|
curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407?exclude=motorway'
|
||||||
|
|
||||||
# Using polyline:
|
# Using polyline:
|
||||||
curl 'http://router.project-osrm.org/route/v1/driving/polyline(ofp_Ik_vpAilAyu@te@g`E)?overview=false'
|
curl 'http://router.project-osrm.org/route/v1/driving/polyline(ofp_Ik_vpAilAyu@te@g`E)?overview=false'
|
||||||
```
|
```
|
||||||
@@ -165,21 +170,21 @@ curl 'http://router.project-osrm.org/nearest/v1/driving/13.388860,52.517037?numb
|
|||||||
Finds the fastest route between coordinates in the supplied order.
|
Finds the fastest route between coordinates in the supplied order.
|
||||||
|
|
||||||
```endpoint
|
```endpoint
|
||||||
GET /route/v1/{profile}/{coordinates}?alternatives={true|false}&steps={true|false}&geometries={polyline|polyline6|geojson}&overview={full|simplified|false}&annotations={true|false}
|
GET /route/v1/{profile}/{coordinates}?alternatives={true|false|number}&steps={true|false}&geometries={polyline|polyline6|geojson}&overview={full|simplified|false}&annotations={true|false}
|
||||||
```
|
```
|
||||||
|
|
||||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||||
|
|
||||||
|Option |Values |Description |
|
|Option |Values |Description |
|
||||||
|------------|---------------------------------------------|-------------------------------------------------------------------------------|
|
|------------|---------------------------------------------|-------------------------------------------------------------------------------|
|
||||||
|alternatives|`true`, `false` (default) |Search for alternative routes and return as well.\* |
|
|alternatives|`true`, `false` (default), or Number |Search for alternative routes. Passing a number `alternatives=n` searches for up to `n` alternative routes.\* |
|
||||||
|steps |`true`, `false` (default) |Return route steps for each route leg |
|
|steps |`true`, `false` (default) |Returned route steps for each route leg |
|
||||||
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
||||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||||
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
||||||
|continue\_straight |`default` (default), `true`, `false` |Forces the route to keep going straight at waypoints constraining uturns there even if it would be faster. Default value depends on the profile. |
|
|continue\_straight |`default` (default), `true`, `false` |Forces the route to keep going straight at waypoints constraining uturns there even if it would be faster. Default value depends on the profile. |
|
||||||
|
|
||||||
\* Please note that even if an alternative route is requested, a result cannot be guaranteed.
|
\* Please note that even if alternative routes are requested, a result cannot be guaranteed.
|
||||||
|
|
||||||
**Response**
|
**Response**
|
||||||
|
|
||||||
@@ -275,7 +280,7 @@ In addition to the [general options](#general-options) the following options are
|
|||||||
|
|
||||||
|Option |Values |Description |
|
|Option |Values |Description |
|
||||||
|------------|------------------------------------------------|------------------------------------------------------------------------------------------|
|
|------------|------------------------------------------------|------------------------------------------------------------------------------------------|
|
||||||
|steps |`true`, `false` (default) |Return route steps for each route |
|
|steps |`true`, `false` (default) |Returned route steps for each route |
|
||||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||||
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
||||||
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
||||||
@@ -328,10 +333,10 @@ In addition to the [general options](#general-options) the following options are
|
|||||||
|
|
||||||
|Option |Values |Description |
|
|Option |Values |Description |
|
||||||
|------------|------------------------------------------------|---------------------------------------------------------------------------|
|
|------------|------------------------------------------------|---------------------------------------------------------------------------|
|
||||||
|roundtrip |`true` (default), `false` |Return route is a roundtrip (route returns to first location) |
|
|roundtrip |`true` (default), `false` |Returned route is a roundtrip (route returns to first location) |
|
||||||
|source |`any` (default), `first` |Return route starts at `any` or `first` coordinate |
|
|source |`any` (default), `first` |Returned route starts at `any` or `first` coordinate |
|
||||||
|destination |`any` (default), `last` |Return route ends at `any` or `last` coordinate |
|
|destination |`any` (default), `last` |Returned route ends at `any` or `last` coordinate |
|
||||||
|steps |`true`, `false` (default) |Return route instructions for each trip |
|
|steps |`true`, `false` (default) |Returned route instructions for each trip |
|
||||||
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
||||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||||
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
||||||
@@ -432,6 +437,8 @@ Vector tiles contain two layers:
|
|||||||
| `turn_angle` | `integer` | the angle of the turn, relative to the `bearing_in`. -180 to +180, 0 = straight ahead, 90 = 90-degrees to the right |
|
| `turn_angle` | `integer` | the angle of the turn, relative to the `bearing_in`. -180 to +180, 0 = straight ahead, 90 = 90-degrees to the right |
|
||||||
| `cost` | `float` | the time we think it takes to make that turn, in seconds. May be negative, depending on how the data model is constructed (some turns get a "bonus"). |
|
| `cost` | `float` | the time we think it takes to make that turn, in seconds. May be negative, depending on how the data model is constructed (some turns get a "bonus"). |
|
||||||
| `weight` | `float` | the weight we think it takes to make that turn. May be negative, depending on how the data model is constructed (some turns get a "bonus"). ACTUAL ROUTING USES THIS VALUE |
|
| `weight` | `float` | the weight we think it takes to make that turn. May be negative, depending on how the data model is constructed (some turns get a "bonus"). ACTUAL ROUTING USES THIS VALUE |
|
||||||
|
| `type` | `string` | the type of this turn - values like `turn`, `continue`, etc. See the `StepManeuver` for a partial list, this field also exposes internal turn types that are never returned with an API response |
|
||||||
|
| `modifier` | `string` | the direction modifier of the turn (`left`, `sharp left`, etc) |
|
||||||
|
|
||||||
|
|
||||||
## Result objects
|
## Result objects
|
||||||
@@ -539,10 +546,10 @@ Annotation of the whole route leg with fine-grained information about each segme
|
|||||||
**Properties**
|
**Properties**
|
||||||
|
|
||||||
- `distance`: The distance, in metres, between each pair of coordinates
|
- `distance`: The distance, in metres, between each pair of coordinates
|
||||||
- `duration`: The duration between each pair of coordinates, in seconds
|
- `duration`: The duration between each pair of coordinates, in seconds. Does not include the duration of any turns.
|
||||||
- `datasources`: The index of the datasource for the speed between each pair of coordinates. `0` is the default profile, other values are supplied via `--segment-speed-file` to `osrm-contract`
|
- `datasources`: The index of the datasource for the speed between each pair of coordinates. `0` is the default profile, other values are supplied via `--segment-speed-file` to `osrm-contract`
|
||||||
- `nodes`: The OSM node ID for each coordinate along the route, excluding the first/last user-supplied coordinates
|
- `nodes`: The OSM node ID for each coordinate along the route, excluding the first/last user-supplied coordinates
|
||||||
- `weight`: The weights between each pair of coordinates
|
- `weight`: The weights between each pair of coordinates. Does not include any turn costs.
|
||||||
- `speed`: Convenience field, calculation of `distance / duration` rounded to one decimal place
|
- `speed`: Convenience field, calculation of `distance / duration` rounded to one decimal place
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
@@ -581,6 +588,7 @@ step.
|
|||||||
- `ref`: A reference number or code for the way. Optionally included, if ref data is available for the given way.
|
- `ref`: A reference number or code for the way. Optionally included, if ref data is available for the given way.
|
||||||
- `pronunciation`: The pronunciation hint of the way name. Will be `undefined` if there is no pronunciation hit.
|
- `pronunciation`: The pronunciation hint of the way name. Will be `undefined` if there is no pronunciation hit.
|
||||||
- `destinations`: The destinations of the way. Will be `undefined` if there are no destinations.
|
- `destinations`: The destinations of the way. Will be `undefined` if there are no destinations.
|
||||||
|
- `exits`: The exit numbers or names of the way. Will be `undefined` if there are no exit numbers or names.
|
||||||
- `mode`: A string signifying the mode of transportation.
|
- `mode`: A string signifying the mode of transportation.
|
||||||
- `maneuver`: A `StepManeuver` object representing the maneuver.
|
- `maneuver`: A `StepManeuver` object representing the maneuver.
|
||||||
- `intersections`: A list of `Intersection` objects that are passed along the segment, the very first belonging to the StepManeuver
|
- `intersections`: A list of `Intersection` objects that are passed along the segment, the very first belonging to the StepManeuver
|
||||||
@@ -654,12 +662,14 @@ step.
|
|||||||
| `off ramp` | take a ramp to exit a highway (direction given my `modifier`) |
|
| `off ramp` | take a ramp to exit a highway (direction given my `modifier`) |
|
||||||
| `fork` | take the left/right side at a fork depending on `modifier` |
|
| `fork` | take the left/right side at a fork depending on `modifier` |
|
||||||
| `end of road` | road ends in a T intersection turn in direction of `modifier`|
|
| `end of road` | road ends in a T intersection turn in direction of `modifier`|
|
||||||
| `use lane` | going straight on a specific lane |
|
| `use lane` | **Deprecated** replaced by lanes on all intersection entries |
|
||||||
| `continue` | Turn in direction of `modifier` to stay on the same road |
|
| `continue` | Turn in direction of `modifier` to stay on the same road |
|
||||||
| `roundabout` | traverse roundabout, has additional property `exit` with NR if the roundabout is left. The modifier specifies the direction of entering the roundabout. |
|
| `roundabout` | traverse roundabout, has additional property `exit` with NR if the roundabout is left. The modifier specifies the direction of entering the roundabout. |
|
||||||
| `rotary` | a traffic circle. While very similar to a larger version of a roundabout, it does not necessarily follow roundabout rules for right of way. It can offer `rotary_name` and/or `rotary_pronunciation` parameters (located in the RouteStep object) in addition to the `exit` parameter (located on the StepManeuver object). |
|
| `rotary` | a traffic circle. While very similar to a larger version of a roundabout, it does not necessarily follow roundabout rules for right of way. It can offer `rotary_name` and/or `rotary_pronunciation` parameters (located in the RouteStep object) in addition to the `exit` parameter (located on the StepManeuver object). |
|
||||||
| `roundabout turn`| Describes a turn at a small roundabout that should be treated as normal turn. The `modifier` indicates the turn direciton. Example instruction: `At the roundabout turn left`. |
|
| `roundabout turn`| Describes a turn at a small roundabout that should be treated as normal turn. The `modifier` indicates the turn direciton. Example instruction: `At the roundabout turn left`. |
|
||||||
| `notification` | not an actual turn but a change in the driving conditions. For example the travel mode. If the road takes a turn itself, the `modifier` describes the direction |
|
| `notification` | not an actual turn but a change in the driving conditions. For example the travel mode or classes. If the road takes a turn itself, the `modifier` describes the direction |
|
||||||
|
| `exit roundabout`| Describes a maneuver exiting a roundabout (usually preceeded by a `roundabout` instruction) |
|
||||||
|
| `exit rotary` | Describes the maneuver exiting a rotary (large named roundabout) |
|
||||||
|
|
||||||
Please note that even though there are `new name` and `notification` instructions, the `mode` and `name` can change
|
Please note that even though there are `new name` and `notification` instructions, the `mode` and `name` can change
|
||||||
between all instructions. They only offer a fallback in case nothing else is to report.
|
between all instructions. They only offer a fallback in case nothing else is to report.
|
||||||
@@ -732,6 +742,7 @@ location of the StepManeuver. Further intersections are listed for every cross-w
|
|||||||
|
|
||||||
- `location`: A `[longitude, latitude]` pair describing the location of the turn.
|
- `location`: A `[longitude, latitude]` pair describing the location of the turn.
|
||||||
- `bearings`: A list of bearing values (e.g. [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection. Values are between 0-359 (0=true north)
|
- `bearings`: A list of bearing values (e.g. [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection. Values are between 0-359 (0=true north)
|
||||||
|
- `classes`: An array of strings signifying the classes (as specified in the profile) of the road exiting the intersection.
|
||||||
- `entry`: A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of `true` indicates that the respective road could be entered on a valid route.
|
- `entry`: A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of `true` indicates that the respective road could be entered on a valid route.
|
||||||
`false` indicates that the turn onto the respective road would violate a restriction.
|
`false` indicates that the turn onto the respective road would violate a restriction.
|
||||||
- `in`: index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the
|
- `in`: index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the
|
||||||
@@ -750,6 +761,7 @@ location of the StepManeuver. Further intersections are listed for every cross-w
|
|||||||
"out":2,
|
"out":2,
|
||||||
"bearings":[60,150,240,330],
|
"bearings":[60,150,240,330],
|
||||||
"entry":["false","true","true","true"],
|
"entry":["false","true","true","true"],
|
||||||
|
"classes": ["toll", "restricted"],
|
||||||
"lanes":{
|
"lanes":{
|
||||||
"indications": ["left", "straight"],
|
"indications": ["left", "straight"],
|
||||||
"valid": "false"
|
"valid": "false"
|
||||||
|
|||||||
+12
-5
@@ -26,6 +26,12 @@ var osrm = new OSRM('network.osrm');
|
|||||||
- `options.shared_memory` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Connects to the persistent shared memory datastore.
|
- `options.shared_memory` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Connects to the persistent shared memory datastore.
|
||||||
This requires you to run `osrm-datastore` prior to creating an `OSRM` object.
|
This requires you to run `osrm-datastore` prior to creating an `OSRM` object.
|
||||||
- `options.path` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true.
|
- `options.path` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true.
|
||||||
|
- `options.max_locations_trip` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in trip query (default: unlimited).
|
||||||
|
- `options.max_locations_viaroute` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in viaroute query (default: unlimited).
|
||||||
|
- `options.max_locations_distance_table` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in distance table query (default: unlimited).
|
||||||
|
- `options.max_locations_map_matching` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in map-matching query (default: unlimited).
|
||||||
|
- `options.max_results_nearest` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. results supported in nearest query (default: unlimited).
|
||||||
|
- `options.max_alternatives` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max.number of alternatives supported in alternative routes query (default: 3).
|
||||||
|
|
||||||
### route
|
### route
|
||||||
|
|
||||||
@@ -39,15 +45,16 @@ Returns the fastest route between two or more coordinates while visiting the way
|
|||||||
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
||||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
|
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
|
||||||
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
||||||
- `options.alternatives` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Search for alternative routes and return as well.
|
- `options.alternatives` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Search for alternative routes. (optional, default `false`)
|
||||||
_Please note that even if an alternative route is requested, a result cannot be guaranteed._ (optional, default `false`)
|
- `options.alternatives` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Search for up to this many alternative routes.
|
||||||
|
_Please note that even if alternative routes are requested, a result cannot be guaranteed._ (optional, default `0`)
|
||||||
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route leg. (optional, default `false`)
|
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route leg. (optional, default `false`)
|
||||||
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
|
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
|
||||||
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
|
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
|
||||||
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
|
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
|
||||||
- `options.continue_straight` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
|
- `options.continue_straight` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
|
||||||
`null`/`true`/`false`
|
|
||||||
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
|
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
|
||||||
|
`null`/`true`/`false`
|
||||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||||
|
|
||||||
**Examples**
|
**Examples**
|
||||||
@@ -194,8 +201,8 @@ if they can not be matched successfully.
|
|||||||
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
|
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
|
||||||
- `options.timestamps` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>?** Timestamp of the input location (integers, UNIX-like timestamp).
|
- `options.timestamps` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>?** Timestamp of the input location (integers, UNIX-like timestamp).
|
||||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`.
|
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`.
|
||||||
- `options.gaps` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore`. (optional, default `split`)
|
- `options.gaps` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore` (optional, default `split`).
|
||||||
- `options.tidy` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Allows the input track modification to obtain better matching quality for noisy tracks. (optional, default `false`)
|
- `options.tidy` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Allows the input track modification to obtain better matching quality for noisy tracks (optional, default `false`).
|
||||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||||
|
|
||||||
**Examples**
|
**Examples**
|
||||||
|
|||||||
+215
-54
@@ -1,52 +1,151 @@
|
|||||||
OSRM supports "profiles". Configurations representing different routing behaviours for (typically) different transport modes. A profile describes whether or not we route along a particular type of way, or over a particular node in the OpenStreetMap data, and also how quickly we'll be travelling when we do. This feeds into the way the routing graph is created and thus influences the output routes.
|
# OSRM profiles
|
||||||
|
OSRM supports "profiles". Profiles representing routing behavior for different transport modes like car, bike and foot. You can also create profiles for variations like a fastest/shortest car profile or fastest/safest/greenest bicycles profile.
|
||||||
|
|
||||||
|
A profile describes whether or not it's possible to route along a particular type of way, whether we can pass a particular node, and how quickly we'll be traveling when we do. This feeds into the way the routing graph is created and thus influences the output routes.
|
||||||
|
|
||||||
## Available profiles
|
## Available profiles
|
||||||
|
Out-of-the-box OSRM comes with profiles for car, bicycle and foot. You can easily modify these or create new ones if you like.
|
||||||
|
|
||||||
Out-of-the-box OSRM comes with several different profiles, including car, bicycle and foot.
|
Profiles have a 'lua' extension, and are places in 'profiles' directory.
|
||||||
|
|
||||||
Profile configuration files have a 'lua' extension, and are found under the 'profiles' subdirectory.
|
When running OSRM preprocessing commands you specify the profile with the --profile (or the shorthand -p) option, for example:
|
||||||
Alternatively commands will take a lua profile specified with an explicit -p param, for example:
|
|
||||||
|
|
||||||
`osrm-extract -p ../profiles/car.lua planet-latest.osm.pbf`
|
`osrm-extract --profile ../profiles/car.lua planet-latest.osm.pbf`
|
||||||
|
|
||||||
And then **you will need to extract and contract again** (A change to the profile will typically affect the extract step as well as the contract step. See [Processing Flow](https://github.com/Project-OSRM/osrm-backend/wiki/Processing-Flow))
|
## Processing flow
|
||||||
|
It's important to understand that profiles are used when preprocessing the OSM data, NOT at query time when routes are computed.
|
||||||
|
|
||||||
## lua scripts?
|
This means that after modifying a profile **you will need to extract, contract and reload the data again** and to see changes in the routing results. See [Processing Flow](https://github.com/Project-OSRM/osrm-backend/wiki/Processing-Flow) for more.
|
||||||
|
|
||||||
Profiles are not just configuration files. They are scripts written in the "lua" scripting language ( http://www.lua.org ) The reason for this, is that OpenStreetMap data is not sufficiently straightforward, to simply define tag mappings. Lua scripting offers a powerful way of coping with the complexity of different node,way,relation,tag combinations found within OpenStreetMap data.
|
## Profiles are written in LUA
|
||||||
|
Profiles are not just configuration files. They are scripts written in the [LUA scripting language](http://www.lua.org). The reason for this is that OpenStreetMap data is complex, and it's not possible to simply define tag mappings. LUA scripting offers a powerful way to handle all the possible tag combinations found in OpenStreetMap nodes and ways.
|
||||||
|
|
||||||
## Basic structure of a profile
|
## Basic structure of profiles
|
||||||
|
A profile will process every node and way in the OSM input data to determine what ways are routable in which direction, at what speed, etc.
|
||||||
|
|
||||||
You can understand these lua scripts enough to make interesting modifications, without needing to get to grips with how they work completely.
|
A profile will typically:
|
||||||
|
|
||||||
Towards the top of the file, a profile (such as [car.lua](../profiles/car.lua)) will typically define various configurations as global variables. A lot of these are look-up hashes of one sort or another.
|
- Define api version (required)
|
||||||
|
- Require library files (optional)
|
||||||
|
- Define setup function (required)
|
||||||
|
- Define process functions (some are required)
|
||||||
|
- Return functions table (required)
|
||||||
|
|
||||||
As you scroll down the file you'll see local variables, and then local functions, and finally...
|
A profile can also define various local functions it needs.
|
||||||
|
|
||||||
`way_function` and `node_function` are the important functions which are called when extracting OpenStreetMap data with `osrm-extract`.
|
Looking at [car.lua](../profiles/car.lua) as an example, at the top of the file the api version is defined and then required library files are included.
|
||||||
|
|
||||||
The following global properties can be set in your profile:
|
Then follows the `setup` functions, which is called once when the profile is loaded. It returns a big hash table of configurations, specifying things like what speed to use for different way types. The configurations are used later in the various processing functions. Many adjustments can be done just be modifying this configuration table.
|
||||||
|
|
||||||
Attribute | Type | Notes
|
The setup function is also where you can do other setup, like loading elevation data source if you want to consider that when processing ways.
|
||||||
------------------------------|----------|----------------------------------------------------------------------------
|
|
||||||
weight_name | String | Name used in output for the routing weight property (default `'duration'`)
|
|
||||||
weight_precision | Unsigned | Decimal precision of edge weights (default `1`)
|
|
||||||
left_hand_driving | Boolean | Are vehicles assumed to drive on the left? (used in guidance, default `false`)
|
|
||||||
use_turn_restrictions | Boolean | Are turn instructions followed? (default `false`)
|
|
||||||
continue_straight_at_waypoint | Boolean | Must the route continue straight on at a via point, or are U-turns allowed? (default `true`)
|
|
||||||
max_speed_for_map_matching | Float | Maximum vehicle speed to be assumed in matching (in m/s)
|
|
||||||
max_turn_weight | Float | Maximum turn penalty weight
|
|
||||||
force_split_edges | Boolean | True value forces a split of forward and backward edges of extracted ways and guarantees that `segment_function` will be called for all segments (default `false`)
|
|
||||||
|
|
||||||
## way_function
|
Then comes the `process_node` and `process_way` functions, which are called for each OSM node and way when extracting OpenStreetMap data with `osrm-extract`.
|
||||||
|
|
||||||
Given an OpenStreetMap way, the `way_function` will either return nothing (meaning we are not going to route over this way at all), or it will set up a result hash to be returned. The most important thing it will do is set the value of `result.forward_speed` and `result.backward_speed` as a suitable integer value representing the speed for traversing the way.
|
The `process_turn` function processes every possible turn in the network, and sets a penalty depending on the angle and turn of the movement.
|
||||||
|
|
||||||
All other calculations stem from that, including the returned timings in driving directions, but also, less directly, it feeds into the actual routing decisions the engine will take (a way with a slow traversal speed, may be less favoured than a way with fast traversal speed, but it depends how long it is, and... what it connects to in the rest of the network graph)
|
Profiles can also define a `process_segment` function to handle differences in speed along an OSM way, for example to handle elevation. As you can see, this is not currently used in the car profile.
|
||||||
|
|
||||||
Using the power of the scripting language you wouldn't typically see something as simple as a `result.forward_speed = 20` line within the `way_function`. Instead a `way_function` will examine the tagging (e.g. `way:get_value_by_key("highway")` and many others), process this information in various ways, calling other local functions, referencing the global variables and look-up hashes, before arriving at the result.
|
At the end of the file, a table if returned with references to the setup and processing functions the profile has defined.
|
||||||
|
|
||||||
The following attributes can be set on the result in `way_function`:
|
## Understanding speed, weight and rate
|
||||||
|
When computing a route from A to B there can be different measure of what is the best route. That's why there's a need for different profiles.
|
||||||
|
|
||||||
|
Because speeds very on different types of roads, the shortest and the fastest route are typically different. But there are many other possible preferences. For example a user might prefer a bicycle route that follow parks or other green areas, even though both duration and distance are a bit longer.
|
||||||
|
|
||||||
|
To handle this, OSRM doesn't simply choose the ways with the highest speed. Instead it uses the concept of `weight` and `rate`. The rate is an abstract measure that you can assign to ways as you like to make some ways preferable to others. Routing will prefer ways with high rate.
|
||||||
|
|
||||||
|
The weight of a way normally computed as length / rate. The weight can be thought of as the resistance or cost when passing the way. Routing will prefer ways with low weight.
|
||||||
|
|
||||||
|
You can also set the weight of a way to a fixed value, In this case it's not calculated based on the length or rate, and the rate is ignored.
|
||||||
|
|
||||||
|
You should set the speed to you best estimate of the actual speed that will be used on a particular way. This will result in the best estimated travel times.
|
||||||
|
|
||||||
|
If you want to prefer certain ways due to other factors than the speed, adjust the rate accordingly. If you adjust the speed, the time time estimation will be skewed.
|
||||||
|
|
||||||
|
If you set the same rate on all ways, the result will be shortest path routing.
|
||||||
|
If you set rate = speed on all ways, the result will be fastest path routing.
|
||||||
|
If you want to prioritize certain street, increase the rate on these.
|
||||||
|
|
||||||
|
## Elements
|
||||||
|
### api_version
|
||||||
|
A profile should set api_version at the top of your profile. This is done to ensure that older profiles are still supported when the api changes. If api_version is not defined, 0 will be assumed. The current api version is 2.
|
||||||
|
|
||||||
|
### Library files
|
||||||
|
The folder [profiles/lib/](../profiles/lib/) contains LUA library files for handling many common processing tasks.
|
||||||
|
|
||||||
|
File | Notes
|
||||||
|
------------------|------------------------------
|
||||||
|
way_handlers.lua | Functions for processing way tags
|
||||||
|
tags.lua | Functions for general parsing of OSM tags
|
||||||
|
set.lua | Defines the Set helper for handling sets of values
|
||||||
|
sequence.lua | Defines the Sequence helper for handling sequences of values
|
||||||
|
access.lua | Function for finding relevant access tags
|
||||||
|
destination.lua | Function for finding relevant destination tags
|
||||||
|
destination.lua | Function for determining maximum speed
|
||||||
|
guidance.lua | Function for processing guidance attributes
|
||||||
|
|
||||||
|
They all return a table of functions when you use `require` to load them. You can either store this table and reference it's functions later, of if you need only a single you can store that directly.
|
||||||
|
|
||||||
|
### setup()
|
||||||
|
The `setup` function is called once when the profile is loaded and must return a table of configurations. It's also where you can do other global setup, like loading data sources that are used during processing.
|
||||||
|
|
||||||
|
Note that processing of data is parallelized and several unconnected LUA interpreters will be running at the same time. The `setup` function will be called once for each. Each LUA iinterpreter will have it's own set of globals.
|
||||||
|
|
||||||
|
The following global properties can be set under `properties` in the hash you return in the `setup` function:
|
||||||
|
|
||||||
|
Attribute | Type | Notes
|
||||||
|
-------------------------------------|----------|----------------------------------------------------------------------------
|
||||||
|
weight_name | String | Name used in output for the routing weight property (default `'duration'`)
|
||||||
|
weight_precision | Unsigned | Decimal precision of edge weights (default `1`)
|
||||||
|
left_hand_driving | Boolean | Are vehicles assumed to drive on the left? (used in guidance, default `false`)
|
||||||
|
use_turn_restrictions | Boolean | Are turn instructions followed? (default `false`)
|
||||||
|
continue_straight_at_waypoint | Boolean | Must the route continue straight on at a via point, or are U-turns allowed? (default `true`)
|
||||||
|
max_speed_for_map_matching | Float | Maximum vehicle speed to be assumed in matching (in m/s)
|
||||||
|
max_turn_weight | Float | Maximum turn penalty weight
|
||||||
|
force_split_edges | Boolean | True value forces a split of forward and backward edges of extracted ways and guarantees that `process_segment` will be called for all segments (default `false`)
|
||||||
|
|
||||||
|
The following additional global properties can be set in the hash you return in the `setup` function:
|
||||||
|
|
||||||
|
Attribute | Type | Notes
|
||||||
|
-------------------------------------|------------------|----------------------------------------------------------------------------
|
||||||
|
excludable | Sequence of Sets | Determines which class-combinations are supported by the `exclude` option at query time.
|
||||||
|
| | E.g. `Sequence{Set{"ferry", "motorway"}, Set{"motorway"}}` will allow you to exclude ferries and motorways, or only motorways.
|
||||||
|
classes | Sequence | Determines the allowed classes that can be referenced using `{forward,backward}_classes` on the way in the `process_way` function.
|
||||||
|
restrictions | Sequence | Determines which turn restrictions will be used for this profile.
|
||||||
|
suffix_list | Set | List of name suffixes needed for determining if "Highway 101 NW" the same road as "Highway 101 ES".
|
||||||
|
|
||||||
|
### process_node(profile, node, result)
|
||||||
|
Process an OSM node to determine whether this node is a barrier or can be passed and whether passing it incurs a delay.
|
||||||
|
|
||||||
|
Argument | Description
|
||||||
|
---------|-------------------------------------------------------
|
||||||
|
profile | The configuration table you returned in `setup`.
|
||||||
|
node | The input node to process (read-only).
|
||||||
|
result | The output that you will modify.
|
||||||
|
|
||||||
|
The following attributes can be set on `result`:
|
||||||
|
|
||||||
|
Attribute | Type | Notes
|
||||||
|
----------------|---------|---------------------------------------------------------
|
||||||
|
barrier | Boolean | Is it an impassable barrier?
|
||||||
|
traffic_lights | Boolean | Is it a traffic light (incurs delay in `process_turn`)?
|
||||||
|
|
||||||
|
## process_way(profile, way, result)
|
||||||
|
Given an OpenStreetMap way, the `process_way` function will either return nothing (meaning we are not going to route over this way at all), or it will set up a result hash.
|
||||||
|
|
||||||
|
Argument | Description
|
||||||
|
---------|-------------------------------------------------------
|
||||||
|
profile | The configuration table you returned in `setup`.
|
||||||
|
node | The input way to process (read-only).
|
||||||
|
result | The output that you will modify.
|
||||||
|
|
||||||
|
Importantly it will set `result.forward_mode` and `result.backward_mode` to indicate the travel mode in each direction, as well as set `result.forward_speed` and `result.backward_speed` to integer values representing the speed for traversing the way.
|
||||||
|
|
||||||
|
It will also set a number of other attributes on `result`.
|
||||||
|
|
||||||
|
Using the power of the scripting language you wouldn't typically see something as simple as a `result.forward_speed = 20` line within the `process_way` function. Instead `process_way` will examine the tag set on the way, process this information in various ways, calling other local functions and referencing the configuration in `profile`, etc, before arriving at the result.
|
||||||
|
|
||||||
|
The following attributes can be set on the result in `process_way`:
|
||||||
|
|
||||||
Attribute | Type | Notes
|
Attribute | Type | Notes
|
||||||
----------------------------------------|----------|--------------------------------------------------------------------------
|
----------------------------------------|----------|--------------------------------------------------------------------------
|
||||||
@@ -56,9 +155,11 @@ forward_rate | Float | Routing weight, expressed a
|
|||||||
backward_rate | Float | " "
|
backward_rate | Float | " "
|
||||||
forward_mode | Enum | Mode of travel (e.g. `car`, `ferry`). Mandatory. Defined in `include/extractor/travel_mode.hpp`.
|
forward_mode | Enum | Mode of travel (e.g. `car`, `ferry`). Mandatory. Defined in `include/extractor/travel_mode.hpp`.
|
||||||
backward_mode | Enum | " "
|
backward_mode | Enum | " "
|
||||||
|
forward_classes | Table | Mark this way as being of a specific class, e.g. `result.classes["toll"] = true`. This will be exposed in the API as `classes` on each `RouteStep`.
|
||||||
|
backward_classes | Table | " "
|
||||||
duration | Float | Alternative setter for duration of the whole way in both directions
|
duration | Float | Alternative setter for duration of the whole way in both directions
|
||||||
weight | Float | Alternative setter for weight of the whole way in both directions
|
weight | Float | Alternative setter for weight of the whole way in both directions
|
||||||
turn_lanes_forward | String | Directions for individual lanes (normalised OSM `turn:lanes` value)
|
turn_lanes_forward | String | Directions for individual lanes (normalized OSM `turn:lanes` value)
|
||||||
turn_lanes_backward | String | " "
|
turn_lanes_backward | String | " "
|
||||||
forward_restricted | Boolean | Is this a restricted access road? (e.g. private, or deliveries only; used to enable high turn penalty, so that way is only chosen for start/end of route)
|
forward_restricted | Boolean | Is this a restricted access road? (e.g. private, or deliveries only; used to enable high turn penalty, so that way is only chosen for start/end of route)
|
||||||
backward_restricted | Boolean | " "
|
backward_restricted | Boolean | " "
|
||||||
@@ -67,6 +168,8 @@ roundabout | Boolean | Is this part of a roundabou
|
|||||||
circular | Boolean | Is this part of a non-roundabout circular junction?
|
circular | Boolean | Is this part of a non-roundabout circular junction?
|
||||||
name | String | Name of the way
|
name | String | Name of the way
|
||||||
ref | String | Road number
|
ref | String | Road number
|
||||||
|
destinations | String | The road's destinations
|
||||||
|
exits | String | The ramp's exit numbers or names
|
||||||
pronunciation | String | Name pronunciation
|
pronunciation | String | Name pronunciation
|
||||||
road_classification.motorway_class | Boolean | Guidance: way is a motorway
|
road_classification.motorway_class | Boolean | Guidance: way is a motorway
|
||||||
road_classification.link_class | Boolean | Guidance: way is a slip/link road
|
road_classification.link_class | Boolean | Guidance: way is a slip/link road
|
||||||
@@ -74,32 +177,19 @@ road_classification.road_priority_class | Enum | Guidance: order in priority
|
|||||||
road_classification.may_be_ignored | Boolean | Guidance: way is non-highway
|
road_classification.may_be_ignored | Boolean | Guidance: way is non-highway
|
||||||
road_classification.num_lanes | Unsigned | Guidance: total number of lanes in way
|
road_classification.num_lanes | Unsigned | Guidance: total number of lanes in way
|
||||||
|
|
||||||
### Guidance
|
### process_segment(profile, segment)
|
||||||
|
The `process_segment` function is called for every segment of OSM ways. A segment is a straight line between two OSM nodes.
|
||||||
|
|
||||||
The guidance parameters in profiles are currently a work in progress. They can and will change.
|
On OpenStreetMap way cannot have different tags on different parts of a way. Instead you would split the way into several smaller ways. However many ways are long. For example, many ways pass hills without any change in tags.
|
||||||
Please be aware of this when using guidance configuration possibilities.
|
|
||||||
|
|
||||||
Guidance uses road classes to decide on when/if to emit specific instructions and to discover which road is obvious when following a route.
|
Processing each segment of an OSM way makes it possible to have different speeds on different parts of a way based on external data like data about elevation, pollution, noise or scenic value and adjust weight and duration of the segment.
|
||||||
Classification uses three flags and a priority-category.
|
|
||||||
The flags indicate whether a road is a motorway (required for on/off ramps), a link type (the ramps itself, if also a motorway) and whether a road may be omittted in considerations (is considered purely for connectivity).
|
|
||||||
The priority-category influences the decision which road is considered the obvious choice and which roads can be seen as fork.
|
|
||||||
Forks can be emitted between roads of similar priority category only. Obvious choices follow a major priority road, if the priority difference is large.
|
|
||||||
|
|
||||||
## node_function
|
In the `process_segment` you don't have access to OSM tags. Instead you use the geographical location of the start and end point of the way to lookup other data source, like elevation data. See [rasterbot.lua](../profiles/rasterbot.lua) for an example.
|
||||||
|
|
||||||
The following attributes can be set on the result in `node_function`:
|
The following attributes can be read and set on the result in `process_segment`:
|
||||||
|
|
||||||
Attribute | Type | Notes
|
|
||||||
----------------|---------|-------------------------------------------------------
|
|
||||||
barrier | Boolean | Is it an impassable barrier?
|
|
||||||
traffic_lights | Boolean | Is it a traffic light (incurs delay in `turn_function`)?
|
|
||||||
|
|
||||||
## segment_function
|
|
||||||
|
|
||||||
The following attributes can be read and set on the result in `segment_function`:
|
|
||||||
|
|
||||||
Attribute | Read/write? | Type | Notes
|
Attribute | Read/write? | Type | Notes
|
||||||
-------------------|-------------|---------|------------------------------------------------------
|
-------------------|-------------|---------|----------------------------------------
|
||||||
source.lon | Read | Float | Co-ordinates of segment start
|
source.lon | Read | Float | Co-ordinates of segment start
|
||||||
source.lat | Read | Float | " "
|
source.lat | Read | Float | " "
|
||||||
target.lon | Read | Float | Co-ordinates of segment end
|
target.lon | Read | Float | Co-ordinates of segment end
|
||||||
@@ -108,17 +198,88 @@ target.distance | Read | Float | Length of segment
|
|||||||
weight | Read/write | Float | Routing weight for this segment
|
weight | Read/write | Float | Routing weight for this segment
|
||||||
duration | Read/write | Float | Duration for this segment
|
duration | Read/write | Float | Duration for this segment
|
||||||
|
|
||||||
## turn_function
|
### process_turn(profile, turn)
|
||||||
|
The `process_turn` function is called for every possible turn in the network. Based on the angle and type of turn you assign the weight and duration of the movement.
|
||||||
|
|
||||||
The following attributes can be read and set on the result in `turn_function`:
|
The following attributes can be read and set on the result in `process_turn`:
|
||||||
|
|
||||||
Attribute | Read/write? | Type | Notes
|
Attribute | Read/write? | Type | Notes
|
||||||
-------------------|-------------|---------|------------------------------------------------------
|
-------------------|-------------|---------|------------------------------------------------------
|
||||||
direction_modifier | Read | Enum | Geometry of turn. Defined in `include/extractor/guidance/turn_instruction.hpp`
|
direction_modifier | Read | Enum | Geometry of turn. Defined in `include/extractor/guidance/turn_instruction.hpp`
|
||||||
turn_type | Read | Enum | Priority of turn. Defined in `include/extractor/guidance/turn_instruction.hpp`
|
turn_type | Read | Enum | Priority of turn. Defined in `include/extractor/guidance/turn_instruction.hpp`
|
||||||
has_traffic_light | Read | Boolean | Is a traffic light present at this turn?
|
has_traffic_light | Read | Boolean | Is a traffic light present at this turn?
|
||||||
source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `way_function`)
|
source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `process_way`)
|
||||||
target_restricted | Read | Boolean | Is it to a restricted access road? (See definition in `way_function`)
|
target_restricted | Read | Boolean | Is it to a restricted access road? (See definition in `process_way`)
|
||||||
angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on)
|
angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on)
|
||||||
duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds)
|
duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds)
|
||||||
weight | Read/write | Float | Penalty to be applied for this turn (routing weight)
|
weight | Read/write | Float | Penalty to be applied for this turn (routing weight)
|
||||||
|
|
||||||
|
## Guidance
|
||||||
|
The guidance parameters in profiles are currently a work in progress. They can and will change.
|
||||||
|
Please be aware of this when using guidance configuration possibilities.
|
||||||
|
|
||||||
|
Guidance uses road classes to decide on when/if to emit specific instructions and to discover which road is obvious when following a route.
|
||||||
|
Classification uses three flags and a priority-category.
|
||||||
|
The flags indicate whether a road is a motorway (required for on/off ramps), a link type (the ramps itself, if also a motorway) and whether a road may be omitted in considerations (is considered purely for connectivity).
|
||||||
|
The priority-category influences the decision which road is considered the obvious choice and which roads can be seen as fork.
|
||||||
|
Forks can be emitted between roads of similar priority category only. Obvious choices follow a major priority road, if the priority difference is large.
|
||||||
|
|
||||||
|
### Using raster data
|
||||||
|
OSRM has build-in support for loading an interpolating raster data in ASCII format. This can be used e.g. for factoring in elevation when computing routes.
|
||||||
|
|
||||||
|
Use `raster:load()` in your `setup` function to load data and store the source in your configuration hash:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
function setup()
|
||||||
|
return {
|
||||||
|
raster_source = raster:load(
|
||||||
|
"rastersource.asc", -- file to load
|
||||||
|
0, -- longitude min
|
||||||
|
0.1, -- longitude max
|
||||||
|
0, -- latitude min
|
||||||
|
0.1, -- latitude max
|
||||||
|
5, -- number of rows
|
||||||
|
4 -- number of columns
|
||||||
|
)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
The input data must an ASCII file with rows of integers. e.g.:
|
||||||
|
|
||||||
|
```
|
||||||
|
0 0 0 0
|
||||||
|
0 0 0 250
|
||||||
|
0 0 250 500
|
||||||
|
0 0 0 250
|
||||||
|
0 0 0 0
|
||||||
|
```
|
||||||
|
|
||||||
|
In your `segment_function` you can then access the raster source and use `raster:query()` to query to find the nearest data point, or `raster:interpolate()` to interpolate a value based on nearby data points.
|
||||||
|
|
||||||
|
You must check whether the result is valid before use it.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
function process_segment (profile, segment)
|
||||||
|
local sourceData = raster:query(profile.raster_source, segment.source.lon, segment.source.lat)
|
||||||
|
local targetData = raster:query(profile.raster_source, segment.target.lon, segment.target.lat)
|
||||||
|
|
||||||
|
local invalid = sourceData.invalid_data()
|
||||||
|
if sourceData.datum ~= invalid and targetData.datum ~= invalid then
|
||||||
|
-- use values to adjust weight and duration
|
||||||
|
[...]
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
See [rasterbot.lua](../profiles/rasterbot.lua) and [rasterbotinterp.lua](../profiles/rasterbotinterp.lua) for examples.
|
||||||
|
|
||||||
|
### Helper functions
|
||||||
|
There are a few helper functions defined in the global scope that profiles can use:
|
||||||
|
|
||||||
|
durationIsValid
|
||||||
|
parseDuration
|
||||||
|
trimLaneString
|
||||||
|
applyAccessTokens
|
||||||
|
canonicalizeStringList
|
||||||
|
|||||||
+2
-2
@@ -47,10 +47,10 @@ We may introduce forward-compatible changes: query parameters and response prope
|
|||||||
4. Make sure the `package.json` is up to date.
|
4. Make sure the `package.json` is up to date.
|
||||||
5. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
5. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
||||||
6. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries.
|
6. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries.
|
||||||
7. Use `npm run build-api-docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory
|
7. Use `npm run docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory
|
||||||
8. Push tags and commits: `git push; git push --tags`
|
8. Push tags and commits: `git push; git push --tags`
|
||||||
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
||||||
10. Wait until the travis build has been completed and check if the node binaries were published by doing:
|
10. Wait until the travis build has been completed and check if the node binaries were published by doing:
|
||||||
`rm -rf node_modules && npm install` locally.
|
`rm -rf node_modules && npm install` locally.
|
||||||
11. For final releases run `npm publish` or `npm publish --tag next` for release candidates.
|
11. For final releases run `npm publish` or `npm publish --tag next` for release candidates.
|
||||||
|
12. Bump version in `package.json` to `{MAJOR}.{MINOR+1}.0-latest.1` on the `master` branch after the release.
|
||||||
|
|||||||
+283
-283
@@ -1,283 +1,283 @@
|
|||||||
# Locate Intel Threading Building Blocks include paths and libraries
|
# Locate Intel Threading Building Blocks include paths and libraries
|
||||||
# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
|
# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
|
||||||
# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
|
# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
|
||||||
# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
|
# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
|
||||||
# Florian Uhlig <F.Uhlig _at_ gsi.de>,
|
# Florian Uhlig <F.Uhlig _at_ gsi.de>,
|
||||||
# Jiri Marsik <jiri.marsik89 _at_ gmail.com>
|
# Jiri Marsik <jiri.marsik89 _at_ gmail.com>
|
||||||
|
|
||||||
# The MIT License
|
# The MIT License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 Hannes Hofmann
|
# Copyright (c) 2011 Hannes Hofmann
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
# in the Software without restriction, including without limitation the rights
|
# in the Software without restriction, including without limitation the rights
|
||||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
# copies of the Software, and to permit persons to whom the Software is
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
# furnished to do so, subject to the following conditions:
|
# furnished to do so, subject to the following conditions:
|
||||||
#
|
#
|
||||||
# The above copyright notice and this permission notice shall be included in
|
# The above copyright notice and this permission notice shall be included in
|
||||||
# all copies or substantial portions of the Software.
|
# all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
|
# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
|
||||||
# e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
|
# e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
|
||||||
# TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
|
# TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
|
||||||
# in the TBB installation directory (TBB_INSTALL_DIR).
|
# in the TBB installation directory (TBB_INSTALL_DIR).
|
||||||
#
|
#
|
||||||
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
||||||
#
|
#
|
||||||
# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
|
# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
|
||||||
# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
|
# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
|
||||||
# which architecture to use
|
# which architecture to use
|
||||||
# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
|
# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
|
||||||
# which compiler to use (detected automatically on Windows)
|
# which compiler to use (detected automatically on Windows)
|
||||||
|
|
||||||
# This module respects
|
# This module respects
|
||||||
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
|
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
|
||||||
|
|
||||||
# This module defines
|
# This module defines
|
||||||
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
|
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
|
||||||
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
|
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
|
||||||
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
|
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
|
||||||
# TBB_INSTALL_DIR, the base TBB install directory
|
# TBB_INSTALL_DIR, the base TBB install directory
|
||||||
# TBB_LIBRARIES, the libraries to link against to use TBB.
|
# TBB_LIBRARIES, the libraries to link against to use TBB.
|
||||||
# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
|
# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
|
||||||
# TBB_FOUND, If false, don't try to use TBB.
|
# TBB_FOUND, If false, don't try to use TBB.
|
||||||
# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
|
# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
|
||||||
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# has em64t/vc8 em64t/vc9
|
# has em64t/vc8 em64t/vc9
|
||||||
# has ia32/vc7.1 ia32/vc8 ia32/vc9
|
# has ia32/vc7.1 ia32/vc8 ia32/vc9
|
||||||
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
|
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
|
||||||
set(_TBB_LIB_NAME "tbb")
|
set(_TBB_LIB_NAME "tbb")
|
||||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||||
if (MSVC71)
|
if (MSVC71)
|
||||||
set (_TBB_COMPILER "vc7.1")
|
set (_TBB_COMPILER "vc7.1")
|
||||||
endif(MSVC71)
|
endif(MSVC71)
|
||||||
if (MSVC80)
|
if (MSVC80)
|
||||||
set(_TBB_COMPILER "vc8")
|
set(_TBB_COMPILER "vc8")
|
||||||
endif(MSVC80)
|
endif(MSVC80)
|
||||||
if (MSVC90)
|
if (MSVC90)
|
||||||
set(_TBB_COMPILER "vc9")
|
set(_TBB_COMPILER "vc9")
|
||||||
endif(MSVC90)
|
endif(MSVC90)
|
||||||
if(MSVC10)
|
if(MSVC10)
|
||||||
set(_TBB_COMPILER "vc10")
|
set(_TBB_COMPILER "vc10")
|
||||||
endif(MSVC10)
|
endif(MSVC10)
|
||||||
# Todo: add other Windows compilers such as ICL.
|
# Todo: add other Windows compilers such as ICL.
|
||||||
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# MAC
|
# MAC
|
||||||
set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
|
set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
|
||||||
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
|
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
|
||||||
set(_TBB_LIB_NAME "tbb")
|
set(_TBB_LIB_NAME "tbb")
|
||||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||||
# default flavor on apple: ia32/cc4.0.1_os10.4.9
|
# default flavor on apple: ia32/cc4.0.1_os10.4.9
|
||||||
# Jiri: There is no reason to presume there is only one flavor and
|
# Jiri: There is no reason to presume there is only one flavor and
|
||||||
# that user's setting of variables should be ignored.
|
# that user's setting of variables should be ignored.
|
||||||
if(NOT TBB_COMPILER)
|
if(NOT TBB_COMPILER)
|
||||||
set(_TBB_COMPILER "cc4.0.1_os10.4.9")
|
set(_TBB_COMPILER "cc4.0.1_os10.4.9")
|
||||||
elseif (NOT TBB_COMPILER)
|
elseif (NOT TBB_COMPILER)
|
||||||
set(_TBB_COMPILER ${TBB_COMPILER})
|
set(_TBB_COMPILER ${TBB_COMPILER})
|
||||||
endif(NOT TBB_COMPILER)
|
endif(NOT TBB_COMPILER)
|
||||||
if(NOT TBB_ARCHITECTURE)
|
if(NOT TBB_ARCHITECTURE)
|
||||||
set(_TBB_ARCHITECTURE "ia32")
|
set(_TBB_ARCHITECTURE "ia32")
|
||||||
elseif(NOT TBB_ARCHITECTURE)
|
elseif(NOT TBB_ARCHITECTURE)
|
||||||
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
||||||
endif(NOT TBB_ARCHITECTURE)
|
endif(NOT TBB_ARCHITECTURE)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
# LINUX
|
# LINUX
|
||||||
set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
|
set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
|
||||||
set(_TBB_LIB_NAME "tbb")
|
set(_TBB_LIB_NAME "tbb")
|
||||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||||
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
|
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
|
||||||
# has ia32/*
|
# has ia32/*
|
||||||
# has itanium/*
|
# has itanium/*
|
||||||
set(_TBB_COMPILER ${TBB_COMPILER})
|
set(_TBB_COMPILER ${TBB_COMPILER})
|
||||||
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM MATCHES "SunOS.*")
|
if (CMAKE_SYSTEM MATCHES "SunOS.*")
|
||||||
# SUN
|
# SUN
|
||||||
# not yet supported
|
# not yet supported
|
||||||
# has em64t/cc3.4.3_kernel5.10
|
# has em64t/cc3.4.3_kernel5.10
|
||||||
# has ia32/*
|
# has ia32/*
|
||||||
endif (CMAKE_SYSTEM MATCHES "SunOS.*")
|
endif (CMAKE_SYSTEM MATCHES "SunOS.*")
|
||||||
|
|
||||||
|
|
||||||
#-- Clear the public variables
|
#-- Clear the public variables
|
||||||
set (TBB_FOUND "NO")
|
set (TBB_FOUND "NO")
|
||||||
|
|
||||||
|
|
||||||
#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
|
#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
|
||||||
# first: use CMake variable TBB_INSTALL_DIR
|
# first: use CMake variable TBB_INSTALL_DIR
|
||||||
if (TBB_INSTALL_DIR)
|
if (TBB_INSTALL_DIR)
|
||||||
set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
|
||||||
endif (TBB_INSTALL_DIR)
|
endif (TBB_INSTALL_DIR)
|
||||||
# second: use environment variable
|
# second: use environment variable
|
||||||
if (NOT _TBB_INSTALL_DIR)
|
if (NOT _TBB_INSTALL_DIR)
|
||||||
if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
|
||||||
# Intel recommends setting TBB21_INSTALL_DIR
|
# Intel recommends setting TBB21_INSTALL_DIR
|
||||||
if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
|
||||||
if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
|
||||||
if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
||||||
set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
|
||||||
endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
|
||||||
endif (NOT _TBB_INSTALL_DIR)
|
endif (NOT _TBB_INSTALL_DIR)
|
||||||
# third: try to find path automatically
|
# third: try to find path automatically
|
||||||
if (NOT _TBB_INSTALL_DIR)
|
if (NOT _TBB_INSTALL_DIR)
|
||||||
if (_TBB_DEFAULT_INSTALL_DIR)
|
if (_TBB_DEFAULT_INSTALL_DIR)
|
||||||
set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
|
set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
|
||||||
endif (_TBB_DEFAULT_INSTALL_DIR)
|
endif (_TBB_DEFAULT_INSTALL_DIR)
|
||||||
endif (NOT _TBB_INSTALL_DIR)
|
endif (NOT _TBB_INSTALL_DIR)
|
||||||
# sanity check
|
# sanity check
|
||||||
if (NOT _TBB_INSTALL_DIR)
|
if (NOT _TBB_INSTALL_DIR)
|
||||||
message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
|
message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
|
||||||
else (NOT _TBB_INSTALL_DIR)
|
else (NOT _TBB_INSTALL_DIR)
|
||||||
# finally: set the cached CMake variable TBB_INSTALL_DIR
|
# finally: set the cached CMake variable TBB_INSTALL_DIR
|
||||||
if (NOT TBB_INSTALL_DIR)
|
if (NOT TBB_INSTALL_DIR)
|
||||||
set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
|
set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
|
||||||
mark_as_advanced(TBB_INSTALL_DIR)
|
mark_as_advanced(TBB_INSTALL_DIR)
|
||||||
endif (NOT TBB_INSTALL_DIR)
|
endif (NOT TBB_INSTALL_DIR)
|
||||||
|
|
||||||
|
|
||||||
#-- A macro to rewrite the paths of the library. This is necessary, because
|
#-- A macro to rewrite the paths of the library. This is necessary, because
|
||||||
# find_library() always found the em64t/vc9 version of the TBB libs
|
# find_library() always found the em64t/vc9 version of the TBB libs
|
||||||
macro(TBB_CORRECT_LIB_DIR var_name)
|
macro(TBB_CORRECT_LIB_DIR var_name)
|
||||||
# if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
# if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
||||||
string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
||||||
# endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
# endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
|
||||||
string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
|
||||||
endmacro(TBB_CORRECT_LIB_DIR var_content)
|
endmacro(TBB_CORRECT_LIB_DIR var_content)
|
||||||
|
|
||||||
|
|
||||||
#-- Look for include directory and set ${TBB_INCLUDE_DIR}
|
#-- Look for include directory and set ${TBB_INCLUDE_DIR}
|
||||||
set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
|
set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
|
||||||
# Jiri: tbbvars now sets the CPATH environment variable to the directory
|
# Jiri: tbbvars now sets the CPATH environment variable to the directory
|
||||||
# containing the headers.
|
# containing the headers.
|
||||||
find_path(TBB_INCLUDE_DIR
|
find_path(TBB_INCLUDE_DIR
|
||||||
tbb/task_scheduler_init.h
|
tbb/task_scheduler_init.h
|
||||||
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
||||||
)
|
)
|
||||||
mark_as_advanced(TBB_INCLUDE_DIR)
|
mark_as_advanced(TBB_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
#-- Look for libraries
|
#-- Look for libraries
|
||||||
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
|
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
|
||||||
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
||||||
set (_TBB_LIBRARY_DIR
|
set (_TBB_LIBRARY_DIR
|
||||||
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
|
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
|
||||||
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
|
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
|
||||||
)
|
)
|
||||||
endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
||||||
# Jiri: This block isn't mutually exclusive with the previous one
|
# Jiri: This block isn't mutually exclusive with the previous one
|
||||||
# (hence no else), instead I test if the user really specified
|
# (hence no else), instead I test if the user really specified
|
||||||
# the variables in question.
|
# the variables in question.
|
||||||
if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
||||||
# HH: deprecated
|
# HH: deprecated
|
||||||
message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
|
message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
|
||||||
# Jiri: It doesn't hurt to look in more places, so I store the hints from
|
# Jiri: It doesn't hurt to look in more places, so I store the hints from
|
||||||
# ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
|
# ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
|
||||||
# variables and search them both.
|
# variables and search them both.
|
||||||
set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
|
set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
|
||||||
endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
|
||||||
|
|
||||||
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
||||||
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
|
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
|
||||||
|
|
||||||
# Jiri: No reason not to check the default paths. From recent versions,
|
# Jiri: No reason not to check the default paths. From recent versions,
|
||||||
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
|
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
|
||||||
# variables, which now point to the directories of the lib files.
|
# variables, which now point to the directories of the lib files.
|
||||||
# It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
|
# It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
|
||||||
# argument instead of the implicit PATHS as it isn't hard-coded
|
# argument instead of the implicit PATHS as it isn't hard-coded
|
||||||
# but computed by system introspection. Searching the LIBRARY_PATH
|
# but computed by system introspection. Searching the LIBRARY_PATH
|
||||||
# and LD_LIBRARY_PATH environment variables is now even more important
|
# and LD_LIBRARY_PATH environment variables is now even more important
|
||||||
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
|
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
|
||||||
# the use of TBB built from sources.
|
# the use of TBB built from sources.
|
||||||
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||||
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||||
|
|
||||||
#Extract path from TBB_LIBRARY name
|
#Extract path from TBB_LIBRARY name
|
||||||
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
|
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
|
||||||
|
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
|
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
|
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
|
||||||
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
|
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
|
||||||
|
|
||||||
#-- Look for debug libraries
|
#-- Look for debug libraries
|
||||||
# Jiri: Changed the same way as for the release libraries.
|
# Jiri: Changed the same way as for the release libraries.
|
||||||
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||||
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||||
|
|
||||||
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
||||||
# Extract path from TBB_LIBRARY_DEBUG name
|
# Extract path from TBB_LIBRARY_DEBUG name
|
||||||
get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
|
get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
|
||||||
|
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
|
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
|
||||||
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
|
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
|
||||||
mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
|
mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
|
||||||
|
|
||||||
|
|
||||||
if (TBB_INCLUDE_DIR)
|
if (TBB_INCLUDE_DIR)
|
||||||
if (TBB_LIBRARY)
|
if (TBB_LIBRARY)
|
||||||
set (TBB_FOUND "YES")
|
set (TBB_FOUND "YES")
|
||||||
set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
|
set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
|
||||||
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
|
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
|
||||||
set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
|
set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
|
||||||
set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
|
set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
|
||||||
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
||||||
set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
|
set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
|
||||||
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
|
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
|
||||||
message(STATUS "Found Intel TBB")
|
message(STATUS "Found Intel TBB")
|
||||||
endif (TBB_LIBRARY)
|
endif (TBB_LIBRARY)
|
||||||
endif (TBB_INCLUDE_DIR)
|
endif (TBB_INCLUDE_DIR)
|
||||||
|
|
||||||
if (NOT TBB_FOUND)
|
if (NOT TBB_FOUND)
|
||||||
message("ERROR: Intel TBB NOT found!")
|
message("ERROR: Intel TBB NOT found!")
|
||||||
message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
|
message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
|
||||||
# do only throw fatal, if this pkg is REQUIRED
|
# do only throw fatal, if this pkg is REQUIRED
|
||||||
if (TBB_FIND_REQUIRED)
|
if (TBB_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR "Could NOT find TBB library.")
|
message(FATAL_ERROR "Could NOT find TBB library.")
|
||||||
endif (TBB_FIND_REQUIRED)
|
endif (TBB_FIND_REQUIRED)
|
||||||
endif (NOT TBB_FOUND)
|
endif (NOT TBB_FOUND)
|
||||||
|
|
||||||
endif (NOT _TBB_INSTALL_DIR)
|
endif (NOT _TBB_INSTALL_DIR)
|
||||||
|
|
||||||
if (TBB_FOUND)
|
if (TBB_FOUND)
|
||||||
set(TBB_INTERFACE_VERSION 0)
|
set(TBB_INTERFACE_VERSION 0)
|
||||||
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
|
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
|
||||||
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
|
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
|
||||||
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
|
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
|
||||||
endif (TBB_FOUND)
|
endif (TBB_FOUND)
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
Feature: Bicycle - Route around alleys
|
Feature: Bicycle - Route around alleys
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the profile file
|
Given the profile file "bicycle" initialized with
|
||||||
"""
|
"""
|
||||||
require 'bicycle'
|
profile.properties.weight_name = 'cyclability'
|
||||||
properties.weight_name = 'cyclability'
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Scenario: Bicycle - Avoid taking alleys
|
Scenario: Bicycle - Avoid taking alleys
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Feature: Bicycle - Handle cycling
|
|||||||
Background:
|
Background:
|
||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bicycle - Use a ferry route
|
Scenario: Bicycle - Use a movable bridge
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
a b c
|
a b c
|
||||||
@@ -21,13 +21,6 @@ Feature: Bicycle - Handle cycling
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes |
|
| from | to | route | modes |
|
||||||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
|
| 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
|
Scenario: Bicycle - Properly handle durations
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -82,16 +82,16 @@ Feature: Bike - Cycle tracks/lanes
|
|||||||
|
|
||||||
Scenario: Bike - Cycleway on oneways, modes
|
Scenario: Bike - Cycleway on oneways, modes
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | cycleway | oneway | forw | backw |
|
| highway | cycleway | oneway | forw | backw |
|
||||||
| motorway | track | yes | cycling | |
|
| motorway | track | yes | cycling | |
|
||||||
| residential | track | yes | cycling | pushing bike |
|
| residential | track | yes | cycling | pushing bike |
|
||||||
| cycleway | track | yes | cycling | pushing bike |
|
| cycleway | track | yes | cycling | pushing bike |
|
||||||
| footway | track | yes | pushing bike | pushing bike |
|
| footway | track | yes | cycling | pushing bike |
|
||||||
|
|
||||||
Scenario: Bike - Cycleway on oneways, speeds
|
Scenario: Bike - Cycleway on oneways, speeds
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | cycleway | oneway | forw | backw |
|
| highway | cycleway | oneway | forw | backw |
|
||||||
| motorway | track | yes | 15 km/h | |
|
| motorway | track | yes | 15 km/h | |
|
||||||
| residential | track | yes | 15 km/h | 6 km/h |
|
| residential | track | yes | 15 km/h | 6 km/h +-1 |
|
||||||
| cycleway | track | yes | 15 km/h | 6 km/h |
|
| cycleway | track | yes | 15 km/h | 6 km/h +-1 |
|
||||||
| footway | track | yes | 6 km/h +-1 | 6 km/h +-1 |
|
| footway | track | yes | 15 km/h | 6 km/h +-1 |
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ Feature: Bike - Destination only, no passing through
|
|||||||
| axye | |
|
| axye | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route |
|
||||||
| a | b | ab,ab |
|
| a | b | ab,ab |
|
||||||
| a | c | ab,bcd,bcd |
|
| a | c | ab,bcd |
|
||||||
| a | d | ab,bcd,bcd |
|
| a | d | ab,bcd |
|
||||||
| a | e | axye,axye |
|
| a | e | axye,axye |
|
||||||
| e | d | de,de |
|
| e | d | de,de |
|
||||||
| e | c | de,bcd,bcd |
|
| e | c | de,bcd |
|
||||||
| e | b | de,bcd,bcd |
|
| e | b | de,bcd |
|
||||||
| e | a | axye,axye |
|
| e | a | axye,axye |
|
||||||
|
|
||||||
Scenario: Bike - Destination only street
|
Scenario: Bike - Destination only street
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -49,15 +49,15 @@ Feature: Bike - Destination only, no passing through
|
|||||||
| axye | |
|
| axye | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route |
|
||||||
| a | b | ab,ab |
|
| a | b | ab,ab |
|
||||||
| a | c | ab,bc,bc |
|
| a | c | ab,bc |
|
||||||
| a | d | ab,bc,cd,cd |
|
| a | d | ab,bc,cd |
|
||||||
| a | e | axye,axye |
|
| a | e | axye,axye |
|
||||||
| e | d | de,de |
|
| e | d | de,de |
|
||||||
| e | c | de,cd,cd |
|
| e | c | de,cd,cd |
|
||||||
| e | b | de,cd,bc,bc |
|
| e | b | de,cd,bc |
|
||||||
| e | a | axye,axye |
|
| e | a | axye,axye |
|
||||||
|
|
||||||
Scenario: Bike - Routing inside a destination only area
|
Scenario: Bike - Routing inside a destination only area
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -76,8 +76,8 @@ Feature: Bike - Destination only, no passing through
|
|||||||
| axye | |
|
| axye | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route |
|
||||||
| a | e | ab,bc,cd,de,de |
|
| a | e | ab,bc,cd,de |
|
||||||
| e | a | de,cd,bc,ab,ab |
|
| e | a | de,cd,bc,ab |
|
||||||
| b | d | bc,cd,cd |
|
| b | d | bc,cd |
|
||||||
| d | b | cd,bc,bc |
|
| d | b | cd,bc |
|
||||||
|
|||||||
@@ -21,12 +21,7 @@ Feature: Bike - Handle ferry routes
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route |
|
||||||
| a | g | abc,cde,efg,efg |
|
| 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 | e | cde,cde |
|
||||||
| c | f | cde,efg,efg |
|
|
||||||
| c | g | cde,efg,efg |
|
| c | g | cde,efg,efg |
|
||||||
|
|
||||||
Scenario: Bike - Ferry duration, single node
|
Scenario: Bike - Ferry duration, single node
|
||||||
@@ -53,8 +48,7 @@ Feature: Bike - Handle ferry routes
|
|||||||
Scenario: Bike - Ferry duration, multiple nodes
|
Scenario: Bike - Ferry duration, multiple nodes
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
x y
|
x a b c d y
|
||||||
a b c d
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
|
|||||||
@@ -20,11 +20,8 @@ Feature: Bike - Mode flag
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes |
|
| from | to | route | modes |
|
||||||
| a | d | ab,bc,cd,cd | cycling,ferry,cycling,cycling |
|
| 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 |
|
| c | a | bc,ab,ab | ferry,cycling,cycling |
|
||||||
| d | b | cd,bc,bc | cycling,ferry,ferry |
|
| 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
|
Scenario: Bike - Mode when using a train
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -42,12 +39,10 @@ Feature: Bike - Mode flag
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes |
|
| from | to | route | modes |
|
||||||
| a | d | ab,bc,cd,cd | cycling,train,cycling,cycling |
|
| 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 |
|
| c | a | bc,ab,ab | train,cycling,cycling |
|
||||||
| d | b | cd,bc,bc | cycling,train,train |
|
| d | b | cd,bc,bc | cycling,train,train |
|
||||||
| a | c | ab,bc,bc | cycling,train,train |
|
|
||||||
| b | d | bc,cd,cd | train,cycling,cycling |
|
|
||||||
|
|
||||||
|
#representative test for all pushes (and mode changes). Where a bike is pushed is tested over in access.feature
|
||||||
Scenario: Bike - Mode when pushing bike against oneways
|
Scenario: Bike - Mode when pushing bike against oneways
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@@ -70,96 +65,6 @@ Feature: Bike - Mode flag
|
|||||||
| d | a | cd,bc,ab,ab | 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 |
|
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
| 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
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
c d
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway |
|
|
||||||
| ab | primary |
|
|
||||||
| bc | pedestrian |
|
|
||||||
| cd | primary |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
c d f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway | area |
|
|
||||||
| ab | primary | |
|
|
||||||
| bcd | pedestrian | yes |
|
|
||||||
| df | primary | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
c d f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway |
|
|
||||||
| ab | primary |
|
|
||||||
| bc | steps |
|
|
||||||
| cd | primary |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
c d f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway | bicycle |
|
|
||||||
| ab | primary | |
|
|
||||||
| bc | primary | dismount |
|
|
||||||
| cd | primary | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
Scenario: Bicycle - Modes when starting on forward oneway
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -134,3 +134,12 @@ Feature: Bike - Oneway streets
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route |
|
||||||
| a | c | ab,bc,bc |
|
| a | c | ab,bc,bc |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Bike - Left/right cycleways on oneways
|
||||||
|
Then routability should be
|
||||||
|
| highway | oneway | cycleway:left | cycleway:right | forw | backw |
|
||||||
|
| primary | yes | | | cycling | pushing bike |
|
||||||
|
| primary | yes | | track | cycling | pushing bike |
|
||||||
|
| primary | yes | track | | cycling | cycling |
|
||||||
|
| primary | yes | track | track | cycling | cycling |
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
@routing @bicycle @ref @name
|
|
||||||
Feature: Bike - Way ref
|
|
||||||
|
|
||||||
Background:
|
|
||||||
Given the profile "bicycle"
|
|
||||||
|
|
||||||
Scenario: Bike - Way with both name and ref
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name | ref |
|
|
||||||
| ab | Utopia Drive | E7 |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | ref |
|
|
||||||
| a | b | Utopia Drive,Utopia Drive | E7,E7 |
|
|
||||||
|
|
||||||
Scenario: Bike - Way with only ref
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name | ref |
|
|
||||||
| ab | | E7 |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | ref |
|
|
||||||
| a | b | , | E7,E7 |
|
|
||||||
|
|
||||||
Scenario: Bike - Way with only name
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name |
|
|
||||||
| ab | Utopia Drive |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| a | b | Utopia Drive,Utopia Drive |
|
|
||||||
@@ -7,6 +7,8 @@ Feature: Bike - Turn restrictions
|
|||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
Given a grid size of 200 meters
|
Given a grid size of 200 meters
|
||||||
|
|
||||||
|
# check to see if bicycle profiles handle relations. The code path is the same as in cars.
|
||||||
|
# If relations are passed, all variants tested in car also work for bike
|
||||||
@no_turning
|
@no_turning
|
||||||
Scenario: Bike - No left turn
|
Scenario: Bike - No left turn
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -33,188 +35,7 @@ Feature: Bike - Turn restrictions
|
|||||||
| s | n | sj,nj,nj |
|
| s | n | sj,nj,nj |
|
||||||
| s | e | sj,ej,ej |
|
| s | e | sj,ej,ej |
|
||||||
|
|
||||||
@no_turning
|
## exceptions are different for bike over car and need to be tested here
|
||||||
Scenario: Bike - No right turn
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | ej | j | no_right_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | wj | j | no_u_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | wj | j | no_weird_zigzags |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | wj | j | only_left_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | ej | j | only_right_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | nj | j | only_straight_on |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway | foot |
|
|
||||||
| sj | yes | no |
|
|
||||||
| nj | -1 | no |
|
|
||||||
| wj | -1 | no |
|
|
||||||
| ej | -1 | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | nj | j | only_weird_zigzags |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| s | w | sj,wj,wj |
|
|
||||||
| s | n | sj,nj,nj |
|
|
||||||
| s | e | sj,ej,ej |
|
|
||||||
|
|
||||||
@except
|
@except
|
||||||
Scenario: Bike - Except tag and on no_ restrictions
|
Scenario: Bike - Except tag and on no_ restrictions
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
@routing @bicycle @safety
|
||||||
|
Feature: Bicycle - Adds penalties to unsafe roads
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile file "bicycle" initialized with
|
||||||
|
"""
|
||||||
|
profile.properties.weight_name = 'cyclability'
|
||||||
|
"""
|
||||||
|
|
||||||
|
Scenario: Bike - Apply penalties to ways without cycleways
|
||||||
|
Then routability should be
|
||||||
|
| highway | cycleway | forw | backw | forw_rate | backw_rate |
|
||||||
|
| motorway | | | | | |
|
||||||
|
| primary | | 15 km/h | 15 km/h | 2.9 | 2.9 |
|
||||||
|
| secondary | | 15 km/h | 15 km/h | 3.1 | 3.1 |
|
||||||
|
| tertiary | | 15 km/h | 15 km/h | 3.3 | 3.3 |
|
||||||
|
| primary_link | | 15 km/h | 15 km/h | 2.9 | 2.9 |
|
||||||
|
| secondary_link | | 15 km/h | 15 km/h | 3.1 | 3.1 |
|
||||||
|
| tertiary_link | | 15 km/h | 15 km/h | 3.3 | 3.3 |
|
||||||
|
| residential | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| cycleway | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | | 6 km/h +-1 | 6 km/h +-1 | 1.7 | 1.7 |
|
||||||
|
|
||||||
|
Scenario: Bike - Apply no penalties to ways with cycleways
|
||||||
|
Then routability should be
|
||||||
|
| highway | cycleway | forw | backw | forw_rate | backw_rate |
|
||||||
|
| motorway | track | 15 km/h | | 4.2 | |
|
||||||
|
| primary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| secondary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| tertiary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| primary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| secondary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| tertiary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| residential | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| cycleway | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| motorway | lane | 15 km/h | | 4.2 | |
|
||||||
|
| primary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| secondary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| tertiary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| primary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| secondary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| tertiary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| residential | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| cycleway | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| motorway | shared_lane | 15 km/h | | 4.2 | |
|
||||||
|
| primary | shared_lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
|
||||||
|
Scenario: Bike - Apply no penalties to ways in direction of cycleways
|
||||||
|
Then routability should be
|
||||||
|
| highway | cycleway:right | cycleway:left | forw | backw | forw_rate | backw_rate |
|
||||||
|
| motorway | track | | 15 km/h | | 4.2 | |
|
||||||
|
| primary | track | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||||
|
| secondary | track | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||||
|
| tertiary | track | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||||
|
| primary_link | track | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||||
|
| secondary_link | track | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||||
|
| tertiary_link | track | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||||
|
| residential | track | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| cycleway | track | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | track | | 15 km/h | 6 km/h +-1 | 4.2 | 1.7 |
|
||||||
|
| motorway | | track | | 15 km/h | | 4.2 |
|
||||||
|
| primary | | track | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||||
|
| secondary | | track | 15 km/h | 15 km/h | 3.1 | 4.2 |
|
||||||
|
| tertiary | | track | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||||
|
| primary_link | | track | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||||
|
| secondary_link | | track | 15 km/h | 15 km/h | 3.1 | 4.2 |
|
||||||
|
| tertiary_link | | track | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||||
|
| residential | | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| cycleway | | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | | track | 6 km/h +-1 | 15 km/h | 1.7 | 4.2 |
|
||||||
|
| motorway | lane | | 15 km/h | | 4.2 | |
|
||||||
|
| primary | lane | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||||
|
| secondary | lane | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||||
|
| tertiary | lane | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||||
|
| primary_link | lane | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||||
|
| secondary_link | lane | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||||
|
| tertiary_link | lane | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||||
|
| residential | lane | | 15 km/h +-1 | 15 km/h +-1 | 4.2 | 4.2 |
|
||||||
|
| cycleway | lane | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | lane | | 15 km/h | 6 km/h +-1 | 4.2 | 1.7 |
|
||||||
|
| motorway | | lane | | 15 km/h | | 4.2 |
|
||||||
|
| primary | | lane | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||||
|
| secondary | | lane | 15 km/h +-1 | 15 km/h +-1 | 3.1 | 4.2 |
|
||||||
|
| tertiary | | lane | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||||
|
| primary_link | | lane | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||||
|
| secondary_link | | lane | 15 km/h | 15 km/h | 3.1 | 4.2 |
|
||||||
|
| tertiary_link | | lane | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||||
|
| residential | | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| cycleway | | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| footway | | lane | 6 km/h +-1 | 15 km/h | 1.7 | 4.2 |
|
||||||
|
| motorway | shared_lane | | 15 km/h | | 4.2 | |
|
||||||
|
| primary | shared_lane | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||||
|
| motorway | | shared_lane | | 15 km/h | | 4.2 |
|
||||||
|
| primary | | shared_lane | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Bike - Don't apply penalties for all kind of cycleways
|
||||||
|
Then routability should be
|
||||||
|
| highway | cycleway | forw | backw | forw_rate | backw_rate |
|
||||||
|
| tertiary | shared_lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| tertiary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||||
|
| tertiary | opposite | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
@routing @bicycle @startpoint
|
||||||
|
Feature: Bike - Allowed start/end modes
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "bicycle"
|
||||||
|
|
||||||
|
Scenario: Bike - Don't start/stop on ferries
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | route | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bc | | ferry | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,ab | cycling,cycling |
|
||||||
|
| 2 | 1 | ab,ab | cycling,cycling |
|
||||||
|
|
||||||
|
Scenario: Bike - Don't start/stop on trains
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | railway | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bc | | train | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,ab | cycling,cycling |
|
||||||
|
| 2 | 1 | ab,ab | cycling,cycling |
|
||||||
|
|
||||||
|
Scenario: Bike - OK to start pushing bike
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| ab | primary |
|
||||||
|
| bc | steps |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||||
|
| 2 | 1 | bc,ab,ab | pushing bike,cycling,cycling |
|
||||||
@@ -1,39 +1,71 @@
|
|||||||
@routing @bicycle @train
|
@routing @bicycle @train
|
||||||
Feature: Bike - Handle ferry routes
|
Feature: Bike - Handle ferry routes
|
||||||
# Bringing bikes on trains and subways
|
# Bringing bikes on trains and subways
|
||||||
|
# We cannot currently use a 'routability' type test, since the bike
|
||||||
|
# profile does not allow starting/stopping on trains, and
|
||||||
|
# it's not possible to modify the bicycle profile table because it's
|
||||||
|
# defined as local.
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Bringing bikes on trains
|
Scenario: Bike - Bringing bikes on trains
|
||||||
Then routability should be
|
Given the node map
|
||||||
| highway | railway | bicycle | bothw |
|
"""
|
||||||
| primary | | | cycling |
|
a 1 b c 2 d e 3 f g 4 h
|
||||||
| (nil) | train | | |
|
"""
|
||||||
| (nil) | train | no | |
|
|
||||||
| (nil) | train | yes | train |
|
And the ways
|
||||||
| (nil) | railway | | |
|
| nodes | highway | railway | bicycle |
|
||||||
| (nil) | railway | no | |
|
| ab | primary | | |
|
||||||
| (nil) | railway | yes | train |
|
| cd | primary | | |
|
||||||
| (nil) | subway | | |
|
| ef | primary | | |
|
||||||
| (nil) | subway | no | |
|
| gh | primary | | |
|
||||||
| (nil) | subway | yes | train |
|
| bc | | train | |
|
||||||
| (nil) | tram | | |
|
| de | | train | yes |
|
||||||
| (nil) | tram | no | |
|
| fg | | train | no |
|
||||||
| (nil) | tram | yes | train |
|
|
||||||
| (nil) | light_rail | | |
|
When I route I should get
|
||||||
| (nil) | light_rail | no | |
|
| from | to | route |
|
||||||
| (nil) | light_rail | yes | train |
|
| 1 | 2 | |
|
||||||
| (nil) | monorail | | |
|
| 2 | 3 | cd,de,ef,ef |
|
||||||
| (nil) | monorail | no | |
|
| 3 | 4 | |
|
||||||
| (nil) | monorail | yes | train |
|
|
||||||
| (nil) | some_tag | | |
|
Scenario: Bike - Bringing bikes on trains, invalid railway tag is accepted if access specified
|
||||||
| (nil) | some_tag | no | |
|
Given the node map
|
||||||
| (nil) | some_tag | yes | cycling |
|
"""
|
||||||
|
a 1 b c 2 d e 3 f g 4 h
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | railway | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| cd | primary | | |
|
||||||
|
| ef | primary | | |
|
||||||
|
| gh | primary | | |
|
||||||
|
| bc | | invalid_tag | |
|
||||||
|
| de | | invalid_tag | yes |
|
||||||
|
| fg | | invalid_tag | no |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| 1 | 2 | |
|
||||||
|
| 2 | 3 | cd,de,ef|
|
||||||
|
| 3 | 4 | |
|
||||||
|
|
||||||
@construction
|
@construction
|
||||||
Scenario: Bike - Don't route on railways under construction
|
Scenario: Bike - Don't route on railways under construction
|
||||||
Then routability should be
|
Given the node map
|
||||||
| highway | railway | bicycle | bothw |
|
"""
|
||||||
| primary | | | cycling |
|
a 1 b c 2 d
|
||||||
| (nil) | construction | yes | |
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | railway | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| cd | primary | | |
|
||||||
|
| bc | | construction | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| 1 | 2 | |
|
||||||
|
|||||||
@@ -7,10 +7,9 @@ Feature: Turn Penalties
|
|||||||
|
|
||||||
|
|
||||||
Scenario: Bicycle - Turn penalties on cyclability
|
Scenario: Bicycle - Turn penalties on cyclability
|
||||||
Given the profile file
|
Given the profile file "bicycle" initialized with
|
||||||
"""
|
"""
|
||||||
require 'bicycle'
|
profile.properties.weight_name = 'cyclability'
|
||||||
properties.weight_name = 'cyclability'
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
+20
-20
@@ -183,9 +183,9 @@ Feature: Car - Restricted access
|
|||||||
Scenario: Car - designated HOV ways are rated low
|
Scenario: Car - designated HOV ways are rated low
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | hov | bothw | forw_rate | backw_rate |
|
| highway | hov | bothw | forw_rate | backw_rate |
|
||||||
| primary | designated | x | 18 | 18 |
|
| primary | designated | x | 18.2 | 18.2 |
|
||||||
| primary | yes | x | 18 | 18 |
|
| primary | yes | x | 18.2 | 18.2 |
|
||||||
| primary | no | x | 18 | 18 |
|
| primary | no | x | 18.2 | 18.2 |
|
||||||
|
|
||||||
# Models:
|
# Models:
|
||||||
# https://www.openstreetmap.org/way/124891268
|
# https://www.openstreetmap.org/way/124891268
|
||||||
@@ -201,24 +201,24 @@ Feature: Car - Restricted access
|
|||||||
Scenario: Car - a way with all lanes HOV-designated is highly penalized by default (similar to hov=designated)
|
Scenario: Car - a way with all lanes HOV-designated is highly penalized by default (similar to hov=designated)
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | hov:lanes:forward | hov:lanes:backward | hov:lanes | oneway | forw | backw | forw_rate | backw_rate |
|
| highway | hov:lanes:forward | hov:lanes:backward | hov:lanes | oneway | forw | backw | forw_rate | backw_rate |
|
||||||
| primary | designated | designated | | | x | x | 18 | 18 |
|
| primary | designated | designated | | | x | x | 18.2 | 18.2 |
|
||||||
# This test is flaky because non-deterministic turn generation sometimes emits a NoTurn here that is marked as restricted. #3769
|
# This test is flaky because non-deterministic turn generation sometimes emits a NoTurn here that is marked as restricted. #3769
|
||||||
#| primary | | designated | | | x | x | 18 | 18 |
|
#| primary | | designated | | | x | x | 18.2 | 18.2 |
|
||||||
#| primary | designated | | | | x | x | 18 | 18 |
|
#| primary | designated | | | | x | x | 18.2 | 18.2 |
|
||||||
| primary | designated\|designated | designated\|designated | | | x | x | 18 | 18 |
|
| primary | designated\|designated | designated\|designated | | | x | x | 18.2 | 18.2 |
|
||||||
| primary | designated\|no | designated\|no | | | x | x | 18 | 18 |
|
| primary | designated\|no | designated\|no | | | x | x | 18.2 | 18.2 |
|
||||||
| primary | yes\|no | yes\|no | | | x | x | 18 | 18 |
|
| primary | yes\|no | yes\|no | | | x | x | 18.2 | 18.2 |
|
||||||
| primary | | | | | x | x | 18 | 18 |
|
| primary | | | | | x | x | 18.2 | 18.2 |
|
||||||
| primary | designated | | | -1 | | x | | 18 |
|
| primary | designated | | | -1 | | x | | 18.2 |
|
||||||
| primary | | designated | | -1 | | x | | 18 |
|
| primary | | designated | | -1 | | x | | 18.2 |
|
||||||
| primary | | | designated | yes | x | | 18 | |
|
| primary | | | designated | yes | x | | 18.2 | |
|
||||||
| primary | | | designated | -1 | | x | | 18 |
|
| primary | | | designated | -1 | | x | | 18.2 |
|
||||||
| primary | | | designated\| | yes | x | | 18 | |
|
| primary | | | designated\| | yes | x | | 18.2 | |
|
||||||
| primary | | | designated\| | -1 | | x | | 18 |
|
| primary | | | designated\| | -1 | | x | | 18.2 |
|
||||||
| primary | | | designated\|designated | yes | x | | 18 | |
|
| primary | | | designated\|designated | yes | x | | 18.2 | |
|
||||||
| primary | | | designated\|designated | -1 | | x | | 18 |
|
| primary | | | designated\|designated | -1 | | x | | 18.2 |
|
||||||
| primary | | | designated\|yes | yes | x | | 18 | |
|
| primary | | | designated\|yes | yes | x | | 18.2 | |
|
||||||
| primary | | | designated\|no | -1 | | x | | 18 |
|
| primary | | | designated\|no | -1 | | x | | 18.2 |
|
||||||
|
|
||||||
Scenario: Car - these toll roads always work
|
Scenario: Car - these toll roads always work
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
|||||||
@@ -22,13 +22,7 @@ Feature: Car - Handle driving
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes |
|
| from | to | route | modes |
|
||||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving |
|
| 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 |
|
| 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 - Control test without durations, osrm uses movable bridge speed to calculate duration
|
Scenario: Car - Control test without durations, osrm uses movable bridge speed to calculate duration
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -47,8 +41,6 @@ Feature: Car - Handle driving
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes | speed | time |
|
| from | to | route | modes | speed | time |
|
||||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 13 km/h | 340s +-1 |
|
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 13 km/h | 340s +-1 |
|
||||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 9 km/h | 318s +-1 |
|
|
||||||
| c | e | cde,cde | driving,driving | 5 km/h | 295s +-1 |
|
|
||||||
| e | c | cde,cde | driving,driving | 5 km/h | 295s +-1 |
|
| e | c | cde,cde | driving,driving | 5 km/h | 295s +-1 |
|
||||||
|
|
||||||
Scenario: Car - Properly handle durations
|
Scenario: Car - Properly handle durations
|
||||||
@@ -68,6 +60,5 @@ Feature: Car - Handle driving
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes | speed |
|
| from | to | route | modes | speed |
|
||||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 7 km/h |
|
| 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 |
|
| c | e | cde,cde | driving,driving | 2 km/h |
|
||||||
| e | c | cde,cde | driving,driving | 2 km/h |
|
| e | c | cde,cde | driving,driving | 2 km/h |
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
@routing @car @mode
|
||||||
|
Feature: Car - Mode flag
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
|
||||||
|
Scenario: Car - We tag ferries with a class
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b
|
||||||
|
c d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | route |
|
||||||
|
| ab | primary | |
|
||||||
|
| bc | | ferry |
|
||||||
|
| cd | primary | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | classes |
|
||||||
|
| a | d | ab,bc,cd,cd | depart,notification right,notification left,arrive | [()],[(ferry)],[()],[()] |
|
||||||
|
| d | a | cd,bc,ab,ab | depart,notification right,notification left,arrive | [()],[(ferry)],[()],[()] |
|
||||||
|
| c | a | bc,ab,ab | depart,notification left,arrive | [(ferry)],[()],[()] |
|
||||||
|
| d | b | cd,bc,bc | depart,notification right,arrive | [()],[(ferry)],[()] |
|
||||||
|
| a | c | ab,bc,bc | depart,notification right,arrive | [()],[(ferry)],[()] |
|
||||||
|
| b | d | bc,cd,cd | depart,notification left,arrive | [(ferry)],[()],[()] |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Car - We tag motorways with a class
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b
|
||||||
|
c d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| ab | primary |
|
||||||
|
| bc | motorway|
|
||||||
|
| cd | primary |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | classes |
|
||||||
|
| a | d | ab,cd | depart,arrive | [(),(motorway),()],[()] |
|
||||||
|
| a | c | ab,bc | depart,arrive | [(),(motorway)],[()] |
|
||||||
|
| b | d | bc,cd | depart,arrive | [(motorway),()],[()] |
|
||||||
|
|
||||||
|
Scenario: Car - We tag motorway_link with a class
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b
|
||||||
|
c d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| ab | primary |
|
||||||
|
| bc | motorway_link |
|
||||||
|
| cd | primary |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | classes | # |
|
||||||
|
| a | d | ab,bc,cd | depart,on ramp right,arrive | [()],[(motorway),()],[()] | on-ramp at class change |
|
||||||
|
| a | c | ab,bc,bc | depart,on ramp right,arrive | [()],[(motorway)],[()] | " " |
|
||||||
|
| b | d | bc,cd | depart,arrive | [(motorway),()],[()] | no announcement |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Car - We tag restricted with a class
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b
|
||||||
|
c d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | access |
|
||||||
|
| ab | primary | private |
|
||||||
|
| bc | motorway| private |
|
||||||
|
| cd | primary | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | classes |
|
||||||
|
| a | d | ab,cd | depart,arrive| [(restricted),(motorway,restricted),()],[()] |
|
||||||
|
|
||||||
|
Scenario: Car - We toll restricted with a class
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b
|
||||||
|
c d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | toll |
|
||||||
|
| ab | primary | yes |
|
||||||
|
| bc | motorway| yes |
|
||||||
|
| cd | primary | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | classes |
|
||||||
|
| a | d | ab,cd | depart,arrive | [(toll),(motorway,toll),()],[()] |
|
||||||
|
|
||||||
|
Scenario: Car - From roundabout on toll road
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
/ \
|
||||||
|
a---b d---f
|
||||||
|
\ /
|
||||||
|
e
|
||||||
|
|
|
||||||
|
g
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | oneway | highway | junction | toll |
|
||||||
|
| ab | yes | primary | | |
|
||||||
|
| cb | yes | primary | roundabout | |
|
||||||
|
| dc | yes | primary | roundabout | |
|
||||||
|
| be | yes | primary | roundabout | |
|
||||||
|
| ed | yes | motorway| roundabout | |
|
||||||
|
| eg | yes | primary | | |
|
||||||
|
| df | yes | motorway| | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | classes |
|
||||||
|
| a | f | ab,df,df,df | depart,roundabout-exit-2,exit roundabout slight right,arrive | [()],[(),(motorway)],[(toll,motorway)],[()] |
|
||||||
|
|
||||||
@@ -72,6 +72,75 @@ Feature: Car - Turn restrictions
|
|||||||
| n | m | nj,pjm,pjm |
|
| n | m | nj,pjm,pjm |
|
||||||
| s | m | js,pjm,pjm |
|
| s | m | js,pjm,pjm |
|
||||||
|
|
||||||
|
@no_turning @conditionals
|
||||||
|
Scenario: Car - Restriction With Compressed Geometry
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
n
|
||||||
|
|
|
||||||
|
i
|
||||||
|
|
|
||||||
|
j-k-l-m
|
||||||
|
|
|
||||||
|
s
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| nij |
|
||||||
|
| js |
|
||||||
|
| jklm |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:to | node:via | restriction:conditional |
|
||||||
|
| restriction | nij | jklm | j | no_left_turn @ (Mo-Fr 07:00-10:30) |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| n | m | nij,js,js,jklm,jklm |
|
||||||
|
|
||||||
|
@no_turning @conditionals
|
||||||
|
Scenario: Car - Restriction With Compressed Geometry and Traffic Signal
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
n
|
||||||
|
|
|
||||||
|
i
|
||||||
|
|
|
||||||
|
j-k-l-m
|
||||||
|
|
|
||||||
|
s
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| nij |
|
||||||
|
| js |
|
||||||
|
| jklm |
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| i | traffic_signal |
|
||||||
|
| k | traffic_signal |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:to | node:via | restriction:conditional |
|
||||||
|
| restriction | nij | jklm | j | no_left_turn @ (Mo-Fr 07:00-10:30) |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| n | m | nij,js,js,jklm,jklm |
|
||||||
|
|
||||||
@no_turning @conditionals
|
@no_turning @conditionals
|
||||||
Scenario: Car - ignores except restriction
|
Scenario: Car - ignores except restriction
|
||||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
@@ -530,6 +599,81 @@ Feature: Car - Turn restrictions
|
|||||||
| n | p | nj,js,js,jp,jp |
|
| n | p | nj,js,js,jp,jp |
|
||||||
| m | p | mj,jp,jp |
|
| m | p | mj,jp,jp |
|
||||||
|
|
||||||
|
@restriction-way
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# 5pm Wed 02 May, 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction:conditional |
|
||||||
|
| restriction | ab | be | de | no_right_turn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,de,de | depart,turn left,turn right,arrive | c,b,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
# condition is off
|
||||||
|
@restriction-way
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# time stamp for 12am on Tues, 02 May 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493726400"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493726400"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction:conditional |
|
||||||
|
| restriction | ab | be | de | no_right_turn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | d | ab,be,de,de |
|
||||||
|
| a | f | ab,be,ef,ef |
|
||||||
|
| c | d | bc,be,de,de |
|
||||||
|
| c | f | bc,be,ef,ef |
|
||||||
|
|
||||||
# https://www.openstreetmap.org/#map=18/38.91099/-77.00888
|
# https://www.openstreetmap.org/#map=18/38.91099/-77.00888
|
||||||
@no_turning @conditionals
|
@no_turning @conditionals
|
||||||
Scenario: Car - DC North capitol situation, two on one off
|
Scenario: Car - DC North capitol situation, two on one off
|
||||||
@@ -739,3 +883,175 @@ Feature: Car - Turn restrictions
|
|||||||
| from | to | route | turns |
|
| from | to | route | turns |
|
||||||
| a | c | albic,dobe,dobe,albic,albic | depart,turn left,continue uturn,turn left,arrive |
|
| a | c | albic,dobe,dobe,albic,albic | depart,turn left,continue uturn,turn left,arrive |
|
||||||
| a | e | albic,dobe,dobe | depart,turn left,arrive |
|
| a | e | albic,dobe,dobe | depart,turn left,arrive |
|
||||||
|
|
||||||
|
@no_turning @conditionals
|
||||||
|
Scenario: Car - Conditional restriction with multiple time windows
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# 5pm Wed 02 May, 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a f
|
||||||
|
| |
|
||||||
|
b - e - h
|
||||||
|
| | |
|
||||||
|
c d - g
|
||||||
|
1
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
| be |
|
||||||
|
| eh |
|
||||||
|
| gh |
|
||||||
|
| dg |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction:conditional |
|
||||||
|
| restriction | ab | be | ef | no_uturn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:to | node:via | restriction:conditional |
|
||||||
|
| restriction | ed | dg | d | no_uturn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | f | ab,bc,bc,be,ef,ef |
|
||||||
|
| f | 1 | ef,eh,gh,dg,dg |
|
||||||
|
|
||||||
|
@restriction-way @overlap
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# 5pm Wed 02 May, 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction:conditional |
|
||||||
|
| restriction | ab | be | de | no_right_turn @ (Mo-Fr 07:00-11:00) |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | be | de | no_right_turn |
|
||||||
|
|
||||||
|
# condition is off, but the general restriction should take precedence
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,de,de | depart,turn left,turn right,arrive | c,b,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
@restriction-way @overlap
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# 5pm Wed 02 May, 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction:conditional |
|
||||||
|
| restriction | ab | be | de | no_right_turn @ (Mo-Fr 07:00-11:00) |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | node:via | way:to | restriction:conditional |
|
||||||
|
| restriction | be | e | de | no_right_turn @ (Mo-Fr 16:00-18:00) |
|
||||||
|
|
||||||
|
# way restriction is off, node-restriction is on
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,ef,ef,de,de | depart,turn left,turn left,continue uturn,new name straight,arrive | c,b,e,f,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
@restriction-way @overlap
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||||
|
# 5pm Wed 02 May, 2017 GMT
|
||||||
|
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction:conditional |
|
||||||
|
| restriction | ab | be | de | no_right_turn @ (Mo-Fr 16:00-18:00) |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | node:via | way:to | restriction:conditional |
|
||||||
|
| restriction | be | e | de | no_right_turn @ (Mo-Fr 07:00-11:00) |
|
||||||
|
|
||||||
|
# node restrictino is off, way restriction is on
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,de,de | depart,turn left,turn right,arrive | c,b,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@routing @car @construction
|
||||||
|
Feature: Car - all construction tags the OpenStreetMap community could think of and then some
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
|
||||||
|
Scenario: Various ways to tag construction and proposed roads
|
||||||
|
Then routability should be
|
||||||
|
| highway | construction | proposed | bothw |
|
||||||
|
| primary | | | x |
|
||||||
|
| construction | | | |
|
||||||
|
| proposed | | | |
|
||||||
|
| primary | yes | | |
|
||||||
|
| primary | | yes | |
|
||||||
|
| primary | no | | x |
|
||||||
|
| primary | widening | | x |
|
||||||
|
| primary | minor | | x |
|
||||||
@@ -50,6 +50,7 @@ Feature: Car - Handle ferry routes
|
|||||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 9 km/h | 162.4s |
|
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 9 km/h | 162.4s |
|
||||||
| c | e | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
| c | e | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
||||||
| e | c | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
| e | c | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
||||||
|
|
||||||
Scenario: Car - Properly handle simple durations
|
Scenario: Car - Properly handle simple durations
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@@ -91,3 +92,20 @@ Feature: Car - Handle ferry routes
|
|||||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h | 78.4s |
|
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h | 78.4s |
|
||||||
| c | e | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
| c | e | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
||||||
| e | c | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
| e | c | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
||||||
|
|
||||||
|
@snapping
|
||||||
|
Scenario: Car - Snapping when using a ferry
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b c d e f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | route | duration |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bcde | | ferry | 0:10 |
|
||||||
|
| ef | primary | | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes | time |
|
||||||
|
| c | d | bcde,bcde | ferry,ferry | 600s |
|
||||||
|
|||||||
@@ -88,18 +88,18 @@ OSRM will use 4/5 of the projected free-flow speed.
|
|||||||
| highway | maxspeed | width | maxspeed:forward | maxspeed:backward | forw | backw | forw_rate | backw_rate |
|
| highway | maxspeed | width | maxspeed:forward | maxspeed:backward | forw | backw | forw_rate | backw_rate |
|
||||||
| primary | | | | | 64 km/h | 64 km/h | 18 | 18 |
|
| primary | | | | | 64 km/h | 64 km/h | 18 | 18 |
|
||||||
| primary | | 3 | | | 64 km/h | 64 km/h | 9 | 9 |
|
| primary | | 3 | | | 64 km/h | 64 km/h | 9 | 9 |
|
||||||
| primary | 60 | | | | 47 km/h | 47 km/h | 13 | 13 |
|
| primary | 60 | | | | 47 km/h | 47 km/h | 13.3 | 13.3 |
|
||||||
| primary | 60 | 3 | | | 47 km/h | 47 km/h | 7 | 7 |
|
| primary | 60 | 3 | | | 47 km/h | 47 km/h | 6.7 | 6.7 |
|
||||||
| primary | | | 60 | | 47 km/h | 64 km/h | 13 | 18 |
|
| primary | | | 60 | | 47 km/h | 64 km/h | 13.3 | 18 |
|
||||||
| primary | | 3 | 60 | | 47 km/h | 64 km/h | 7 | 9 |
|
| primary | | 3 | 60 | | 47 km/h | 64 km/h | 6.7 | 9 |
|
||||||
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13 |
|
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13.3 |
|
||||||
| primary | | 3 | | 60 | 64 km/h | 47 km/h | 9 | 7 |
|
| primary | | 3 | | 60 | 64 km/h | 47 km/h | 9 | 6.7 |
|
||||||
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13 | 3 |
|
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13.3 | 3.3 |
|
||||||
| primary | 15 | 3 | 60 | | 48 km/h | 12 km/h | 7 | 2 |
|
| primary | 15 | 3 | 60 | | 48 km/h | 12 km/h | 6.7 | 1.7 |
|
||||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3 | 13 |
|
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3.3 | 13.3 |
|
||||||
| primary | 15 | 3 | | 60 | 12 km/h | 47 km/h | 2 | 7 |
|
| primary | 15 | 3 | | 60 | 12 km/h | 47 km/h | 1.7 | 6.7 |
|
||||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 7 | 13 |
|
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 6.7 | 13.3 |
|
||||||
| primary | 15 | 3 | 30 | 60 | 23 km/h | 47 km/h | 3 | 7 |
|
| primary | 15 | 3 | 30 | 60 | 23 km/h | 47 km/h | 3.3 | 6.7 |
|
||||||
|
|
||||||
Scenario: Car - Single lane streets be ignored or incur a penalty
|
Scenario: Car - Single lane streets be ignored or incur a penalty
|
||||||
Then routability should be
|
Then routability should be
|
||||||
@@ -107,33 +107,33 @@ OSRM will use 4/5 of the projected free-flow speed.
|
|||||||
| highway | maxspeed | lanes | maxspeed:forward | maxspeed:backward | forw | backw | forw_rate | backw_rate |
|
| highway | maxspeed | lanes | maxspeed:forward | maxspeed:backward | forw | backw | forw_rate | backw_rate |
|
||||||
| primary | | | | | 64 km/h | 64 km/h | 18 | 18 |
|
| primary | | | | | 64 km/h | 64 km/h | 18 | 18 |
|
||||||
| primary | | 1 | | | 64 km/h | 64 km/h | 9 | 9 |
|
| primary | | 1 | | | 64 km/h | 64 km/h | 9 | 9 |
|
||||||
| primary | 60 | | | | 47 km/h | 47 km/h | 13 | 13 |
|
| primary | 60 | | | | 47 km/h | 47 km/h | 13.3 | 13.3 |
|
||||||
| primary | 60 | 1 | | | 47 km/h | 47 km/h | 7 | 7 |
|
| primary | 60 | 1 | | | 47 km/h | 47 km/h | 6.7 | 6.7 |
|
||||||
| primary | | | 60 | | 47 km/h | 64 km/h | 13 | 18 |
|
| primary | | | 60 | | 47 km/h | 64 km/h | 13.3 | 18 |
|
||||||
| primary | | 1 | 60 | | 47 km/h | 64 km/h | 7 | 9 |
|
| primary | | 1 | 60 | | 47 km/h | 64 km/h | 6.7 | 9 |
|
||||||
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13 |
|
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13.3 |
|
||||||
| primary | | 1 | | 60 | 64 km/h | 47 km/h | 9 | 7 |
|
| primary | | 1 | | 60 | 64 km/h | 47 km/h | 9 | 6.7 |
|
||||||
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13 | 3 |
|
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13.3 | 3.3 |
|
||||||
| primary | 15 | 1 | 60 | | 48 km/h | 12 km/h | 7 | 2 |
|
| primary | 15 | 1 | 60 | | 48 km/h | 12 km/h | 6.7 | 1.7 |
|
||||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3 | 13 |
|
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3.3 | 13.3 |
|
||||||
| primary | 15 | 1 | | 60 | 12 km/h | 47 km/h | 2 | 7 |
|
| primary | 15 | 1 | | 60 | 12 km/h | 47 km/h | 1.7 | 6.7 |
|
||||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 7 | 13 |
|
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 6.7 | 13.3 |
|
||||||
| primary | 15 | 1 | 30 | 60 | 23 km/h | 47 km/h | 3 | 7 |
|
| primary | 15 | 1 | 30 | 60 | 23 km/h | 47 km/h | 3.3 | 6.7 |
|
||||||
|
|
||||||
Scenario: Car - Single lane streets only incur a penalty for two-way streets
|
Scenario: Car - Single lane streets only incur a penalty for two-way streets
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | maxspeed | lanes | oneway | forw | backw | forw_rate | backw_rate |
|
| highway | maxspeed | lanes | oneway | forw | backw | forw_rate | backw_rate |
|
||||||
| primary | 30 | 1 | yes | 23 km/h | | 7 | |
|
| primary | 30 | 1 | yes | 23 km/h | | 6.7 | |
|
||||||
| primary | 30 | 1 | -1 | | 23 km/h | | 7 |
|
| primary | 30 | 1 | -1 | | 23 km/h | | 6.7 |
|
||||||
| primary | 30 | 1 | | 23 km/h | 23 km/h | 3 | 3 |
|
| primary | 30 | 1 | | 23 km/h | 23 km/h | 3.3 | 3.3 |
|
||||||
| primary | 30 | 2 | | 23 km/h | 23 km/h | 7 | 7 |
|
| primary | 30 | 2 | | 23 km/h | 23 km/h | 6.7 | 6.7 |
|
||||||
|
|
||||||
Scenario: Car - Forward/backward maxspeed on reverse oneways
|
Scenario: Car - Forward/backward maxspeed on reverse oneways
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | maxspeed | maxspeed:forward | maxspeed:backward | oneway | forw | backw | forw_rate | backw_rate |
|
| highway | maxspeed | maxspeed:forward | maxspeed:backward | oneway | forw | backw | forw_rate | backw_rate |
|
||||||
| primary | | | | -1 | | 64 km/h | | 18 |
|
| primary | | | | -1 | | 64 km/h | | 18 |
|
||||||
| primary | 30 | | | -1 | | 23 km/h | | 7 |
|
| primary | 30 | | | -1 | | 23 km/h | | 6.7 |
|
||||||
| primary | | 30 | | -1 | | 64 km/h | | 18 |
|
| primary | | 30 | | -1 | | 64 km/h | | 18 |
|
||||||
| primary | | | 30 | -1 | | 23 km/h | | 7 |
|
| primary | | | 30 | -1 | | 23 km/h | | 6.7 |
|
||||||
| primary | 20 | 30 | | -1 | | 15 km/h | | 4 |
|
| primary | 20 | 30 | | -1 | | 15 km/h | | 4.4 |
|
||||||
| primary | 20 | | 30 | -1 | | 23 km/h | | 7 |
|
| primary | 20 | | 30 | -1 | | 23 km/h | | 6.7 |
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
@routing @car @mode
|
|
||||||
Feature: Car - Mode flag
|
|
||||||
Background:
|
|
||||||
Given the profile "car"
|
|
||||||
|
|
||||||
Scenario: Car - Mode when using a ferry
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
c d
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway | route | duration |
|
|
||||||
| ab | primary | | |
|
|
||||||
| bc | | ferry | 0:01 |
|
|
||||||
| cd | primary | | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
"""
|
|
||||||
a b c d e f
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway | route | duration |
|
|
||||||
| ab | primary | | |
|
|
||||||
| bcde | | ferry | 0:10 |
|
|
||||||
| ef | primary | | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | modes | time |
|
|
||||||
| c | d | bcde,bcde | ferry,ferry | 600s |
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,22 +5,6 @@ Feature: Car - Street names in instructions
|
|||||||
Given the profile "car"
|
Given the profile "car"
|
||||||
Given a grid size of 5 meters
|
Given a grid size of 5 meters
|
||||||
|
|
||||||
Scenario: Car - A named street
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
c
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name | ref |
|
|
||||||
| ab | My Way | |
|
|
||||||
| bc | Your Way | A1 |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | ref |
|
|
||||||
| a | c | My Way,Your Way | ,A1|
|
|
||||||
|
|
||||||
Scenario: Car - A named street with pronunciation
|
Scenario: Car - A named street with pronunciation
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -506,3 +506,525 @@ Feature: Car - Turn restrictions
|
|||||||
| s | n | sj,nj,nj |
|
| s | n | sj,nj,nj |
|
||||||
| s | e | sj,ej,ej |
|
| s | e | sj,ej,ej |
|
||||||
|
|
||||||
|
@restriction @compression
|
||||||
|
Scenario: Restriction On Compressed Geometry
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
i
|
||||||
|
|
|
||||||
|
f - e
|
||||||
|
| |
|
||||||
|
a - b - c - d
|
||||||
|
|
|
||||||
|
g
|
||||||
|
|
|
||||||
|
h
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| abc |
|
||||||
|
| cde |
|
||||||
|
| efc |
|
||||||
|
| cgh |
|
||||||
|
| ei |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | node:via | way:to | restriction |
|
||||||
|
| restriction | abc | c | cgh | no_right_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | h | abc,cde,efc,cgh,cgh |
|
||||||
|
|
||||||
|
@restriction-way
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | be | de | no_right_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,de,de | depart,turn left,turn right,arrive | c,b,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
@restriction @overlap
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | be | de | no_right_turn |
|
||||||
|
| restriction | bc | be | ef | no_left_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | d | ab,be,ef,ef,de,de |
|
||||||
|
| a | f | ab,be,ef,ef |
|
||||||
|
| c | d | bc,be,de,de |
|
||||||
|
| c | f | bc,be,de,de,ef,ef |
|
||||||
|
|
||||||
|
@restriction-way @overlap
|
||||||
|
Scenario: Two times same way
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
h g
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
a - b - c - - - - - - - - - - - - - - - - - - - f
|
||||||
|
| | \ /
|
||||||
|
i - d - e - - - - - - - - - - - - - - - - -
|
||||||
|
"""
|
||||||
|
# The long distances here are required to make other turns undesriable in comparison to the restricted turns.
|
||||||
|
# Otherwise they might just be picked without the actual turns being restricted
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | oneway |
|
||||||
|
| ab | no |
|
||||||
|
| bc | no |
|
||||||
|
| cd | yes |
|
||||||
|
| ce | yes |
|
||||||
|
| cf | yes |
|
||||||
|
| cg | yes |
|
||||||
|
| bh | no |
|
||||||
|
| fedib | yes |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bc | ce | no_right_turn |
|
||||||
|
| restriction | ab | bc | cd | no_right_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | i | ab,bc,cf,fedib,fedib |
|
||||||
|
|
||||||
|
|
||||||
|
@restriction-way @overlap
|
||||||
|
Scenario: Car - prohibit turn
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a j
|
||||||
|
| |
|
||||||
|
b---i
|
||||||
|
| |
|
||||||
|
c---h
|
||||||
|
| |
|
||||||
|
d---g
|
||||||
|
| |
|
||||||
|
e f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | oneway |
|
||||||
|
| ab | left | yes |
|
||||||
|
| bc | left | yes |
|
||||||
|
| cd | left | yes |
|
||||||
|
| de | left | yes |
|
||||||
|
| fg | right | yes |
|
||||||
|
| gh | right | yes |
|
||||||
|
| hi | right | yes |
|
||||||
|
| ij | right | yes |
|
||||||
|
| dg | first | no |
|
||||||
|
| ch | second | no |
|
||||||
|
| bi | third | no |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bi | ij | no_u_turn |
|
||||||
|
| restriction | bc | ch | hi | no_u_turn |
|
||||||
|
| restriction | fg | dg | de | no_u_turn |
|
||||||
|
| restriction | gh | ch | cd | no_u_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | j | left,first,right,right |
|
||||||
|
| f | e | right,third,left,left |
|
||||||
|
|
||||||
|
@restriction
|
||||||
|
Scenario: Car - allow only turn
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | be | ef | only_left_on |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,de,de | depart,turn left,turn right,arrive | c,b,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
@restriction
|
||||||
|
Scenario: Car - allow only turn
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| be |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | be | ed | only_right_on |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | d | ab,be,de,de |
|
||||||
|
|
||||||
|
@restriction
|
||||||
|
Scenario: Multi Way restriction
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
k j
|
||||||
|
| |
|
||||||
|
h - - g - f - - e
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
a - - b - c - - d
|
||||||
|
| |
|
||||||
|
l i
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | oneway |
|
||||||
|
| ab | horiz | yes |
|
||||||
|
| bc | horiz | yes |
|
||||||
|
| cd | horiz | yes |
|
||||||
|
| ef | horiz | yes |
|
||||||
|
| fg | horiz | yes |
|
||||||
|
| gh | horiz | yes |
|
||||||
|
| ic | vert | yes |
|
||||||
|
| cf | vert | yes |
|
||||||
|
| fj | vert | yes |
|
||||||
|
| kg | vert | yes |
|
||||||
|
| gb | vert | yes |
|
||||||
|
| bl | vert | yes |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bc,cf,fg | gh | no_u_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | h | horiz,vert,horiz,horiz |
|
||||||
|
|
||||||
|
@restriction
|
||||||
|
Scenario: Multi-Way overlapping single-way
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
e
|
||||||
|
|
|
||||||
|
a - b - c - d
|
||||||
|
|
|
||||||
|
f - g
|
||||||
|
|
|
||||||
|
h
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name |
|
||||||
|
| ab | abcd |
|
||||||
|
| bc | abcd |
|
||||||
|
| cd | abcd |
|
||||||
|
| hf | hfb |
|
||||||
|
| fb | hfb |
|
||||||
|
| gf | gf |
|
||||||
|
| ce | ce |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bc | ce | only_left_turn |
|
||||||
|
| restriction | gf | fb,bc | cd | only_u_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | abcd,ce,ce,abcd,abcd | depart,turn left,continue uturn,turn left,arrive | a,c,e,c,d |
|
||||||
|
| a | e | abcd,ce,ce | depart,turn left,arrive | a,c,e |
|
||||||
|
| a | f | abcd,hfb,hfb | depart,turn right,arrive | a,b,f |
|
||||||
|
| g | e | gf,hfb,abcd,ce,ce | depart,turn right,turn right,turn left,arrive | g,f,b,c,e |
|
||||||
|
| g | d | gf,hfb,abcd,abcd | depart,turn right,turn right,arrive | g,f,b,d |
|
||||||
|
| h | e | hfb,abcd,ce,ce | depart,end of road right,turn left,arrive | h,b,c,e |
|
||||||
|
| h | d | hfb,abcd,abcd | depart,end of road right,arrive | h,b,d |
|
||||||
|
|
||||||
|
|
||||||
|
@restriction
|
||||||
|
Scenario: Car - prohibit turn, traffic lights
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
a d
|
||||||
|
| |
|
||||||
|
g i
|
||||||
|
| |
|
||||||
|
h j
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name |
|
||||||
|
| hgab | ab |
|
||||||
|
| bc | bc |
|
||||||
|
| be | be |
|
||||||
|
| jide | de |
|
||||||
|
| ef | ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | hgab | be | jide | no_right_turn |
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| g | traffic_signals |
|
||||||
|
| i | traffic_signals |
|
||||||
|
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | locations |
|
||||||
|
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||||
|
| a | f | ab,be,ef,ef | depart,turn right,turn left,arrive | a,b,e,f |
|
||||||
|
| c | d | bc,be,de,de | depart,turn left,turn right,arrive | c,b,e,d |
|
||||||
|
| c | f | bc,be,ef,ef | depart,turn left,turn left,arrive | c,b,e,f |
|
||||||
|
|
||||||
|
|
||||||
|
@restriction @overlap @geometry
|
||||||
|
Scenario: Geometry
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b-g-e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| bge |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bge | de | no_right_turn |
|
||||||
|
| restriction | bc | bge | ef | no_left_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | d | ab,bge,ef,ef,de,de |
|
||||||
|
| a | f | ab,bge,ef,ef |
|
||||||
|
| c | d | bc,bge,de,de |
|
||||||
|
| c | f | bc,bge,de,de,ef,ef |
|
||||||
|
|
||||||
|
@restriction @overlap @geometry @traffic-signals
|
||||||
|
Scenario: Geometry
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b-g-e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| bge |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| g | traffic_signals |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bge | de | no_right_turn |
|
||||||
|
| restriction | bc | bge | ef | no_left_turn |
|
||||||
|
|
||||||
|
# this case is currently not handling the via-way restrictions and we need support for looking across traffic signals.
|
||||||
|
# It is mainly included to show limitations and to prove that we don't crash hard here
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | d | ab,bge,ef,ef,de,de |
|
||||||
|
| a | f | ab,bge,ef,ef |
|
||||||
|
| c | d | bc,bge,de,de |
|
||||||
|
| c | f | bc,bge,de,de,ef,ef |
|
||||||
|
|
||||||
|
# don't crash hard on invalid restrictions
|
||||||
|
@restriction @invalid
|
||||||
|
Scenario: Geometry
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b---e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | oneway |
|
||||||
|
| ab | |
|
||||||
|
| bc | |
|
||||||
|
| be | yes |
|
||||||
|
| de | |
|
||||||
|
| ef | |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | de | be | ab | no_left_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | f | ab,be,ef,ef |
|
||||||
|
|
||||||
|
|
||||||
|
@restriction @overlap @geometry
|
||||||
|
Scenario: Duplicated restriction
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
|
|
||||||
|
| f
|
||||||
|
| |
|
||||||
|
b-g-e
|
||||||
|
| |
|
||||||
|
| d
|
||||||
|
|
|
||||||
|
a
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| bge |
|
||||||
|
| de |
|
||||||
|
| ef |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:to | node:via | restriction |
|
||||||
|
| restriction | bge | ef | e | no_left_turn |
|
||||||
|
|
||||||
|
And the relations
|
||||||
|
| type | way:from | way:via | way:to | restriction |
|
||||||
|
| restriction | ab | bge | de | no_right_turn |
|
||||||
|
| restriction | bc | bge | ef | no_left_turn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | d | ab,bc,bc,bge,de,de |
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ Feature: Car - Surfaces
|
|||||||
Scenario: Car - Ways tagged service should reduce speed
|
Scenario: Car - Ways tagged service should reduce speed
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | service | forw | backw | forw_rate |
|
| highway | service | forw | backw | forw_rate |
|
||||||
| service | alley | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
| service | alley | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||||
| service | emergency_access | | | |
|
| service | emergency_access | | | |
|
||||||
| service | driveway | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
| service | driveway | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||||
| service | drive-through | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
| service | drive-through | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||||
| service | parking | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
| service | parking | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||||
|
|||||||
@@ -1,18 +1,11 @@
|
|||||||
@routing @testbot @sidebias
|
@routing @testbot @sidebias
|
||||||
Feature: Testbot - side bias
|
Feature: Testbot - side bias
|
||||||
|
|
||||||
Background:
|
Scenario: Left-hand bias
|
||||||
Given the profile file
|
Given the profile file "car" initialized with
|
||||||
"""
|
"""
|
||||||
require 'testbot'
|
profile.left_hand_driving = true
|
||||||
properties.left_hand_driving = true
|
profile.turn_bias = 1/1.075
|
||||||
"""
|
|
||||||
|
|
||||||
Scenario: Left hand bias
|
|
||||||
Given the profile file "car" extended with
|
|
||||||
"""
|
|
||||||
properties.left_hand_driving = true
|
|
||||||
profile.turn_bias = properties.left_hand_driving and 1/1.075 or 1.075
|
|
||||||
"""
|
"""
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@@ -31,11 +24,11 @@ Feature: Testbot - side bias
|
|||||||
| d | a | bd,ab,ab | 24s +-1 |
|
| d | a | bd,ab,ab | 24s +-1 |
|
||||||
| d | c | bd,bc,bc | 27s +-1 |
|
| d | c | bd,bc,bc | 27s +-1 |
|
||||||
|
|
||||||
Scenario: Right hand bias
|
Scenario: Right-hand bias
|
||||||
Given the profile file "car" extended with
|
Given the profile file "car" initialized with
|
||||||
"""
|
"""
|
||||||
properties.left_hand_driving = false
|
profile.left_hand_driving = true
|
||||||
profile.turn_bias = properties.left_hand_driving and 1/1.075 or 1.075
|
profile.turn_bias = 1.075
|
||||||
"""
|
"""
|
||||||
And the node map
|
And the node map
|
||||||
"""
|
"""
|
||||||
@@ -54,27 +47,3 @@ Feature: Testbot - side bias
|
|||||||
| d | a | bd,ab,ab | 27s +-1 |
|
| d | a | bd,ab,ab | 27s +-1 |
|
||||||
# should be inverse of left hand bias
|
# should be inverse of left hand bias
|
||||||
| d | c | bd,bc,bc | 24s +-1 |
|
| d | c | bd,bc,bc | 24s +-1 |
|
||||||
|
|
||||||
Scenario: Roundabout exit counting for left sided driving
|
|
||||||
And a grid size of 10 meters
|
|
||||||
And the node map
|
|
||||||
"""
|
|
||||||
a
|
|
||||||
b
|
|
||||||
h g c d
|
|
||||||
e
|
|
||||||
f
|
|
||||||
"""
|
|
||||||
And the ways
|
|
||||||
| nodes | junction |
|
|
||||||
| ab | |
|
|
||||||
| cd | |
|
|
||||||
| ef | |
|
|
||||||
| gh | |
|
|
||||||
| bcegb | roundabout |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| waypoints | route | turns |
|
|
||||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
|
|
||||||
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
|
||||||
| a,h | ab,gh,gh | depart,roundabout turn right exit-3,arrive |
|
|
||||||
|
|||||||
@@ -50,4 +50,4 @@ Feature: Car - speeds
|
|||||||
Then routability should be
|
Then routability should be
|
||||||
|
|
||||||
| highway | side_road | forw | backw | forw_rate | backw_rate |
|
| highway | side_road | forw | backw | forw_rate | backw_rate |
|
||||||
| primary | yes | 64 km/h | 64 km/h | 14 | 14 |
|
| primary | yes | 64 km/h | 64 km/h | 14.4 | 14.4 |
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
@routing @car @startpoint
|
||||||
|
Feature: Car - Allowed start/end modes
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
|
||||||
|
Scenario: Car - Don't start/stop on ferries
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | route | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bc | | ferry | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,ab | driving,driving |
|
||||||
|
| 2 | 1 | ab,ab | driving,driving |
|
||||||
|
|
||||||
|
Scenario: Car - Don't start/stop on trains
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | railway | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bc | | train | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,ab | driving,driving |
|
||||||
|
| 2 | 1 | ab,ab | driving,driving |
|
||||||
@@ -37,3 +37,57 @@ Feature: Car - Handle traffic lights
|
|||||||
| 3 | 4 | 13.1s | no turn with traffic light |
|
| 3 | 4 | 13.1s | no turn with traffic light |
|
||||||
| g | j | 18.7s | turn with no traffic light |
|
| g | j | 18.7s | turn with no traffic light |
|
||||||
| k | n | 20.7s | turn with traffic light |
|
| k | n | 20.7s | turn with traffic light |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Tarrif Signal Geometry
|
||||||
|
Given the query options
|
||||||
|
| overview | full |
|
||||||
|
| geometries | polyline |
|
||||||
|
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a - b - c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| abc | primary |
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| b | traffic_signals |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | geometry |
|
||||||
|
| a | c | abc,abc | _ibE_ibE?gJ?gJ |
|
||||||
|
|
||||||
|
@traffic
|
||||||
|
Scenario: Traffic update on the edge with a traffic signal
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a - b - c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| abc | primary |
|
||||||
|
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| b | traffic_signals |
|
||||||
|
|
||||||
|
And the contract extra arguments "--segment-speed-file {speeds_file}"
|
||||||
|
And the customize extra arguments "--segment-speed-file {speeds_file}"
|
||||||
|
And the speed file
|
||||||
|
"""
|
||||||
|
1,2,65
|
||||||
|
2,1,65
|
||||||
|
"""
|
||||||
|
And the query options
|
||||||
|
| annotations | datasources,nodes,speed,duration,weight |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | speed | weights | time | distances | a:datasources | a:nodes | a:speed | a:duration | a:weight |
|
||||||
|
| a | c | abc,abc | 59 km/h | 24.2,0 | 24.2s | 399.9m,0m | 1:0 | 1:2:3 | 18:18 | 11.1:11.1 | 11.1:11.1 |
|
||||||
|
| c | a | abc,abc | 59 km/h | 24.2,0 | 24.2s | 399.9m,0m | 0:1 | 3:2:1 | 18:18 | 11.1:11.1 | 11.1:11.1 |
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
@routing @car @weight
|
@routing @car @weight
|
||||||
Feature: Car - weights
|
Feature: Car - weights
|
||||||
|
|
||||||
Background: Use specific speeds
|
|
||||||
Given the profile "car"
|
|
||||||
|
|
||||||
Scenario: Only routes down service road when that's the destination
|
Scenario: Only routes down service road when that's the destination
|
||||||
Given the node map
|
Given the profile "car"
|
||||||
|
And the node map
|
||||||
"""
|
"""
|
||||||
a--b--c
|
a--b--c
|
||||||
|
|
|
|
||||||
@@ -25,7 +23,8 @@ Feature: Car - weights
|
|||||||
| a | d | abc,bdf,bdf | 18 km/h | 71.7 |
|
| a | d | abc,bdf,bdf | 18 km/h | 71.7 |
|
||||||
|
|
||||||
Scenario: Does not jump off the highway to go down service road
|
Scenario: Does not jump off the highway to go down service road
|
||||||
Given the node map
|
Given the profile "car"
|
||||||
|
And the node map
|
||||||
"""
|
"""
|
||||||
a
|
a
|
||||||
|
|
|
|
||||||
@@ -63,10 +62,9 @@ Feature: Car - weights
|
|||||||
| a | e | ab,be,be | 14 km/h | 112 |
|
| a | e | ab,be,be | 14 km/h | 112 |
|
||||||
|
|
||||||
Scenario: Distance weights
|
Scenario: Distance weights
|
||||||
Given the profile file "car" extended with
|
Given the profile file "car" initialized with
|
||||||
"""
|
"""
|
||||||
api_version = 1
|
profile.properties.weight_name = 'distance'
|
||||||
properties.weight_name = 'distance'
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -21,13 +21,7 @@ Feature: Foot - Handle ferry routes
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes |
|
| from | to | route | modes |
|
||||||
| a | g | abc,cde,efg,efg | walking,ferry,walking,walking |
|
| 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 |
|
| 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
|
Scenario: Foot - Ferry duration, single node
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -14,25 +14,9 @@ Feature: Foot - Street names in instructions
|
|||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
| nodes | name | ref |
|
| nodes | name | ref |
|
||||||
| ab | My Way | A6 |
|
| ab | My Way | |
|
||||||
| bc | Your Way | B7 |
|
| bc | | A7 |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route | ref |
|
||||||
| a | c | My Way,Your Way,Your Way |
|
| a | c | My Way,, | ,A7,A7 |
|
||||||
|
|
||||||
@unnamed
|
|
||||||
Scenario: Foot - No longer use way type to describe unnamed ways, see #3231
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b c d
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway | name |
|
|
||||||
| ab | footway | |
|
|
||||||
| bcd | track | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| a | d | , |
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
@routing @foot @ref @name
|
|
||||||
Feature: Foot - Way ref
|
|
||||||
|
|
||||||
Background:
|
|
||||||
Given the profile "foot"
|
|
||||||
|
|
||||||
Scenario: Foot - Way with both name and ref
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name | ref |
|
|
||||||
| ab | Utopia Drive | E7 |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | ref |
|
|
||||||
| a | b | Utopia Drive,Utopia Drive | E7,E7 |
|
|
||||||
|
|
||||||
Scenario: Foot - Way with only ref
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name | ref |
|
|
||||||
| ab | | E7 |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | ref |
|
|
||||||
| a | b | , | E7,E7 |
|
|
||||||
|
|
||||||
Scenario: Foot - Way with only name
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | name |
|
|
||||||
| ab | Utopia Drive |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| a | b | Utopia Drive,Utopia Drive |
|
|
||||||
@@ -32,84 +32,6 @@ Feature: Foot - Turn restrictions
|
|||||||
| s | n | sj,nj,nj |
|
| s | n | sj,nj,nj |
|
||||||
| s | e | sj,ej,ej |
|
| s | e | sj,ej,ej |
|
||||||
|
|
||||||
@no_turning
|
|
||||||
Scenario: Foot - No right turn
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| nj | -1 |
|
|
||||||
| wj | -1 |
|
|
||||||
| ej | -1 |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | ej | j | no_right_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| nj | -1 |
|
|
||||||
| wj | -1 |
|
|
||||||
| ej | -1 |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | wj | j | no_u_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| nj | -1 |
|
|
||||||
| wj | -1 |
|
|
||||||
| ej | -1 |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | wj | j | no_weird_zigzags |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| s | w | sj,wj,wj |
|
|
||||||
| s | n | sj,nj,nj |
|
|
||||||
| s | e | sj,ej,ej |
|
|
||||||
|
|
||||||
@only_turning
|
@only_turning
|
||||||
Scenario: Foot - Only left turn
|
Scenario: Foot - Only left turn
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -136,84 +58,6 @@ Feature: Foot - Turn restrictions
|
|||||||
| s | n | sj,nj,nj |
|
| s | n | sj,nj,nj |
|
||||||
| s | e | sj,ej,ej |
|
| s | e | sj,ej,ej |
|
||||||
|
|
||||||
@only_turning
|
|
||||||
Scenario: Foot - Only right turn
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| nj | -1 |
|
|
||||||
| wj | -1 |
|
|
||||||
| ej | -1 |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | ej | j | only_right_turn |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| nj | -1 |
|
|
||||||
| wj | -1 |
|
|
||||||
| ej | -1 |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | nj | j | only_straight_on |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| 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
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
n
|
|
||||||
w j e
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| nj | -1 |
|
|
||||||
| wj | -1 |
|
|
||||||
| ej | -1 |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction |
|
|
||||||
| restriction | sj | nj | j | only_weird_zigzags |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| s | w | sj,wj,wj |
|
|
||||||
| s | n | sj,nj,nj |
|
|
||||||
| s | e | sj,ej,ej |
|
|
||||||
|
|
||||||
@except
|
@except
|
||||||
Scenario: Foot - Except tag and on no_ restrictions
|
Scenario: Foot - Except tag and on no_ restrictions
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -246,30 +90,6 @@ Feature: Foot - Turn restrictions
|
|||||||
| s | c | sj,cj,cj |
|
| s | c | sj,cj,cj |
|
||||||
| s | d | sj,dj,dj |
|
| s | d | sj,dj,dj |
|
||||||
|
|
||||||
@except
|
|
||||||
Scenario: Foot - Except tag and on only_ restrictions
|
|
||||||
Given the node map
|
|
||||||
"""
|
|
||||||
a b
|
|
||||||
j
|
|
||||||
s
|
|
||||||
"""
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | oneway |
|
|
||||||
| sj | yes |
|
|
||||||
| aj | no |
|
|
||||||
| bj | no |
|
|
||||||
|
|
||||||
And the relations
|
|
||||||
| type | way:from | way:to | node:via | restriction | except |
|
|
||||||
| restriction | sj | aj | j | only_straight_on | foot |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route |
|
|
||||||
| s | a | sj,aj,aj |
|
|
||||||
| s | b | sj,bj,bj |
|
|
||||||
|
|
||||||
@except
|
@except
|
||||||
Scenario: Foot - Multiple except tag values
|
Scenario: Foot - Multiple except tag values
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
@routing @foot @roundabout @instruction
|
@routing @foot @roundabout @instruction @todo
|
||||||
Feature: Roundabout Instructions
|
Feature: Roundabout Instructions
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the profile "foot"
|
Given the profile "foot"
|
||||||
|
|
||||||
@todo
|
|
||||||
Scenario: Foot - Roundabout instructions
|
Scenario: Foot - Roundabout instructions
|
||||||
# You can walk in both directions on a roundabout, bu the normal roundabout instructions don't
|
# 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.
|
# make sense when you're going the opposite way around the roundabout.
|
||||||
@@ -27,7 +26,7 @@ Feature: Roundabout Instructions
|
|||||||
| abcda | roundabout |
|
| abcda | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | turns |
|
| from | to | route | turns |
|
||||||
| s | t | sa,tb | depart,roundabout-exit-1,arrive |
|
| s | t | sa,tb | depart,roundabout-exit-1,arrive |
|
||||||
| s | u | sa,uc | depart,roundabout-exit-2,arrive |
|
| s | u | sa,uc | depart,roundabout-exit-2,arrive |
|
||||||
| s | v | sa,vd | depart,roundabout-exit-3,arrive |
|
| s | v | sa,vd | depart,roundabout-exit-3,arrive |
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
@routing @foot @startpoint
|
||||||
|
Feature: Foot - Allowed start/end modes
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "foot"
|
||||||
|
|
||||||
|
Scenario: Foot - Don't start/stop on ferries
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | route | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bc | | ferry | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,ab | walking,walking |
|
||||||
|
| 2 | 1 | ab,ab | walking,walking |
|
||||||
|
|
||||||
|
Scenario: Foot - Don't start/stop on trains
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a 1 b 2 c
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | railway | bicycle |
|
||||||
|
| ab | primary | | |
|
||||||
|
| bc | | train | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| 1 | 2 | ab,ab | walking,walking |
|
||||||
|
| 2 | 1 | ab,ab | walking,walking |
|
||||||
@@ -35,10 +35,10 @@ Feature: Turn Lane Guidance
|
|||||||
| restriction | bc | cd | c | no_right_turn |
|
| restriction | bc | cd | c | no_right_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false, |
|
| a,e | in,cross,cross | depart,turn left,arrive | ;,left:true straight:false, |
|
||||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true, |
|
| a,g | in,straight,straight | depart,new name straight,arrive | ;,left:false straight:true, |
|
||||||
| a,f | in,cross,cross | depart,continue right,arrive | ,, |
|
| a,f | in,cross,cross | depart,continue right,arrive | ,;right:true, |
|
||||||
|
|
||||||
@sliproads
|
@sliproads
|
||||||
Scenario: Separate Turn Lanes
|
Scenario: Separate Turn Lanes
|
||||||
@@ -68,10 +68,10 @@ Feature: Turn Lane Guidance
|
|||||||
| restriction | bc | cd | c | no_right_turn |
|
| restriction | bc | cd | c | no_right_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
| a,e | in,cross,cross | depart,turn left,arrive | ;,left:true straight:false right:false, |
|
||||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
| a,g | in,straight,straight | depart,new name straight,arrive | ;,left:false straight:true right:false, |
|
||||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true;left:false straight:false right:true, |
|
||||||
|
|
||||||
|
|
||||||
@sliproads
|
@sliproads
|
||||||
@@ -109,12 +109,12 @@ Feature: Turn Lane Guidance
|
|||||||
| restriction | bc | cd | c | no_right_turn |
|
| restriction | bc | cd | c | no_right_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
| a,e | in,cross,cross | depart,turn left,arrive | ;,left:true straight:false right:false, |
|
||||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
| a,g | in,straight,straight | depart,new name straight,arrive | ;,left:false straight:true right:false, |
|
||||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true;left:false straight:false right:true, |
|
||||||
| a,j | in,turn,other,other | depart,turn right,turn left,arrive | ,,left:true right:false, |
|
| a,j | in,turn,other,other | depart,turn right,turn left,arrive | ,,left:true right:false, |
|
||||||
| a,i | in,turn,other,other | depart,turn right,turn right,arrive | ,,left:false right:true, |
|
| a,i | in,turn,other,other | depart,turn right,turn right,arrive | ,,left:false right:true, |
|
||||||
|
|
||||||
|
|
||||||
@todo @2654 @none
|
@todo @2654 @none
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Feature: Turn Lane Guidance
|
|||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the profile "car"
|
Given the profile "car"
|
||||||
Given a grid size of 20 meters
|
Given a grid size of 100 meters
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lane Change for subsequent multi-lane intersections
|
Scenario: Anticipate Lane Change for subsequent multi-lane intersections
|
||||||
@@ -52,9 +52,9 @@ Feature: Turn Lane Guidance
|
|||||||
| dy | | | YSt |
|
| dy | | | YSt |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | MySt,MySt,MySt,MySt | depart,continue right,turn right,arrive | ,straight:false right:false right:true,left:false right:true, |
|
| a,e | MySt,MySt,MySt,MySt | depart,continue right,continue right,arrive | ,straight:false right:false right:true,left:false right:true, |
|
||||||
| e,a | MySt,MySt,MySt,MySt | depart,continue left,turn left,arrive | ,left:true left:false straight:false,left:true right:false, |
|
| e,a | MySt,MySt,MySt,MySt | depart,continue left,continue left,arrive | ,left:true left:false straight:false,left:true right:false, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lane Change for quick same direction turns, changing between streets
|
Scenario: Anticipate Lane Change for quick same direction turns, changing between streets
|
||||||
@@ -151,9 +151,9 @@ Feature: Turn Lane Guidance
|
|||||||
| cj | | 1 | motorway_link | yes | xbcj |
|
| cj | | 1 | motorway_link | yes | xbcj |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,i | ab,ci,ci | depart,turn slight right,arrive | ,none:false slight right:true, |
|
| a,i | ab,ci,ci | depart,turn slight right,arrive | ;,none:false slight right:true, |
|
||||||
| a,j | ab,xbcj | depart,arrive | , |
|
| a,j | ab,xbcj | depart,arrive | ;;none:true slight right:false, |
|
||||||
|
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
@@ -308,8 +308,8 @@ Feature: Turn Lane Guidance
|
|||||||
| di | | off | | yes |
|
| di | | off | | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | destinations | lanes | locations |
|
| waypoints | route | turns | destinations | locations | lanes |
|
||||||
| a,e | main,main,main | depart,use lane straight,arrive | One,Two,Three | ,left:false straight:false straight:true straight:false right:false, | a,c,e |
|
| a,e | main,main | depart,arrive | One,Three | a,e | ;left:false straight:false straight:true straight:false right:false;left:false straight:true right:false, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lanes for through and collapse multiple use lanes
|
Scenario: Anticipate Lanes for through and collapse multiple use lanes
|
||||||
@@ -335,9 +335,9 @@ Feature: Turn Lane Guidance
|
|||||||
| dj | | off |
|
| dj | | off |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,c | main,main | depart,arrive | , |
|
| a,c | main,main | depart,arrive | ;left:false straight:true straight:true right:false, |
|
||||||
| a,d | main,main | depart,arrive | , |
|
| a,d | main,main | depart,arrive | ;left:false straight:true straight:true right:false;left:false straight:true straight:true right:false, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lanes for through followed by left/right
|
Scenario: Anticipate Lanes for through followed by left/right
|
||||||
@@ -363,17 +363,17 @@ Feature: Turn Lane Guidance
|
|||||||
| ci | | off |
|
| ci | | off |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | main,main,main,left,left | depart,use lane straight,use lane straight,turn left,arrive | ,left:false straight:false straight:true straight:false straight:false right:false,left:false straight:true straight:false right:false,left:true right:false, |
|
| a,d | main,left,left | depart,end of road left,arrive | ;left:false straight:false straight:true straight:false straight:false right:false;left:false straight:true straight:false right:false,left:true right:false, |
|
||||||
| a,e | main,main,main,right,right | depart,use lane straight,use lane straight,turn right,arrive | ,left:false straight:false straight:false straight:true straight:false right:false,left:false straight:false straight:true right:false,left:false right:true, |
|
| a,e | main,right,right | depart,end of road right,arrive | ;left:false straight:false straight:false straight:true straight:false right:false;left:false straight:false straight:true right:false,left:false right:true, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lanes for through with turn before / after
|
Scenario: Anticipate Lanes for through with turn before / after
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
c g l
|
c g l
|
||||||
b – d – e – h - i
|
b d e h i
|
||||||
a f j
|
a f j
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
@@ -390,15 +390,15 @@ Feature: Turn Lane Guidance
|
|||||||
| il | | il | |
|
| il | | il | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes | # |
|
| waypoints | route | turns | lanes | # |
|
||||||
| a,f | ab,bdehi,ef,ef | depart,turn right,turn right,arrive | ,right:false right:false right:true right:true,left:false left:false straight:false straight:false straight:false straight:false right:true right:true, | |
|
| a,f | ab,bdehi,ef,ef | depart,turn right,turn right,arrive | ,right:false right:false right:true right:true,left:false left:false straight:false straight:false straight:false straight:false right:true right:true, | |
|
||||||
| a,g | ab,bdehi,eg,eg | depart,turn right,turn left,arrive | ,right:true right:true right:false right:false,left:true left:true straight:false straight:false straight:false straight:false right:false right:false, | |
|
| a,g | ab,bdehi,eg,eg | depart,turn right,turn left,arrive | ,right:true right:true right:false right:false,left:true left:true straight:false straight:false straight:false straight:false right:false right:false, | |
|
||||||
| a,j | ab,bdehi,bdehi,ij,ij | depart,turn right,use lane straight,turn right,arrive | ,right:true right:true right:false right:false,left:false left:false straight:false straight:false straight:true straight:true right:false right:false,left:false left:false right:true right:true, | |
|
| a,j | ab,bdehi,ij,ij | depart,turn right,end of road right,arrive | ,right:true right:true right:false right:false;left:false left:false straight:false straight:false straight:true straight:true right:false right:false,left:false left:false right:true right:true, | |
|
||||||
| a,l | ab,bdehi,bdehi,il,il | depart,turn right,use lane straight,turn left,arrive | ,right:false right:false right:true right:true,left:false left:false straight:true straight:true straight:false straight:false right:false right:false,left:true left:true right:false right:false, | not perfect |
|
| a,l | ab,bdehi,il,il | depart,turn right,end of road left,arrive | ,right:false right:false right:true right:true;left:false left:false straight:true straight:true straight:false straight:false right:false right:false,left:true left:true right:false right:false, | not perfect |
|
||||||
| c,g | cb,bdehi,eg,eg | depart,turn left,turn left,arrive | ,left:true left:true left:false left:false,left:true left:true straight:false straight:false straight:false straight:false right:false right:false, | |
|
| c,g | cb,bdehi,eg,eg | depart,turn left,turn left,arrive | ,left:true left:true left:false left:false,left:true left:true straight:false straight:false straight:false straight:false right:false right:false, | |
|
||||||
| c,f | cb,bdehi,ef,ef | depart,turn left,turn right,arrive | ,left:false left:false left:true left:true,left:false left:false straight:false straight:false straight:false straight:false right:true right:true, | |
|
| c,f | cb,bdehi,ef,ef | depart,turn left,turn right,arrive | ,left:false left:false left:true left:true,left:false left:false straight:false straight:false straight:false straight:false right:true right:true, | |
|
||||||
| c,l | cb,bdehi,bdehi,il,il | depart,turn left,use lane straight,turn left,arrive | ,left:false left:false left:true left:true,left:false left:false straight:true straight:true straight:false straight:false right:false right:false,left:true left:true right:false right:false, | |
|
| c,l | cb,bdehi,il,il | depart,turn left,end of road left,arrive | ,left:false left:false left:true left:true;left:false left:false straight:true straight:true straight:false straight:false right:false right:false,left:true left:true right:false right:false, | |
|
||||||
| c,j | cb,bdehi,bdehi,ij,ij | depart,turn left,use lane straight,turn right,arrive | ,left:true left:true left:false left:false,left:false left:false straight:false straight:false straight:true straight:true right:false right:false,left:false left:false right:true right:true, | not perfect |
|
| c,j | cb,bdehi,ij,ij | depart,turn left,end of road right,arrive | ,left:true left:true left:false left:false;left:false left:false straight:false straight:false straight:true straight:true right:false right:false,left:false left:false right:true right:true, | not perfect |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lanes for turns with through before and after
|
Scenario: Anticipate Lanes for turns with through before and after
|
||||||
@@ -431,11 +431,11 @@ Feature: Turn Lane Guidance
|
|||||||
| jk | | bot | primary | yes |
|
| jk | | bot | primary | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,i | top,main,main,top,top | depart,turn right,use lane straight,turn left,arrive | ,straight:false right:false right:true right:true,left:false straight:true straight:true straight:false straight:false right:false,left:true left:true right:false right:false, |
|
| a,i | top,main,top,top | depart,turn right,turn left,arrive | ,straight:false right:true right:true right:true;;left:false straight:true straight:true straight:false straight:false right:false,left:true left:true right:false right:false, |
|
||||||
| a,k | top,main,main,bot,bot | depart,turn right,use lane straight,turn right,arrive | ,straight:false right:true right:true right:false,left:false straight:false straight:false straight:true straight:true right:false,left:false left:false right:true right:true, |
|
| a,k | top,main,bot,bot | depart,turn right,turn right,arrive | ,straight:false right:true right:true right:true;;left:false straight:false straight:false straight:true straight:true right:false,left:false left:false right:true right:true, |
|
||||||
| c,i | bot,main,main,top,top | depart,turn left,use lane straight,turn left,arrive | ,left:false left:true left:true straight:false,left:false straight:true straight:true straight:false straight:false right:false,left:true left:true right:false right:false, |
|
| c,i | bot,main,top,top | depart,turn left,turn left,arrive | ,left:true left:true left:true straight:false;;left:false straight:true straight:true straight:false straight:false right:false,left:true left:true right:false right:false, |
|
||||||
| c,k | bot,main,main,bot,bot | depart,turn left,use lane straight,turn right,arrive | ,left:true left:true left:false straight:false,left:false straight:false straight:false straight:true straight:true right:false,left:false left:false right:true right:true, |
|
| c,k | bot,main,bot,bot | depart,turn left,turn right,arrive | ,left:true left:true left:true straight:false;;left:false straight:false straight:false straight:true straight:true right:false,left:false left:false right:true right:true, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Anticipate Lanes for turn between throughs
|
Scenario: Anticipate Lanes for turn between throughs
|
||||||
@@ -462,8 +462,8 @@ Feature: Turn Lane Guidance
|
|||||||
| dt | | off |
|
| dt | | off |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | main,main,main,main | depart,use lane straight,continue right,arrive | ,left:false straight:false straight:false straight:false straight:true straight:true right:false,straight:false straight:false right:false right:true right:true, |
|
| a,e | main,main,main | depart,continue right,arrive | ;left:false straight:false straight:false straight:false straight:true straight:true right:false,straight:false straight:false right:false right:true right:true;left:false straight:true straight:true, |
|
||||||
|
|
||||||
@anticipate @todo @2661
|
@anticipate @todo @2661
|
||||||
Scenario: Anticipate with lanes in roundabout: roundabouts as the unit of anticipation
|
Scenario: Anticipate with lanes in roundabout: roundabouts as the unit of anticipation
|
||||||
@@ -520,8 +520,8 @@ Feature: Turn Lane Guidance
|
|||||||
| df | | primary | |
|
| df | | primary | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes | intersection_lanes |
|
||||||
| a,f | ab,df,df | depart,roundabout-exit-1,use lane slight right,arrive | ,,slight left:false slight left:false slight right:true, |
|
| a,f | ab,df,df | depart,roundabout-exit-1,arrive | ,, | |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: No Lanes for Roundabouts, see #2626
|
Scenario: No Lanes for Roundabouts, see #2626
|
||||||
@@ -553,8 +553,8 @@ Feature: Turn Lane Guidance
|
|||||||
| fy | | primary | |
|
| fy | | primary | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,h | ab,gh,gh | depart,roundabout-exit-5,arrive | ,, |
|
| a,h | ab,gh,gh,gh | depart,roundabout-exit-5,exit roundabout right,arrive | ,;;;;,, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: No Lanes for Roundabouts, see #2626
|
Scenario: No Lanes for Roundabouts, see #2626
|
||||||
@@ -569,22 +569,22 @@ Feature: Turn Lane Guidance
|
|||||||
| nodes | turn:lanes:forward | highway | junction | name |
|
| nodes | turn:lanes:forward | highway | junction | name |
|
||||||
| xb | slight_right\|slight_right | primary | | xb |
|
| xb | slight_right\|slight_right | primary | | xb |
|
||||||
| dy | | primary | | dy |
|
| dy | | primary | | dy |
|
||||||
| ab | | primary | roundabout | roundabout |
|
| ab | | primary | roundabout | rotary |
|
||||||
| bc | | primary | roundabout | roundabout |
|
| bc | | primary | roundabout | rotary |
|
||||||
| cd | left\|slight_right | primary | roundabout | roundabout |
|
| cd | left\|slight_right | primary | roundabout | rotary |
|
||||||
| da | | primary | roundabout | roundabout |
|
| da | | primary | roundabout | rotary |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,, |
|
| x,y | xb,dy,dy,dy | depart,rotary-exit-1,exit rotary right,arrive | ,,, |
|
||||||
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
| x,c | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,, |
|
||||||
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
| x,a | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,;, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: No Lanes for Roundabouts, see #2626
|
Scenario: No Lanes for Roundabouts, see #2626
|
||||||
Given the profile file "car" extended with
|
Given the profile file "car" initialized with
|
||||||
"""
|
"""
|
||||||
properties.left_hand_driving = true
|
profile.left_hand_driving = true
|
||||||
"""
|
"""
|
||||||
And the node map
|
And the node map
|
||||||
"""
|
"""
|
||||||
@@ -614,8 +614,8 @@ Feature: Turn Lane Guidance
|
|||||||
| fy | | primary | |
|
| fy | | primary | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,h | ab,ch,ch | depart,roundabout-exit-5,arrive | ,, |
|
| a,h | ab,ch,ch,ch | depart,roundabout-exit-5,exit roundabout left,arrive | ,;;;;,, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: No Lanes for Roundabouts, see #2626
|
Scenario: No Lanes for Roundabouts, see #2626
|
||||||
@@ -623,40 +623,11 @@ Feature: Turn Lane Guidance
|
|||||||
"""
|
"""
|
||||||
/a\
|
/a\
|
||||||
x – b d – y
|
x – b d – y
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
| |
|
\ /
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
| |
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
c
|
c
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -664,16 +635,16 @@ Feature: Turn Lane Guidance
|
|||||||
| nodes | turn:lanes:forward | highway | junction | name |
|
| nodes | turn:lanes:forward | highway | junction | name |
|
||||||
| xb | slight_right\|slight_right | primary | | xb |
|
| xb | slight_right\|slight_right | primary | | xb |
|
||||||
| dy | | primary | | dy |
|
| dy | | primary | | dy |
|
||||||
| ab | | primary | roundabout | roundabout |
|
| ab | | primary | roundabout | rotary |
|
||||||
| bc | | primary | roundabout | roundabout |
|
| bc | | primary | roundabout | rotary |
|
||||||
| cd | left\|slight_right | primary | roundabout | roundabout |
|
| cd | left\|slight_right | primary | roundabout | rotary |
|
||||||
| da | | primary | roundabout | roundabout |
|
| da | | primary | roundabout | rotary |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,, |
|
| x,y | xb,dy,dy,dy | depart,rotary-exit-1,exit rotary right,arrive | ,,, |
|
||||||
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
| x,c | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,, |
|
||||||
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
| x,a | xb,rotary,rotary | depart,rotary-exit-undefined,arrive | ,;, |
|
||||||
|
|
||||||
@anticipate @todo @2032
|
@anticipate @todo @2032
|
||||||
Scenario: No Lanes for Roundabouts, see #2626
|
Scenario: No Lanes for Roundabouts, see #2626
|
||||||
@@ -789,13 +760,6 @@ Feature: Turn Lane Guidance
|
|||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
a – b – x
|
a – b – x
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
@@ -816,18 +780,16 @@ Feature: Turn Lane Guidance
|
|||||||
| dy | | YSt |
|
| dy | | YSt |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | MySt,MySt,MySt,MySt | depart,continue right,turn right,arrive | ,straight:false straight:false right:false right:true,left:false right:true, |
|
| a,e | MySt,MySt,MySt,MySt | depart,continue right,continue right,arrive | ,straight:false straight:false right:false right:true,left:false right:true, |
|
||||||
|
|
||||||
@anticipate
|
@anticipate
|
||||||
Scenario: Don't Overdo It
|
Scenario: Don't Overdo It
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
q r s t u v
|
q r s t u v
|
||||||
| | | | | |
|
a - - b - - c - - d - - e - - f - g - h - i
|
||||||
a - - - - - - - - - - b - - - - - - - - - - c - - - - - - - - - - d - - - - - - - - - - e - - - - - - - - - - f - - - - - - - - - - g - h - i
|
p o n m l k j
|
||||||
| | | | | | |
|
|
||||||
p o n m l k j
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
@@ -849,6 +811,35 @@ Feature: Turn Lane Guidance
|
|||||||
| hj | 7th | | no |
|
| hj | 7th | | no |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations | lanes |
|
| waypoints | route | turns | locations | lanes |
|
||||||
| a,i | road,road,road | depart,use lane straight,arrive | a,g,i | ,left:false none:true none:true none:false, |
|
| a,i | road,road | depart,arrive | a,i | ;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:true none:true none:false;none:true none:true right:false, |
|
||||||
| a,j | road,road,7th,7th | depart,use lane straight,turn right,arrive | a,f,h,j | ,left:false none:false none:false none:true,none:false none:false right:true, |
|
| a,j | road,7th,7th | depart,turn right,arrive | a,h,j | ;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:true none:true none:true;left:false none:false none:false none:true;left:false none:false none:false none:true,none:false none:false right:true, |
|
||||||
|
|
||||||
|
@anticipate
|
||||||
|
Scenario: Oak St, Franklin St
|
||||||
|
Given a grid size of 10 meters
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
g
|
||||||
|
. . f
|
||||||
|
. d `
|
||||||
|
e ` .
|
||||||
|
.
|
||||||
|
.
|
||||||
|
. . c
|
||||||
|
. b `
|
||||||
|
a `
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | turn:lanes | oneway | highway |
|
||||||
|
| ab | Oak St | left\|left\|left | yes | secondary |
|
||||||
|
| cb | Oak St | right | yes | tertiary |
|
||||||
|
| bd | Franklin St | left;through\|through\|through;right\|right | yes | secondary |
|
||||||
|
| dg | Franklin St | | yes | secondary |
|
||||||
|
| edf | Fell St | | | secondary |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | lanes |
|
||||||
|
| a,f | Oak St,Franklin St,Fell St,Fell St | depart,turn left,turn right,arrive | ,left:false left:true left:true,straight;left:false straight:false straight;right:true right:true, |
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
@routing @guidance
|
@routing @guidance
|
||||||
Feature: Rotary
|
Feature: Circular
|
||||||
|
|
||||||
|
# Circular tags are treated just as rotaries. We can rely on the rotary tests for their handling on special cases.
|
||||||
|
# Here we only ensure that the `circular` tag is handled and assigned a rotary type
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the profile "car"
|
Given the profile "car"
|
||||||
@@ -24,259 +27,16 @@ Feature: Rotary
|
|||||||
| bgecb | circular |
|
| bgecb | circular |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,bgecb-exit-3,arrive |
|
| a,d | ab,cd,cd,cd | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| a,f | ab,ef,ef | depart,bgecb-exit-2,arrive |
|
| a,f | ab,ef,ef,ef | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| a,h | ab,gh,gh | depart,bgecb-exit-1,arrive |
|
| a,h | ab,gh,gh,gh | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
| d,f | cd,ef,ef | depart,bgecb-exit-3,arrive |
|
| d,f | cd,ef,ef,ef | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| d,h | cd,gh,gh | depart,bgecb-exit-2,arrive |
|
| d,h | cd,gh,gh,gh | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| d,a | cd,ab,ab | depart,bgecb-exit-1,arrive |
|
| d,a | cd,ab,ab,ab | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
| f,h | ef,gh,gh | depart,bgecb-exit-3,arrive |
|
| f,h | ef,gh,gh,gh | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| f,a | ef,ab,ab | depart,bgecb-exit-2,arrive |
|
| f,a | ef,ab,ab,ab | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| f,d | ef,cd,cd | depart,bgecb-exit-1,arrive |
|
| f,d | ef,cd,cd,cd | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
| h,a | gh,ab,ab | depart,bgecb-exit-3,arrive |
|
| h,a | gh,ab,ab,ab | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| h,d | gh,cd,cd | depart,bgecb-exit-2,arrive |
|
| h,d | gh,cd,cd,cd | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| h,f | gh,ef,ef | depart,bgecb-exit-1,arrive |
|
| h,f | gh,ef,ef,ef | depart,bgecb-exit-1,exit rotary right,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 | circular |
|
|
||||||
|
|
||||||
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 | circular |
|
|
||||||
|
|
||||||
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 | circular |
|
|
||||||
|
|
||||||
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 | circular | 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 | circular |
|
|
||||||
| 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 |
|
|
||||||
| ad | |
|
|
||||||
| bcdb | circular |
|
|
||||||
| be | |
|
|
||||||
| cf | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| waypoints | route | turns |
|
|
||||||
| a,e | ad,be,be | depart,bcdb-exit-1,arrive |
|
|
||||||
| a,f | ad,cf,cf | 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 |
|
|
||||||
| ac | |
|
|
||||||
| bcdb | circular |
|
|
||||||
| de | |
|
|
||||||
| bf | |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| waypoints | route | turns |
|
|
||||||
| a,e | ac,de,de | depart,bcdb-exit-1,arrive |
|
|
||||||
| a,f | ac,bf,bf | 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 | circular |
|
|
||||||
| 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 | circular |
|
|
||||||
| 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 |
|
|
||||||
|
|||||||
@@ -628,9 +628,9 @@ Feature: Collapse
|
|||||||
| cf | secondary | bottom |
|
| cf | secondary | bottom |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | turns | route | locations |
|
| waypoints | turns | route | locations |
|
||||||
| a,d | depart,continue right,turn right,arrive | road,road,road,road | a,b,c,d |
|
| a,d | depart,continue right,continue right,arrive | road,road,road,road | a,b,c,d |
|
||||||
| d,a | depart,continue left,turn left,arrive | road,road,road,road | d,c,b,a |
|
| d,a | depart,continue left,continue left,arrive | road,road,road,road | d,c,b,a |
|
||||||
|
|
||||||
Scenario: Forking before a turn
|
Scenario: Forking before a turn
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -807,8 +807,8 @@ Feature: Collapse
|
|||||||
| di | | off |
|
| di | | off |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations | lanes |
|
||||||
| a,e | main,main,main | depart,use lane straight,arrive | a,c,e |
|
| a,e | main,main | depart,arrive | a,e | ;left:false straight:false straight:true straight:false right:false;left:false straight:true right:false, |
|
||||||
|
|
||||||
Scenario: But _do_ collapse UseLane step when lanes stay the same
|
Scenario: But _do_ collapse UseLane step when lanes stay the same
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -136,3 +136,24 @@ Feature: Continue Instructions
|
|||||||
| a,d | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
| a,d | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
||||||
# continuing right here, since the turn to the left is more expensive
|
# continuing right here, since the turn to the left is more expensive
|
||||||
| a,e | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
| a,e | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
||||||
|
|
||||||
|
Scenario: End-Of-Road Continue
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a - b - c
|
||||||
|
|
|
||||||
|
d - e
|
||||||
|
|
|
||||||
|
f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name |
|
||||||
|
| abc | primary | road |
|
||||||
|
| bdf | primary | road |
|
||||||
|
| ed | primary | turn |
|
||||||
|
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| e,a | turn,road,road,road | depart,turn right,continue left,arrive |
|
||||||
|
|||||||
@@ -863,8 +863,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
|||||||
| af | primary | sliproad | yes |
|
| af | primary | sliproad | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| s,g | main,sliproad,another,another | depart,turn right,turn left,arrive | s,a,f,g |
|
| s,g | main,sliproad,another,another | depart,turn right,turn slight left,arrive | s,a,f,g |
|
||||||
|
|
||||||
@sliproads:
|
@sliproads:
|
||||||
Scenario: Throughabout-Sliproad
|
Scenario: Throughabout-Sliproad
|
||||||
@@ -905,8 +905,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
|||||||
| restriction | yb | be | b | only_straight |
|
| restriction | yb | be | b | only_straight |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| z,t | through,,out,out | depart,off ramp slight right,round-exit-3,arrive | z,s,c,t |
|
| z,t | through,,out,out,out | depart,off ramp slight right,round-exit-3,exit rotary right,arrive | z,s,c,e,t |
|
||||||
|
|
||||||
Scenario: Sliproad before a roundabout
|
Scenario: Sliproad before a roundabout
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -942,5 +942,57 @@ Feature: Slipways and Dedicated Turn Lanes
|
|||||||
| restriction | bc | cd | c | only_straight |
|
| restriction | bc | cd | c | only_straight |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | locations |
|
| waypoints | route | turns | locations |
|
||||||
| a,k | road,,, | depart,turn right,roundabout turn right exit-1,arrive | a,b,h,k |
|
| a,k | road,,, | depart,turn right,roundabout turn right exit-1,arrive | a,b,h,k |
|
||||||
|
|
||||||
|
@sliproads
|
||||||
|
Scenario: Sliproad with 4 roads at target
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
d
|
||||||
|
.
|
||||||
|
s . a . b . c . t
|
||||||
|
` . '
|
||||||
|
` . '
|
||||||
|
'.'
|
||||||
|
e
|
||||||
|
.
|
||||||
|
f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | oneway |
|
||||||
|
| sabct | primary | sabct | |
|
||||||
|
| dbef | primary | dbef | |
|
||||||
|
| ae | primary_link | ae | yes |
|
||||||
|
| ec | primary_link | ec | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | locations |
|
||||||
|
| s,f | sabct,dbef,dbef | depart,turn right,arrive | s,a,f |
|
||||||
|
| f,t | dbef,sabct,sabct | depart,turn right,arrive | f,e,t |
|
||||||
|
|
||||||
|
@sliproads
|
||||||
|
Scenario: Sliproad and acute angle (50°) at the main intersection
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
d
|
||||||
|
/
|
||||||
|
s . a . . b . c
|
||||||
|
` /
|
||||||
|
' /
|
||||||
|
e
|
||||||
|
/
|
||||||
|
f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | oneway |
|
||||||
|
| sabc | primary | sabc | |
|
||||||
|
| dbef | primary | dbef | |
|
||||||
|
| ae | primary_link | ae | yes |
|
||||||
|
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | locations |
|
||||||
|
| s,f | sabc,dbef,dbef | depart,turn right,arrive | s,a,f |
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
@routing @guidance
|
||||||
|
Feature: Divided road entry
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
Given a grid size of 5 meters
|
||||||
|
|
||||||
|
Scenario: Join on a divided road named after the main road
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a-------b-----c
|
||||||
|
|
|
||||||
|
d-------e-----f
|
||||||
|
|
|
||||||
|
|
|
||||||
|
g
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | highway | oneway |
|
||||||
|
| abc | main st | residential | -1 |
|
||||||
|
| def | main st | residential | yes |
|
||||||
|
| be | main st | residential | |
|
||||||
|
| eg | side st | residential | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| g,a | side st,main st,main st| depart,end of road left,arrive |
|
||||||
|
|
||||||
|
|
||||||
|
# Similar to previous one, but the joining way is tagged with the side-street name
|
||||||
|
Scenario: Join on a divided road, named after the side street
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a-------b-----c
|
||||||
|
|
|
||||||
|
d-------e-----f
|
||||||
|
|
|
||||||
|
|
|
||||||
|
g
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | highway | oneway |
|
||||||
|
| abc | main st | residential | -1 |
|
||||||
|
| def | main st | residential | yes |
|
||||||
|
| beg | side st | residential | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| g,a | side st,main st,main st| depart,end of road left,arrive |
|
||||||
|
|
||||||
|
|
||||||
|
# Center join named after crossroad
|
||||||
|
Scenario: Crossing a divided road, named after side-street
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
h
|
||||||
|
|
|
||||||
|
a-------b-----c
|
||||||
|
|
|
||||||
|
d-------e-----f
|
||||||
|
|
|
||||||
|
|
|
||||||
|
g
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | highway | oneway |
|
||||||
|
| abc | main st | residential | -1 |
|
||||||
|
| def | main st | residential | yes |
|
||||||
|
| hbeg | side st | residential | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| g,a | side st,main st,main st| depart,turn left,arrive |
|
||||||
|
|
||||||
|
# Join named after divided road
|
||||||
|
Scenario: Crossing a divided road, named after main street
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
h
|
||||||
|
|
|
||||||
|
a-------b-----c
|
||||||
|
|
|
||||||
|
d-------e-----f
|
||||||
|
|
|
||||||
|
|
|
||||||
|
g
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | highway | oneway |
|
||||||
|
| abc | main st | residential | -1 |
|
||||||
|
| def | main st | residential | yes |
|
||||||
|
| be | main st | residential | |
|
||||||
|
| hb | side st | residential | |
|
||||||
|
| eg | side st | residential | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| g,a | side st,main st,main st| depart,turn left,arrive |
|
||||||
@@ -24,6 +24,25 @@ Feature: End Of Road Instructions
|
|||||||
| a,c | aeb,cbd,cbd | depart,end of road left,arrive |
|
| a,c | aeb,cbd,cbd | depart,end of road left,arrive |
|
||||||
| a,d | aeb,cbd,cbd | depart,end of road right,arrive |
|
| a,d | aeb,cbd,cbd | depart,end of road right,arrive |
|
||||||
|
|
||||||
|
# http://map.project-osrm.org/?z=18¢er=38.906632%2C-77.008265&loc=38.906463%2C-77.007621&loc=38.906822%2C-77.008860&hl=en&alt=0
|
||||||
|
Scenario: End of Road, unnamed oneway
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
c
|
||||||
|
a e b
|
||||||
|
f d
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | oneway |
|
||||||
|
| aeb | primary | road | yes |
|
||||||
|
| cbd | primary | | yes |
|
||||||
|
| ef | primary | turn | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| a,d | road,, | depart,end of road right,arrive |
|
||||||
|
|
||||||
@3605
|
@3605
|
||||||
Scenario: End of Road with oneway through street
|
Scenario: End of Road with oneway through street
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
@routing @guidance
|
||||||
|
Feature: Exit Numbers and Names
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
Given a grid size of 10 meters
|
||||||
|
|
||||||
|
Scenario: Exit number on the way after the motorway junction
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a . . b . c . . d
|
||||||
|
` e . . f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| b | motorway_junction |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | junction:ref |
|
||||||
|
| abcd | motorway | MainRoad | |
|
||||||
|
| be | motorway_link | ExitRamp | 3 |
|
||||||
|
| ef | motorway_link | ExitRamp | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | exits |
|
||||||
|
| a,f | MainRoad,ExitRamp,ExitRamp | depart,off ramp slight right,arrive | ,3, |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Exit number on the way, motorway junction node tag missing, multiple numbers
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a . . b . c . . d
|
||||||
|
` e . . f
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | junction:ref |
|
||||||
|
| abcd | motorway | MainRoad | |
|
||||||
|
| be | motorway_link | ExitRamp | 10;12 |
|
||||||
|
| ef | motorway_link | ExitRamp | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | exits |
|
||||||
|
| a,f | MainRoad,ExitRamp,ExitRamp | depart,off ramp slight right,arrive | ,10; 12, |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Exit number on the ways after the motorway junction, multiple exits
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a . . b . c . . d
|
||||||
|
` e . . f
|
||||||
|
` g . . h
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| b | motorway_junction |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | junction:ref |
|
||||||
|
| abcd | motorway | MainRoad | |
|
||||||
|
| be | motorway_link | ExitRamp | 3 |
|
||||||
|
| ef | motorway_link | ExitRamp | |
|
||||||
|
| bg | motorway_link | ExitRamp | 3 |
|
||||||
|
| gh | motorway_link | ExitRamp | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | exits |
|
||||||
|
| a,f | MainRoad,ExitRamp,ExitRamp | depart,off ramp slight right,arrive | ,3, |
|
||||||
|
| a,h | MainRoad,ExitRamp,ExitRamp | depart,off ramp right,arrive | ,3, |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# http://www.openstreetmap.org/way/417524818#map=17/37.38663/-121.97972
|
||||||
|
Scenario: Exit 393 on Bayshore Freeway
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a
|
||||||
|
` b
|
||||||
|
` c
|
||||||
|
. ` d
|
||||||
|
f ` e
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the nodes
|
||||||
|
| node | highway |
|
||||||
|
| c | motorway_junction |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | name | junction:ref | oneway | destination |
|
||||||
|
| abcde | motorway | Bayshore Freeway | | yes | |
|
||||||
|
| cf | motorway_link | | 393 | yes | Great America Parkway;Bowers Avenue |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns | exits | destinations |
|
||||||
|
| a,e | Bayshore Freeway,Bayshore Freeway | depart,arrive | , | , |
|
||||||
|
| a,f | Bayshore Freeway,, | depart,off ramp slight right,arrive | ,393,393 | ,Great America Parkway, Bowers Avenue,Great America Parkway, Bowers Avenue |
|
||||||
@@ -140,9 +140,9 @@ Feature: Intersections Data
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | intersections |
|
| waypoints | route | intersections |
|
||||||
| e,f | ea,fb,fb | true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:90 |
|
| e,f | ea,fb,fb,fb | true:180;false:0 false:150 true:210;false:30 true:150 true:270;true:90 |
|
||||||
| e,g | ea,gc,gc | true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330;true:0 |
|
| e,g | ea,gc,gc,gc | true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:30 true:180 false:330;true:0 |
|
||||||
| e,h | ea,hd,hd | true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330,true:90 false:210 true:330;true:270 |
|
| e,h | ea,hd,hd,hd | true:180;false:0 false:150 true:210,false:30 true:150 true:270,true:30 true:180 false:330;true:90 false:210 true:330;true:270 |
|
||||||
| e,2 | ea,abcda,abcda | true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:327 +-1 |
|
| e,2 | ea,abcda,abcda | true:180;false:0 false:150 true:210,false:30 true:150 true:270;true:327 +-1 |
|
||||||
| 1,g | abcda,gc,gc | true:214;false:30 true:150 true:270,true:30 true:180 false:330;true:0 |
|
| 1,g | abcda,gc,gc | true:214,false:30 true:150 true:270;true:30 true:180 false:330;true:0 |
|
||||||
| 1,3 | abcda,abcda | true:214,false:30 true:150 true:270,true:30 true:180 false:330;true:214 |
|
| 1,3 | abcda,abcda | true:214,false:30 true:150 true:270,true:30 true:180 false:330;true:214 |
|
||||||
|
|||||||
@@ -261,3 +261,23 @@ Feature: Motorway Guidance
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | On,Hwy,Off,Off | depart,merge slight right,off ramp right,arrive |
|
| a,d | On,Hwy,Off,Off | depart,merge slight right,off ramp right,arrive |
|
||||||
|
|
||||||
|
#http://0.0.0.0:9966/?z=18¢er=38.893323%2C-77.055117&loc=38.893551%2C-77.054833&loc=38.893112%2C-77.055536&hl=en&alt=0
|
||||||
|
Scenario: Merging with same name
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a - - -
|
||||||
|
> c - d
|
||||||
|
b
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | name | ref | highway | oneway |
|
||||||
|
| ac | | US 50 | motorway | yes |
|
||||||
|
| bc | | I 66 | motorway | yes |
|
||||||
|
| cd | | US 50; I 66 | motorway | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| a,d | , | depart,arrive |
|
||||||
|
| b,d | , | depart,arrive |
|
||||||
|
|||||||
@@ -97,5 +97,7 @@ Feature: Simple Turns
|
|||||||
| ei | left | yes |
|
| ei | left | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| g,a | in,road,road | depart,fork right,arrive |
|
| g,a | in,road,road | depart,fork slight right,arrive |
|
||||||
|
| g,h | in,right,right | depart,fork straight,arrive |
|
||||||
|
| g,i | in,left,left | depart,fork slight left,arrive |
|
||||||
|
|||||||
@@ -1,177 +0,0 @@
|
|||||||
@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 |
|
|
||||||
@@ -24,19 +24,19 @@ Feature: Rotary
|
|||||||
| bgecb | roundabout |
|
| bgecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,bgecb-exit-3,arrive |
|
| a,d | ab,cd,cd,cd | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| a,f | ab,ef,ef | depart,bgecb-exit-2,arrive |
|
| a,f | ab,ef,ef,ef | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| a,h | ab,gh,gh | depart,bgecb-exit-1,arrive |
|
| a,h | ab,gh,gh,gh | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
| d,f | cd,ef,ef | depart,bgecb-exit-3,arrive |
|
| d,f | cd,ef,ef,ef | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| d,h | cd,gh,gh | depart,bgecb-exit-2,arrive |
|
| d,h | cd,gh,gh,gh | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| d,a | cd,ab,ab | depart,bgecb-exit-1,arrive |
|
| d,a | cd,ab,ab,ab | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
| f,h | ef,gh,gh | depart,bgecb-exit-3,arrive |
|
| f,h | ef,gh,gh,gh | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| f,a | ef,ab,ab | depart,bgecb-exit-2,arrive |
|
| f,a | ef,ab,ab,ab | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| f,d | ef,cd,cd | depart,bgecb-exit-1,arrive |
|
| f,d | ef,cd,cd,cd | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
| h,a | gh,ab,ab | depart,bgecb-exit-3,arrive |
|
| h,a | gh,ab,ab,ab | depart,bgecb-exit-3,exit rotary right,arrive |
|
||||||
| h,d | gh,cd,cd | depart,bgecb-exit-2,arrive |
|
| h,d | gh,cd,cd,cd | depart,bgecb-exit-2,exit rotary right,arrive |
|
||||||
| h,f | gh,ef,ef | depart,bgecb-exit-1,arrive |
|
| h,f | gh,ef,ef,ef | depart,bgecb-exit-1,exit rotary right,arrive |
|
||||||
|
|
||||||
Scenario: Only Enter
|
Scenario: Only Enter
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -90,19 +90,19 @@ Feature: Rotary
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,bcegb-exit-1,arrive |
|
| b,d | bcegb,cd,cd | depart,exit rotary right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,bcegb-exit-2,arrive |
|
| b,f | bcegb,ef,ef | depart,exit rotary right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,bcegb-exit-3,arrive |
|
| b,h | bcegb,gh,gh | depart,exit rotary right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,bcegb-exit-1,arrive |
|
| c,f | bcegb,ef,ef | depart,exit rotary right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,bcegb-exit-2,arrive |
|
| c,h | bcegb,gh,gh | depart,exit rotary right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,bcegb-exit-3,arrive |
|
| c,a | bcegb,ab,ab | depart,exit rotary right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,bcegb-exit-1,arrive |
|
| e,h | bcegb,gh,gh | depart,exit rotary right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,bcegb-exit-2,arrive |
|
| e,a | bcegb,ab,ab | depart,exit rotary right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,bcegb-exit-3,arrive |
|
| e,d | bcegb,cd,cd | depart,exit rotary right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,bcegb-exit-1,arrive |
|
| g,a | bcegb,ab,ab | depart,exit rotary right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,bcegb-exit-2,arrive |
|
| g,d | bcegb,cd,cd | depart,exit rotary right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,bcegb-exit-3,arrive |
|
| g,f | bcegb,ef,ef | depart,exit rotary right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#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
|
Scenario: Drive Around
|
||||||
@@ -158,23 +158,23 @@ Feature: Rotary
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,rotary-exit-1,arrive |
|
| a,c | abc,abc,abc | depart,exit rotary right,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,bkheb-exit-2,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,bkheb-exit-3,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| a,f | abc,def,def | depart,bkheb-exit-4,arrive |
|
| a,f | abc,def,def,def | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
| d,f | def,def,def | depart,rotary-exit-1,arrive |
|
| d,f | def,def,def | depart,exit rotary right,arrive |
|
||||||
| d,c | def,abc,abc | depart,bkheb-exit-2,arrive |
|
| d,c | def,abc,abc,abc | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,bkheb-exit-3,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,bkheb-exit-4,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,rotary-exit-1,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit rotary right,arrive |
|
||||||
| g,f | ghi,def,def | depart,bkheb-exit-2,arrive |
|
| g,f | ghi,def,def,def | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,bkheb-exit-3,arrive |
|
| g,c | ghi,abc,abc,abc | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,bkheb-exit-4,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,rotary-exit-1,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit rotary right,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,bkheb-exit-2,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,bkheb-exit-2,exit rotary straight,arrive |
|
||||||
| j,f | jkl,def,def | depart,bkheb-exit-3,arrive |
|
| j,f | jkl,def,def,def | depart,bkheb-exit-3,exit rotary straight,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,bkheb-exit-4,arrive |
|
| j,c | jkl,abc,abc,abc | depart,bkheb-exit-4,exit rotary straight,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -193,9 +193,9 @@ Feature: Rotary
|
|||||||
| df | |
|
| df | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
| a,e | ab,ce,ce,ce | depart,bcdb-exit-1,exit rotary straight,arrive |
|
||||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
| a,f | ab,df,df,df | depart,bcdb-exit-2,exit rotary straight,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -214,9 +214,9 @@ Feature: Rotary
|
|||||||
| cf | |
|
| cf | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ad,be,be | depart,bcdb-exit-1,arrive |
|
| a,e | ad,be,be,be | depart,bcdb-exit-1,exit rotary straight,arrive |
|
||||||
| a,f | ad,cf,cf | depart,bcdb-exit-2,arrive |
|
| a,f | ad,cf,cf,cf | depart,bcdb-exit-2,exit rotary straight,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -235,9 +235,9 @@ Feature: Rotary
|
|||||||
| bf | |
|
| bf | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ac,de,de | depart,bcdb-exit-1,arrive |
|
| a,e | ac,de,de,de | depart,bcdb-exit-1,exit rotary straight,arrive |
|
||||||
| a,f | ac,bf,bf | depart,bcdb-exit-2,arrive |
|
| a,f | ac,bf,bf,bf | depart,bcdb-exit-2,exit rotary straight,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -256,9 +256,9 @@ Feature: Rotary
|
|||||||
| df | |
|
| df | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
| a,e | ab,ce,ce,ce | depart,bcdb-exit-1,exit rotary right,arrive |
|
||||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
| a,f | ab,df,df,df | depart,bcdb-exit-2,exit rotary right,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X,Y
|
Scenario: Collinear in X,Y
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -277,6 +277,6 @@ Feature: Rotary
|
|||||||
| df | |
|
| df | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | ab,ce,ce | depart,bcdb-exit-1,arrive |
|
| a,e | ab,ce,ce,ce | depart,bcdb-exit-1,exit rotary right,arrive |
|
||||||
| a,f | ab,df,df | depart,bcdb-exit-2,arrive |
|
| a,f | ab,df,df,df | depart,bcdb-exit-2,exit rotary right,arrive |
|
||||||
|
|||||||
@@ -5,39 +5,6 @@ Feature: Basic Roundabout
|
|||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
Given a grid size of 10 meters
|
Given a grid size of 10 meters
|
||||||
|
|
||||||
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
|
Scenario: Only Exit
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@@ -57,54 +24,21 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,roundabout-exit-1,arrive |
|
| b,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,roundabout-exit-2,arrive |
|
| b,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,roundabout-exit-3,arrive |
|
| b,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,roundabout-exit-1,arrive |
|
| c,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,roundabout-exit-2,arrive |
|
| c,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,roundabout-exit-3,arrive |
|
| c,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,roundabout-exit-1,arrive |
|
| e,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,roundabout-exit-2,arrive |
|
| e,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,roundabout-exit-3,arrive |
|
| e,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,roundabout-exit-1,arrive |
|
| g,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,roundabout-exit-2,arrive |
|
| g,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,roundabout-exit-3,arrive |
|
| g,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#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
|
Scenario: Mixed Entry and Exit
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
@@ -124,20 +58,20 @@ Feature: Basic Roundabout
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout-exit-1,arrive |
|
| a,c | abc,abc,abc | depart,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-2,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-3,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| a,f | abc,def,def | depart,roundabout-exit-4,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout-exit-1,arrive |
|
| d,f | def,def,def | depart,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc | depart,roundabout-exit-2,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,roundabout-exit-3,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,roundabout-exit-4,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-1,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def | depart,roundabout-exit-2,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,roundabout-exit-3,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-4,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-1,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-2,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| j,f | jkl,def,def | depart,roundabout-exit-3,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,roundabout-exit-4,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given a grid size of 10 meters
|
Given a grid size of 10 meters
|
||||||
Given the profile file
|
Given the profile file "car" initialized with
|
||||||
"""
|
"""
|
||||||
require 'car'
|
profile.properties.left_hand_driving = true
|
||||||
properties.left_hand_driving = true
|
"""
|
||||||
"""
|
|
||||||
|
|
||||||
Scenario: Roundabout exit counting for left sided driving
|
Scenario: Roundabout exit counting for left sided driving
|
||||||
And a grid size of 10 meters
|
And a grid size of 10 meters
|
||||||
@@ -53,7 +52,7 @@ Feature: Basic Roundabout
|
|||||||
| behkb | roundabout | yes |
|
| behkb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| c,a | cba,cba,cba | depart,roundabout-exit-1,arrive |
|
| c,a | cba,cba,cba | depart,exit roundabout left,arrive |
|
||||||
| l,a | lkj,cba,cba | depart,roundabout-exit-2,arrive |
|
| l,a | lkj,cba,cba,cba | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| i,a | ihg,cba,cba | depart,roundabout-exit-3,arrive |
|
| i,a | ihg,cba,cba,cba | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
|
|||||||
@@ -5,39 +5,6 @@ Feature: Basic Roundabout
|
|||||||
Given the profile "bicycle"
|
Given the profile "bicycle"
|
||||||
Given a grid size of 10 meters
|
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 turn left exit-3,arrive |
|
|
||||||
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
|
||||||
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive |
|
|
||||||
| d,f | cd,ef,ef | depart,roundabout turn left exit-3,arrive |
|
|
||||||
| d,h | cd,gh,gh | depart,roundabout turn straight exit-2,arrive |
|
|
||||||
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
|
||||||
| f,h | ef,gh,gh | depart,roundabout turn left exit-3,arrive |
|
|
||||||
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
|
||||||
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
|
||||||
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
|
||||||
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
|
||||||
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
|
||||||
|
|
||||||
# https://www.openstreetmap.org/way/223225602
|
# https://www.openstreetmap.org/way/223225602
|
||||||
Scenario: Enter and Exit with changing mode
|
Scenario: Enter and Exit with changing mode
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -58,16 +25,16 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout | residential |
|
| bgecb | roundabout | residential |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
|
||||||
| a,f | ab,ef,ef,ef | depart,roundabout turn left exit-1,notification right,arrive |
|
| a,f | ab,ef,ef,ef | depart,roundabout turn straight exit-1,exit roundabout right,arrive |
|
||||||
| a,h | ab,bgecb,gh,gh | depart,roundabout turn right exit-1,notification right,arrive |
|
| a,h | ab,gh,gh,gh | depart,roundabout turn right exit-1,exit roundabout right,arrive |
|
||||||
| d,f | cd,ef,ef,ef | depart,roundabout turn sharp left exit-2,notification right,arrive |
|
| d,f | cd,ef,ef,ef | depart,roundabout turn left exit-2,exit roundabout right,arrive |
|
||||||
| d,h | cd,gh,gh,gh | depart,roundabout turn left exit-2,notification right,arrive |
|
| d,h | cd,gh,gh,gh | depart,roundabout turn straight exit-2,exit roundabout right,arrive |
|
||||||
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||||
| f,h | ef,gh,gh,gh | depart,roundabout turn sharp left exit-3,notification right,arrive |
|
| f,h | ef,gh,gh,gh | depart,roundabout turn left exit-3,exit roundabout right,arrive |
|
||||||
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||||
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | gh,ab,ab | depart,roundabout turn left exit-2,arrive |
|
| h,a | gh,ab,ab | depart,roundabout turn left exit-2,arrive |
|
||||||
| h,d | gh,cd,cd | depart,roundabout turn straight exit-1,arrive |
|
| h,d | gh,cd,cd | depart,roundabout turn straight exit-1,arrive |
|
||||||
| h,f | gh,bgecb,ef,ef | depart,roundabout turn right exit-1,notification right,arrive |
|
| h,f | gh,ef,ef,ef | depart,roundabout turn right exit-1,exit roundabout right,arrive |
|
||||||
|
|||||||
@@ -56,19 +56,19 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout |
|
| bgecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive |
|
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive |
|
||||||
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive |
|
||||||
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive |
|
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive |
|
||||||
| d,f | cd,ef,ef | depart,roundabout turn left exit-3,arrive |
|
| d,f | cd,ef,ef | depart,roundabout turn left exit-3,arrive |
|
||||||
| d,h | cd,gh,gh | depart,roundabout turn straight exit-2,arrive |
|
| d,h | cd,gh,gh | depart,roundabout turn straight exit-2,arrive |
|
||||||
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||||
| f,h | ef,gh,gh | depart,roundabout turn left exit-3,arrive |
|
| f,h | ef,gh,gh | depart,roundabout turn left exit-3,arrive |
|
||||||
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||||
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||||
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
||||||
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
||||||
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
||||||
|
|
||||||
Scenario: Only Enter
|
Scenario: Only Enter
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -122,19 +122,19 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,roundabout-exit-1,arrive |
|
| b,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,roundabout-exit-2,arrive |
|
| b,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,roundabout-exit-3,arrive |
|
| b,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,roundabout-exit-1,arrive |
|
| c,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,roundabout-exit-2,arrive |
|
| c,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,roundabout-exit-3,arrive |
|
| c,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,roundabout-exit-1,arrive |
|
| e,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,roundabout-exit-2,arrive |
|
| e,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,roundabout-exit-3,arrive |
|
| e,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,roundabout-exit-1,arrive |
|
| g,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,roundabout-exit-2,arrive |
|
| g,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,roundabout-exit-3,arrive |
|
| g,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#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
|
Scenario: Drive Around
|
||||||
@@ -189,23 +189,23 @@ Feature: Basic Roundabout
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout-exit-1,arrive |
|
| a,c | abc,abc,abc | depart,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-2,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-3,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| a,f | abc,def,def | depart,roundabout-exit-4,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout-exit-1,arrive |
|
| d,f | def,def,def | depart,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc | depart,roundabout-exit-2,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,roundabout-exit-3,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,roundabout-exit-4,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-1,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def | depart,roundabout-exit-2,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,roundabout-exit-3,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-4,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-1,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-2,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| j,f | jkl,def,def | depart,roundabout-exit-3,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,roundabout-exit-4,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
|
|
||||||
Scenario: Segregated roads - Not an intersection
|
Scenario: Segregated roads - Not an intersection
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -226,23 +226,23 @@ Feature: Basic Roundabout
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout-exit-4,arrive |
|
| a,c | abc,abc,abc,abc | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-1,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-2,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| a,f | abc,def,def | depart,roundabout-exit-3,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout-exit-4,arrive |
|
| d,f | def,def,def,def | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc | depart,roundabout-exit-1,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,roundabout-exit-2,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,roundabout-exit-3,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-4,arrive |
|
| g,i | ghi,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def | depart,roundabout-exit-1,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,roundabout-exit-2,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-3,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-4,arrive |
|
| j,l | jkl,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-1,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| j,f | jkl,def,def | depart,roundabout-exit-2,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,roundabout-exit-3,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
|
|
||||||
Scenario: Collinear in X
|
Scenario: Collinear in X
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -368,19 +368,19 @@ Feature: Basic Roundabout
|
|||||||
| bigecb | roundabout |
|
| bigecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,roundabout-exit-4,arrive |
|
| a,d | ab,cd,cd,cd | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| a,f | ab,ef,ef | depart,roundabout-exit-3,arrive |
|
| a,f | ab,ef,ef,ef | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| a,h | ab,gh,gh | depart,roundabout-exit-2,arrive |
|
| a,h | ab,gh,gh,gh | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| d,f | cd,ef,ef | depart,roundabout-exit-4,arrive |
|
| d,f | cd,ef,ef,ef | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| d,h | cd,gh,gh | depart,roundabout-exit-3,arrive |
|
| d,h | cd,gh,gh,gh | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
| d,a | cd,ab,ab,ab | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| f,h | ef,gh,gh | depart,roundabout-exit-4,arrive |
|
| f,h | ef,gh,gh,gh | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
| f,a | ef,ab,ab,ab | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
| f,d | ef,cd,cd,cd | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
| h,a | gh,ab,ab,ab | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
| h,d | gh,cd,cd,cd | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
| h,f | gh,ef,ef,ef | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
|
|
||||||
Scenario: Enter and Exit -- Non-Distinct
|
Scenario: Enter and Exit -- Non-Distinct
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -401,19 +401,19 @@ Feature: Basic Roundabout
|
|||||||
| bgecb | roundabout |
|
| bgecb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive |
|
| a,d | ab,cd,cd,cd | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
| a,f | ab,ef,ef,ef | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive |
|
| a,h | ab,gh,gh,gh | depart,roundabout-exit-1,exit roundabout straight,arrive |
|
||||||
| d,f | cd,ef,ef | depart,roundabout-exit-3,arrive |
|
| d,f | cd,ef,ef,ef | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
|
| d,h | cd,gh,gh,gh | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
| d,a | cd,ab,ab,ab | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| f,h | ef,gh,gh | depart,roundabout-exit-3,arrive |
|
| f,h | ef,gh,gh,gh | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
| f,a | ef,ab,ab,ab | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
| f,d | ef,cd,cd,cd | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
| h,a | gh,ab,ab,ab | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
| h,d | gh,cd,cd,cd | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
| h,f | gh,ef,ef,ef | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
|
|
||||||
Scenario: Enter and Exit -- Bearing
|
Scenario: Enter and Exit -- Bearing
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -567,5 +567,5 @@ Feature: Basic Roundabout
|
|||||||
| ab | residential | in | | |
|
| ab | residential | in | | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | turns | route |
|
| waypoints | turns | route |
|
||||||
| a,f | depart,turn right,roundabout turn straight exit-1,arrive | in,through,through,through |
|
| a,f | depart,turn right,arrive | in,through,through |
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout | primary |
|
| bcegb | roundabout | primary |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | ab,cd,cd | depart,roundabout-exit-1,arrive |
|
| a,d | ab,cd,cd,cd | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| a,h | ab,gh,gh | depart,roundabout-exit-2,arrive |
|
| a,h | ab,gh,gh,gh | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
| a,f | ab,ef,ef,ef | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
|
|
||||||
#2927
|
#2927
|
||||||
Scenario: Only Roundabout
|
Scenario: Only Roundabout
|
||||||
@@ -98,19 +98,19 @@ Feature: Basic Roundabout
|
|||||||
| bcegb | roundabout |
|
| bcegb | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| b,d | bcegb,cd,cd | depart,roundabout-exit-1,arrive |
|
| b,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| b,f | bcegb,ef,ef | depart,roundabout-exit-2,arrive |
|
| b,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| b,h | bcegb,gh,gh | depart,roundabout-exit-3,arrive |
|
| b,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,f | bcegb,ef,ef | depart,roundabout-exit-1,arrive |
|
| c,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
| c,h | bcegb,gh,gh | depart,roundabout-exit-2,arrive |
|
| c,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| c,a | bcegb,ab,ab | depart,roundabout-exit-3,arrive |
|
| c,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,h | bcegb,gh,gh | depart,roundabout-exit-1,arrive |
|
| e,h | bcegb,gh,gh | depart,exit roundabout right,arrive |
|
||||||
| e,a | bcegb,ab,ab | depart,roundabout-exit-2,arrive |
|
| e,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| e,d | bcegb,cd,cd | depart,roundabout-exit-3,arrive |
|
| e,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,a | bcegb,ab,ab | depart,roundabout-exit-1,arrive |
|
| g,a | bcegb,ab,ab | depart,exit roundabout right,arrive |
|
||||||
| g,d | bcegb,cd,cd | depart,roundabout-exit-2,arrive |
|
| g,d | bcegb,cd,cd | depart,exit roundabout right,arrive |
|
||||||
| g,f | bcegb,ef,ef | depart,roundabout-exit-3,arrive |
|
| g,f | bcegb,ef,ef | depart,exit roundabout right,arrive |
|
||||||
#phantom node snapping can result in a full round-trip here, therefore we cannot test b->a and the other direct exits
|
#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
|
Scenario: Drive Around
|
||||||
@@ -165,23 +165,23 @@ Feature: Basic Roundabout
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout-exit-1,arrive |
|
| a,c | abc,abc,abc | depart,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-2,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-3,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| a,f | abc,def,def | depart,roundabout-exit-4,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout-exit-1,arrive |
|
| d,f | def,def,def | depart,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc | depart,roundabout-exit-2,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,roundabout-exit-3,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,roundabout-exit-4,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-1,arrive |
|
| g,i | ghi,ghi,ghi | depart,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def | depart,roundabout-exit-2,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,roundabout-exit-3,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-4,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-1,arrive |
|
| j,l | jkl,jkl,jkl | depart,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-2,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| j,f | jkl,def,def | depart,roundabout-exit-3,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-3,exit roundabout straight,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,roundabout-exit-4,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
|
|
||||||
Scenario: Mixed Entry and Exit - segregated roads
|
Scenario: Mixed Entry and Exit - segregated roads
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -204,23 +204,23 @@ Feature: Basic Roundabout
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout-exit-4,arrive |
|
| a,c | abc,abc,abc,abc | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-1,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-2,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| a,f | abc,def,def | depart,roundabout-exit-3,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout-exit-4,arrive |
|
| d,f | def,def,def,def | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| d,c | def,abc,abc | depart,roundabout-exit-1,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,roundabout-exit-2,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,roundabout-exit-3,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-4,arrive |
|
| g,i | ghi,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| g,f | ghi,def,def | depart,roundabout-exit-1,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,roundabout-exit-2,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-3,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-4,arrive |
|
| j,l | jkl,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-1,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| j,f | jkl,def,def | depart,roundabout-exit-2,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,roundabout-exit-3,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
|
|
||||||
Scenario: Mixed Entry and Exit - clockwise order
|
Scenario: Mixed Entry and Exit - clockwise order
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -241,23 +241,23 @@ Feature: Basic Roundabout
|
|||||||
| behkb | roundabout | yes |
|
| behkb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | abc,abc,abc | depart,roundabout-exit-4,arrive |
|
| a,c | abc,abc,abc,abc | depart,roundabout-exit-4,exit roundabout left,arrive |
|
||||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-3,arrive |
|
| a,l | abc,jkl,jkl,jkl | depart,roundabout-exit-3,exit roundabout left,arrive |
|
||||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-2,arrive |
|
| a,i | abc,ghi,ghi,ghi | depart,roundabout-exit-2,exit roundabout left,arrive |
|
||||||
| a,f | abc,def,def | depart,roundabout-exit-1,arrive |
|
| a,f | abc,def,def,def | depart,roundabout-exit-1,exit roundabout left,arrive |
|
||||||
| d,f | def,def,def | depart,roundabout-exit-4,arrive |
|
| d,f | def,def,def,def | depart,roundabout-exit-4,exit roundabout left,arrive |
|
||||||
| d,c | def,abc,abc | depart,roundabout-exit-3,arrive |
|
| d,c | def,abc,abc,abc | depart,roundabout-exit-3,exit roundabout left,arrive |
|
||||||
| d,l | def,jkl,jkl | depart,roundabout-exit-2,arrive |
|
| d,l | def,jkl,jkl,jkl | depart,roundabout-exit-2,exit roundabout left,arrive |
|
||||||
| d,i | def,ghi,ghi | depart,roundabout-exit-1,arrive |
|
| d,i | def,ghi,ghi,ghi | depart,roundabout-exit-1,exit roundabout left,arrive |
|
||||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-4,arrive |
|
| g,i | ghi,ghi,ghi,ghi | depart,roundabout-exit-4,exit roundabout left,arrive |
|
||||||
| g,f | ghi,def,def | depart,roundabout-exit-3,arrive |
|
| g,f | ghi,def,def,def | depart,roundabout-exit-3,exit roundabout left,arrive |
|
||||||
| g,c | ghi,abc,abc | depart,roundabout-exit-2,arrive |
|
| g,c | ghi,abc,abc,abc | depart,roundabout-exit-2,exit roundabout left,arrive |
|
||||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-1,arrive |
|
| g,l | ghi,jkl,jkl,jkl | depart,roundabout-exit-1,exit roundabout left,arrive |
|
||||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-4,arrive |
|
| j,l | jkl,jkl,jkl,jkl | depart,roundabout-exit-4,exit roundabout left,arrive |
|
||||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-3,arrive |
|
| j,i | jkl,ghi,ghi,ghi | depart,roundabout-exit-3,exit roundabout left,arrive |
|
||||||
| j,f | jkl,def,def | depart,roundabout-exit-2,arrive |
|
| j,f | jkl,def,def,def | depart,roundabout-exit-2,exit roundabout left,arrive |
|
||||||
| j,c | jkl,abc,abc | depart,roundabout-exit-1,arrive |
|
| j,c | jkl,abc,abc,abc | depart,roundabout-exit-1,exit roundabout left,arrive |
|
||||||
|
|
||||||
Scenario: Mixed Entry and Exit - segregated roads, different names
|
Scenario: Mixed Entry and Exit - segregated roads, different names
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -284,23 +284,23 @@ Feature: Basic Roundabout
|
|||||||
| bkheb | roundabout | yes |
|
| bkheb | roundabout | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | ab,bc,bc | depart,roundabout-exit-4,arrive |
|
| a,c | ab,bc,bc,bc | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| a,l | ab,kl,kl | depart,roundabout-exit-1,arrive |
|
| a,l | ab,kl,kl,kl | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| a,i | ab,hi,hi | depart,roundabout-exit-2,arrive |
|
| a,i | ab,hi,hi,hi | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| a,f | ab,ef,ef | depart,roundabout-exit-3,arrive |
|
| a,f | ab,ef,ef,ef | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| d,f | de,ef,ef | depart,roundabout-exit-4,arrive |
|
| d,f | de,ef,ef,ef | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| d,c | de,bc,bc | depart,roundabout-exit-1,arrive |
|
| d,c | de,bc,bc,bc | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| d,l | de,kl,kl | depart,roundabout-exit-2,arrive |
|
| d,l | de,kl,kl,kl | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| d,i | de,hi,hi | depart,roundabout-exit-3,arrive |
|
| d,i | de,hi,hi,hi | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| g,i | gh,hi,hi | depart,roundabout-exit-4,arrive |
|
| g,i | gh,hi,hi,hi | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| g,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
| g,f | gh,ef,ef,ef | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| g,c | gh,bc,bc | depart,roundabout-exit-2,arrive |
|
| g,c | gh,bc,bc,bc | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| g,l | gh,kl,kl | depart,roundabout-exit-3,arrive |
|
| g,l | gh,kl,kl,kl | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| j,l | jk,kl,kl | depart,roundabout-exit-4,arrive |
|
| j,l | jk,kl,kl,kl | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| j,i | jk,hi,hi | depart,roundabout-exit-1,arrive |
|
| j,i | jk,hi,hi,hi | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| j,f | jk,ef,ef | depart,roundabout-exit-2,arrive |
|
| j,f | jk,ef,ef,ef | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| j,c | jk,bc,bc | depart,roundabout-exit-3,arrive |
|
| j,c | jk,bc,bc,bc | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
|
|
||||||
Scenario: Motorway Roundabout
|
Scenario: Motorway Roundabout
|
||||||
#See 39.933742 -75.082345
|
#See 39.933742 -75.082345
|
||||||
@@ -338,11 +338,10 @@ Feature: Basic Roundabout
|
|||||||
| dmg | roundabout | | trunk_link | yes | |
|
| dmg | roundabout | | trunk_link | yes | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | ref |
|
| waypoints | route | turns | ref |
|
||||||
| a,e | crescent,crescent,crescent | depart,roundabout-exit-3,arrive | US 130,US 130,US 130 |
|
| a,e | crescent,crescent,crescent,crescent | depart,roundabout-exit-3,exit roundabout straight,arrive | US 130,US 130,US 130,US 130 |
|
||||||
| j,l | ,, | depart,roundabout-exit-2,arrive | NJ 38,NJ 38,NJ 38 |
|
| j,l | ,,, | depart,roundabout-exit-2,exit roundabout straight,arrive | NJ 38,NJ 38,NJ 38,NJ 38 |
|
||||||
|
|
||||||
@todo
|
|
||||||
# this test previously only passed by accident. We need to handle throughabouts correctly, since staying on massachusetts is actually
|
# this test previously only passed by accident. We need to handle throughabouts correctly, since staying on massachusetts is actually
|
||||||
# the desired setting. Rotary instructions here are not wanted but rather no instruction at all to go through the roundabout (or add
|
# the desired setting. Rotary instructions here are not wanted but rather no instruction at all to go through the roundabout (or add
|
||||||
# a throughabout instruction)
|
# a throughabout instruction)
|
||||||
@@ -389,8 +388,8 @@ Feature: Basic Roundabout
|
|||||||
| restriction | pi | ij | i | no_left_turn |
|
| restriction | pi | ij | i | no_left_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,k | massachusetts,massachusetts,massachusetts,massachusetts | depart,sheridan circle-exit-2,rotary-exit-1,arrive |
|
| a,k | massachusetts,massachusetts,massachusetts,massachusetts | depart,sheridan circle-exit-2,exit rotary right,arrive |
|
||||||
|
|
||||||
#2856 - http://www.openstreetmap.org/#map=19/47.23318/-1.56563
|
#2856 - http://www.openstreetmap.org/#map=19/47.23318/-1.56563
|
||||||
Scenario: Linked Roundabouts
|
Scenario: Linked Roundabouts
|
||||||
@@ -477,8 +476,8 @@ Feature: Basic Roundabout
|
|||||||
| cdefib | roundabout | roundabout | yes | |
|
| cdefib | roundabout | roundabout | yes | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| 1,h | roundabout,right-bot-out,right-bot-out | depart,roundabout-exit-1,arrive |
|
| 1,h | roundabout,right-bot-out,right-bot-out | depart,exit rotary straight,arrive |
|
||||||
|
|
||||||
@3254
|
@3254
|
||||||
Scenario: Driving up to and through a roundabout
|
Scenario: Driving up to and through a roundabout
|
||||||
@@ -495,15 +494,15 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
| nodes | junction | name | highway |
|
| nodes | junction | name | highway |
|
||||||
| abcda | roundabout | roundabout | residential |
|
| abcda | roundabout | rotary | residential |
|
||||||
| gfi | | side | residential |
|
| gfi | | side | residential |
|
||||||
| efb | | left | residential |
|
| efb | | left | residential |
|
||||||
| dh | | right | residential |
|
| dh | | right | residential |
|
||||||
| ck | | bottom | residential |
|
| ck | | bottom | residential |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| e,h | left,right,right | depart,roundabout-exit-2,arrive |
|
| e,h | left,right,right,right | depart,rotary-exit-2,exit rotary right,arrive |
|
||||||
|
|
||||||
@3254
|
@3254
|
||||||
Scenario: Driving up to and through a roundabout
|
Scenario: Driving up to and through a roundabout
|
||||||
@@ -520,15 +519,15 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
| nodes | junction | name | highway |
|
| nodes | junction | name | highway |
|
||||||
| abcda | roundabout | roundabout | residential |
|
| abcda | roundabout | rotary | residential |
|
||||||
| gfi | | side | residential |
|
| gfi | | side | residential |
|
||||||
| efb | | left | residential |
|
| efb | | left | residential |
|
||||||
| dh | | right | residential |
|
| dh | | right | residential |
|
||||||
| ck | | bottom | residential |
|
| ck | | bottom | residential |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| e,h | left,right,right | depart,roundabout-exit-2,arrive |
|
| e,h | left,right,right,right | depart,rotary-exit-2,exit rotary right,arrive |
|
||||||
|
|
||||||
@3361
|
@3361
|
||||||
Scenario: Bersarinplatz (Not a Roundabout)
|
Scenario: Bersarinplatz (Not a Roundabout)
|
||||||
@@ -565,13 +564,13 @@ Feature: Basic Roundabout
|
|||||||
| mn | | Petersburger Strasse | B 96a | primary | yes |
|
| mn | | Petersburger Strasse | B 96a | primary | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,g | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-2,arrive |
|
| a,g | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-2,exit rotary straight,arrive |
|
||||||
| d,g | Weidenweg,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-1,arrive |
|
| d,g | Weidenweg,Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-1,exit rotary straight,arrive |
|
||||||
| i,k | Petersburger Strasse,Rigaer Strasse,Rigaer Strasse | depart,Bersarinplatz-exit-1,arrive |
|
| i,k | Petersburger Strasse,Rigaer Strasse,Rigaer Strasse,Rigaer Strasse | depart,Bersarinplatz-exit-1,exit rotary right,arrive |
|
||||||
| i,n | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-2,arrive |
|
| i,n | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-2,exit rotary straight,arrive |
|
||||||
| i,d | Petersburger Strasse,Weidenweg,Weidenweg | depart,Bersarinplatz-exit-3,arrive |
|
| i,d | Petersburger Strasse,Weidenweg,Weidenweg,Weidenweg | depart,Bersarinplatz-exit-3,exit rotary right,arrive |
|
||||||
| i,g | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-4,arrive |
|
| i,g | Petersburger Strasse,Petersburger Strasse,Petersburger Strasse,Petersburger Strasse | depart,Bersarinplatz-exit-4,exit rotary straight,arrive |
|
||||||
|
|
||||||
@turboroundabout
|
@turboroundabout
|
||||||
# http://www.openstreetmap.org/?mlat=48.782118&mlon=8.194456&zoom=16#map=19/48.78216/8.19457
|
# http://www.openstreetmap.org/?mlat=48.782118&mlon=8.194456&zoom=16#map=19/48.78216/8.19457
|
||||||
@@ -606,11 +605,11 @@ Feature: Basic Roundabout
|
|||||||
| ob | trunk | yes | roundabout | Europaplatz | |
|
| ob | trunk | yes | roundabout | Europaplatz | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns |
|
||||||
| a,d | ,Europastrasse,Europastrasse | depart,Europaplatz-exit-1,arrive | ,, |
|
| a,d | ,Europastrasse,Europastrasse,Europastrasse | depart,Europaplatz-exit-1,exit rotary right,arrive |
|
||||||
| a,h | ,Allee Cite,Allee Cite | depart,Europaplatz-exit-2,arrive | ,, |
|
| a,h | ,Allee Cite,Allee Cite,Allee Cite | depart,Europaplatz-exit-2,exit rotary right,arrive |
|
||||||
| a,l | ,Europastrasse,Europastrasse | depart,Europaplatz-exit-3,arrive | ,, |
|
| a,l | ,Europastrasse,Europastrasse,Europastrasse | depart,Europaplatz-exit-3,exit rotary right,arrive |
|
||||||
| a,p | ,, | depart,Europaplatz-exit-4,arrive | ,, |
|
| a,p | ,,, | depart,Europaplatz-exit-4,exit rotary right,arrive |
|
||||||
|
|
||||||
@turboroundabout
|
@turboroundabout
|
||||||
# http://www.openstreetmap.org/?mlat=50.180039&mlon=8.474939&zoom=16#map=19/50.17999/8.47506
|
# http://www.openstreetmap.org/?mlat=50.180039&mlon=8.474939&zoom=16#map=19/50.17999/8.47506
|
||||||
@@ -658,14 +657,14 @@ Feature: Basic Roundabout
|
|||||||
| wb | primary | yes | roundabout | | through\|through;right |
|
| wb | primary | yes | roundabout | | through\|through;right |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns |
|
||||||
| a,w | Le-Cannet-Rocheville-Strasse,, | depart,roundabout-exit-undefined,arrive | ,, |
|
| a,w | Le-Cannet-Rocheville-Strasse,, | depart,roundabout-exit-undefined,arrive |
|
||||||
| a,r | Le-Cannet-Rocheville-Strasse,, | depart,roundabout-exit-4,arrive | ,, |
|
| a,r | Le-Cannet-Rocheville-Strasse,,, | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| a,f | Le-Cannet-Rocheville-Strasse,Frankfurter Strasse,Frankfurter Strasse | depart,roundabout-exit-1,arrive | ,, |
|
| a,f | Le-Cannet-Rocheville-Strasse,Frankfurter Strasse,Frankfurter Strasse,Frankfurter Strasse | depart,roundabout-exit-1,exit roundabout right,arrive |
|
||||||
| a,h | Le-Cannet-Rocheville-Strasse,Bischof-Kaller-Strasse,Bischof-Kaller-Strasse | depart,roundabout-exit-2,arrive | ,, |
|
| a,h | Le-Cannet-Rocheville-Strasse,Bischof-Kaller-Strasse,Bischof-Kaller-Strasse,Bischof-Kaller-Strasse | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| u,r | ,, | depart,roundabout-exit-5,arrive | ,, |
|
| u,r | ,,, | depart,roundabout-exit-5,exit roundabout right,arrive |
|
||||||
| j,h | Bischof-Kaller-Strasse,Bischof-Kaller-Strasse,Bischof-Kaller-Strasse | depart,roundabout-exit-5,arrive | ,, |
|
| j,h | Bischof-Kaller-Strasse,Bischof-Kaller-Strasse,Bischof-Kaller-Strasse,Bischof-Kaller-Strasse | depart,roundabout-exit-5,exit roundabout right,arrive |
|
||||||
| n,m | , | depart,arrive | , |
|
| n,m | , | depart,arrive |
|
||||||
|
|
||||||
@turboroundabout
|
@turboroundabout
|
||||||
# http://www.openstreetmap.org/?mlat=47.57723&mlon=7.796765&zoom=16#map=19/47.57720/7.79711
|
# http://www.openstreetmap.org/?mlat=47.57723&mlon=7.796765&zoom=16#map=19/47.57720/7.79711
|
||||||
@@ -708,17 +707,16 @@ Feature: Basic Roundabout
|
|||||||
| la | primary | yes | roundabout |
|
| la | primary | yes | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| w,r | wk,ar,ar | depart,roundabout-exit-1,arrive |
|
| w,r | wk,ar,ar,ar | depart,roundabout-exit-1,exit roundabout slight right,arrive |
|
||||||
| w,s | wk,ds,ds | depart,roundabout-exit-2,arrive |
|
| w,s | wk,ds,ds,ds | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| w,t | wk,ft,ft | depart,roundabout-exit-3,arrive |
|
| w,t | wk,ft,ft,ft | depart,roundabout-exit-3,exit roundabout right,arrive |
|
||||||
| w,v | wk,hv,hv | depart,roundabout-exit-4,arrive |
|
| w,v | wk,hv,hv,hv | depart,roundabout-exit-4,exit roundabout straight,arrive |
|
||||||
| u,v | ug,hv,hv | depart,roundabout-exit-1,arrive |
|
| u,v | ug,hv,hv,hv | depart,roundabout-exit-1,exit roundabout straight,arrive |
|
||||||
| u,w | ug,jw,jw | depart,roundabout-exit-2,arrive |
|
| u,w | ug,jw,jw,jw | depart,roundabout-exit-2,exit roundabout slight right,arrive |
|
||||||
| u,r | ug,ar,ar | depart,roundabout-exit-3,arrive |
|
| u,r | ug,ar,ar,ar | depart,roundabout-exit-3,exit roundabout slight right,arrive |
|
||||||
| u,s | ug,ds,ds | depart,roundabout-exit-4,arrive |
|
| u,s | ug,ds,ds,ds | depart,roundabout-exit-4,exit roundabout right,arrive |
|
||||||
| u,t | ug,ft,ft | depart,roundabout-exit-5,arrive |
|
| u,t | ug,ft,ft,ft | depart,roundabout-exit-5,exit roundabout right,arrive |
|
||||||
|
|
||||||
|
|
||||||
@3762
|
@3762
|
||||||
Scenario: Only Enter
|
Scenario: Only Enter
|
||||||
@@ -742,8 +740,8 @@ Feature: Basic Roundabout
|
|||||||
| bcjdeb | roundabout | |
|
| bcjdeb | roundabout | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,h | ab,ef,ef,fh,fh | depart,roundabout-exit-4,notification slight right,notification straight,arrive |
|
| a,h | ab,ef,ef,fh,fh | depart,roundabout-exit-4,exit roundabout slight right,notification straight,arrive |
|
||||||
|
|
||||||
|
|
||||||
Scenario: Drive through roundabout
|
Scenario: Drive through roundabout
|
||||||
@@ -762,12 +760,12 @@ Feature: Basic Roundabout
|
|||||||
| gch | | yes |
|
| gch | | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | bearings | route | turns |
|
| waypoints | bearings | route | turns |
|
||||||
| e,f | 90 90 | edf,edf,edf | depart,roundabout-exit-1,arrive |
|
| e,f | 90 90 | edf,edf | depart,arrive |
|
||||||
| e,h | 90 135 | edf,gch,gch | depart,roundabout-exit-2,arrive |
|
| e,h | 90 135 | edf,gch,gch,gch | depart,roundabout-exit-2,exit roundabout straight,arrive |
|
||||||
| g,f | 45 90 | gch,edf,edf | depart,roundabout-exit-2,arrive |
|
| g,f | 45 90 | gch,edf,edf,edf | depart,roundabout-exit-2,exit roundabout right,arrive |
|
||||||
| g,h | 45 135 | gch,gch,gch | depart,roundabout-exit-1,arrive |
|
| g,h | 45 135 | gch,gch,gch | depart,exit roundabout right,arrive |
|
||||||
| e,e | 90 270 | edf,edf,edf | depart,roundabout-exit-3,arrive |
|
| e,e | 90 270 | edf,edf,edf,edf | depart,roundabout-exit-3,exit roundabout sharp left,arrive |
|
||||||
|
|
||||||
Scenario: CCW and CW roundabouts with overlaps
|
Scenario: CCW and CW roundabouts with overlaps
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -787,12 +785,13 @@ Feature: Basic Roundabout
|
|||||||
| kg | tertiary | |
|
| kg | tertiary | |
|
||||||
| hl | tertiary | |
|
| hl | tertiary | |
|
||||||
|
|
||||||
|
# the turn angles here are quite strange, so we do get uturns for exiting
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | turns | distance |
|
| from | to | route | turns | distance |
|
||||||
| e | f | ed,af,af | depart,roundabout-exit-1,arrive | 80.1m |
|
| e | f | ed,af,af,af | depart,roundabout-exit-1,exit roundabout left,arrive | 80.1m |
|
||||||
| f | e | af,ed,ed | depart,roundabout-exit-1,arrive | 120.1m |
|
| f | e | af,ed,ed,ed | depart,roundabout-exit-1,exit roundabout uturn,arrive | 120.1m |
|
||||||
| k | l | kg,hl,hl | depart,roundabout-exit-1,arrive | 80.1m |
|
| k | l | kg,hl,hl,hl | depart,roundabout-exit-1,exit roundabout right,arrive | 80.1m |
|
||||||
| l | k | hl,kg,kg | depart,roundabout-exit-1,arrive | 120.1m |
|
| l | k | hl,kg,kg,kg | depart,roundabout-exit-1,exit roundabout uturn,arrive | 120.1m |
|
||||||
|
|
||||||
@4030 @4075
|
@4030 @4075
|
||||||
Scenario: Service roundabout with service exits
|
Scenario: Service roundabout with service exits
|
||||||
@@ -811,11 +810,11 @@ Feature: Basic Roundabout
|
|||||||
| bh | service | |
|
| bh | service | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | turns |
|
| from | to | route | turns |
|
||||||
| 1 | e | abcda,ce,ce | depart,roundabout-exit-1,arrive |
|
| 1 | e | abcda,ce,ce | depart,exit roundabout straight,arrive |
|
||||||
| 1 | f | abcda,df,df | depart,roundabout-exit-2,arrive |
|
| 1 | f | abcda,df,df | depart,exit roundabout right,arrive |
|
||||||
| 1 | g | abcda,ag,ag | depart,roundabout-exit-3,arrive |
|
| 1 | g | abcda,ag,ag | depart,exit roundabout straight,arrive |
|
||||||
| 1 | h | abcda,bh,bh | depart,roundabout-exit-4,arrive |
|
| 1 | h | abcda,bh,bh | depart,exit roundabout right,arrive |
|
||||||
|
|
||||||
Scenario: Collapsing a sliproad step after roundabouts
|
Scenario: Collapsing a sliproad step after roundabouts
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -843,6 +842,6 @@ Feature: Basic Roundabout
|
|||||||
|
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | turns | distance |
|
| from | to | route | turns | distance |
|
||||||
| e | k | ebds,ebds,ds,ufghl,jhik,jhik | depart,rotary-exit-1,rotary-exit-1,rstur-exit-2,turn right,arrive | 189.1m |
|
| e | k | ebds,ufghl,ufghl,jhik,jhik | depart,rstur-exit-2,exit rotary right,turn right,arrive | 189.1m |
|
||||||
| 1 | k | ebds,ds,ufghl,jhik,jhik | depart,rotary-exit-1,rstur-exit-2,turn right,arrive | 159.1m |
|
| 1 | k | ebds,ufghl,ufghl,jhik,jhik | depart,rstur-exit-2,exit rotary right,turn right,arrive | 159.1m |
|
||||||
|
|||||||
@@ -248,8 +248,8 @@ Feature: Simple Turns
|
|||||||
| bcdefghijklmnob | residential | road | 1 | yes | roundabout |
|
| bcdefghijklmnob | residential | road | 1 | yes | roundabout |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | intersections |
|
| waypoints | route | turns | intersections |
|
||||||
| a,p | road,road,road | depart,roundabout turn straight exit-1,arrive | true:90;true:165 false:270 false:345,true:90 false:180 true:345;true:270 |
|
| a,p | road,road,road | depart,roundabout turn straight exit-1,arrive | true:90;true:165 false:270 false:345,true:90 false:180 true:345;true:270 |
|
||||||
|
|
||||||
Scenario: Splitting Road with many lanes
|
Scenario: Splitting Road with many lanes
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -809,14 +809,14 @@ Feature: Simple Turns
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | intersections |
|
| waypoints | route | turns | intersections |
|
||||||
| a,g | Perle,Heide,Heide | depart,turn right,arrive | true:90;true:90 true:180 false:270 true:345;true:18 |
|
| a,g | Perle,Heide,Heide | depart,turn right,arrive | true:90;true:90 true:195 false:270 true:345;true:18 |
|
||||||
| a,k | Perle,Friede,Friede | depart,turn left,arrive | true:90;true:90 true:180 false:270 true:345;true:153 |
|
| a,k | Perle,Friede,Friede | depart,turn left,arrive | true:90;true:90 true:195 false:270 true:345;true:153 |
|
||||||
| a,e | Perle,Perle | depart,arrive | true:90,true:90 true:180 false:270 true:345;true:270 |
|
| a,e | Perle,Perle | depart,arrive | true:90,true:90 true:195 false:270 true:345;true:270 |
|
||||||
| e,k | Perle,Friede,Friede | depart,turn right,arrive | true:270;false:90 true:180 true:270 true:345;true:153 |
|
| e,k | Perle,Friede,Friede | depart,turn right,arrive | true:270;false:90 true:195 true:270 true:345;true:153 |
|
||||||
| e,g | Perle,Heide,Heide | depart,turn left,arrive | true:270;false:90 true:180 true:270 true:345;true:18 |
|
| e,g | Perle,Heide,Heide | depart,turn left,arrive | true:270;false:90 true:195 true:270 true:345;true:18 |
|
||||||
| h,k | Heide,Friede | depart,arrive | true:16,true:90 true:180 true:270 true:345;true:153 |
|
| h,k | Heide,Friede | depart,arrive | true:16,true:90 true:195 true:270 true:345;true:153 |
|
||||||
| h,e | Heide,Perle,Perle | depart,turn right,arrive | true:16;true:90 true:180 true:270 true:345;true:270 |
|
| h,e | Heide,Perle,Perle | depart,turn right,arrive | true:16;true:90 true:195 true:270 true:345;true:270 |
|
||||||
| h,a | Heide,Perle,Perle | depart,turn left,arrive | true:16;true:90 true:180 true:270 true:345;true:90 |
|
| h,a | Heide,Perle,Perle | depart,turn left,arrive | true:16;true:90 true:195 true:270 true:345;true:90 |
|
||||||
|
|
||||||
#http://www.openstreetmap.org/#map=19/52.53293/13.32956
|
#http://www.openstreetmap.org/#map=19/52.53293/13.32956
|
||||||
Scenario: Curved Exit from Curved Road
|
Scenario: Curved Exit from Curved Road
|
||||||
@@ -1006,8 +1006,8 @@ Feature: Simple Turns
|
|||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,e | Heide,Heide,Heide | depart,continue uturn,arrive |
|
| a,e | Heide,Heide,Heide | depart,continue uturn,arrive |
|
||||||
| a,g | Heide,Fenn,Fenn | depart,turn right,arrive |
|
| a,g | Heide,Fenn,Fenn | depart,turn right,arrive |
|
||||||
| a,h | Heide,Friede,Friede | depart,turn slight left,arrive |
|
| a,h | Heide,Friede,Friede | depart,turn left,arrive |
|
||||||
| i,e | Perle,Heide,Heide | depart,turn right,arrive |
|
| i,e | Perle,Heide,Heide | depart,turn sharp right,arrive |
|
||||||
| i,h | Perle,Friede,Friede | depart,turn left,arrive |
|
| i,h | Perle,Friede,Friede | depart,turn left,arrive |
|
||||||
|
|
||||||
#http://www.openstreetmap.org/#map=19/52.48630/13.36017
|
#http://www.openstreetmap.org/#map=19/52.48630/13.36017
|
||||||
@@ -1189,7 +1189,7 @@ Feature: Simple Turns
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,c | rose,trift | depart,arrive |
|
| a,c | rose,trift,trift | depart,turn slight left,arrive |
|
||||||
| a,k | rose,muhle,muhle | depart,turn slight right,arrive |
|
| a,k | rose,muhle,muhle | depart,turn slight right,arrive |
|
||||||
| d,f | trift,rose | depart,arrive |
|
| d,f | trift,rose | depart,arrive |
|
||||||
| d,k | trift,muhle,muhle | depart,turn sharp left,arrive |
|
| d,k | trift,muhle,muhle | depart,turn sharp left,arrive |
|
||||||
@@ -1317,11 +1317,11 @@ Feature: Simple Turns
|
|||||||
|
|
||||||
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
|
#https://github.com/Project-OSRM/osrm-backend/pull/3469#issuecomment-270806580
|
||||||
Scenario: Oszillating Lower Priority Road
|
Scenario: Oszillating Lower Priority Road
|
||||||
#Given the node map
|
#Given the node map
|
||||||
# """
|
# """
|
||||||
# a -db c
|
# a -db c
|
||||||
# f
|
# f
|
||||||
# """
|
# """
|
||||||
Given the node locations
|
Given the node locations
|
||||||
| node | lat | lon | # |
|
| node | lat | lon | # |
|
||||||
| a | 1.0 | 1.0 | |
|
| a | 1.0 | 1.0 | |
|
||||||
@@ -1371,3 +1371,76 @@ Feature: Simple Turns
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route |
|
| waypoints | route |
|
||||||
| g,e | abcde,abcde |
|
| g,e | abcde,abcde |
|
||||||
|
|
||||||
|
# 4205
|
||||||
|
# https://www.openstreetmap.org/node/36153635#map=19/51.97548/7.61795
|
||||||
|
Scenario: merging onto a through street
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
e
|
||||||
|
`
|
||||||
|
`
|
||||||
|
`
|
||||||
|
`
|
||||||
|
d
|
||||||
|
c
|
||||||
|
a - - - - - - - b``
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
`
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
|
||||||
|
f
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | oneway | name |
|
||||||
|
| abc | yes | fww |
|
||||||
|
| fcde | no | jahn |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | turns |
|
||||||
|
| a,f | fww,jahn,jahn | depart,turn right,arrive |
|
||||||
|
| a,e | fww,jahn,jahn | depart,turn left,arrive |
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ Feature: Turn Lane Guidance
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||||
| a,c | road,road | depart,arrive | , |
|
| a,c | road,road | depart,arrive | ;straight:true right:false, |
|
||||||
|
|
||||||
Scenario: Turn with Bus-Lane Left
|
Scenario: Turn with Bus-Lane Left
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -178,7 +178,7 @@ Feature: Turn Lane Guidance
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | road,turn,turn | depart,turn left,arrive | ,left:true straight:false, |
|
| a,d | road,turn,turn | depart,turn left,arrive | ,left:true straight:false, |
|
||||||
| a,c | road,road | depart,arrive | , |
|
| a,c | road,road | depart,arrive | ;left:false straight:true, |
|
||||||
|
|
||||||
# This tests whether empty/invalid PSV tags cause osrm-extract to crash
|
# This tests whether empty/invalid PSV tags cause osrm-extract to crash
|
||||||
Scenario: Turn with Bus-Lane
|
Scenario: Turn with Bus-Lane
|
||||||
@@ -248,23 +248,23 @@ Feature: Turn Lane Guidance
|
|||||||
| fl | cross | | yes |
|
| fl | cross | | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes | intersection_lanes |
|
||||||
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true |
|
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true | ,left:false straight:false right:true |
|
||||||
| a,d | road,road,road | depart,use lane straight,arrive | ,left:false straight:true right:false, |
|
| a,d | road,road | depart,arrive | , | left:false straight:true right:false, |
|
||||||
| a,l | road,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
| a,l | road,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, | ,left:true straight:false right:false, |
|
||||||
| a,h | road,road,road | depart,continue uturn,arrive | ,left:true straight:false right:false, |
|
| a,h | road,road,road | depart,continue uturn,arrive | ,left:true straight:false right:false, | ,left:true straight:false right:false |
|
||||||
| k,d | cross,road,road | depart,turn right,arrive | ,left:false straight;right:true, |
|
| k,d | cross,road,road | depart,turn right,arrive | ,left:false straight;right:true, | ,left:false straight;right:true, |
|
||||||
| k,l | cross,cross,cross | depart,use lane straight,arrive | ,left:false straight;right:true, |
|
| k,l | cross,cross | depart,arrive | , | left:false straight;right:true, |
|
||||||
| k,h | cross,road,road | depart,turn left,arrive | ,left:true straight;right:false, |
|
| k,h | cross,road,road | depart,turn left,arrive | ,left:true straight;right:false, | ,left:true straight;right:false, |
|
||||||
| k,j | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight;right:false, |
|
| k,j | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight;right:false, | ,left:true straight;right:false, |
|
||||||
| e,l | road,cross,cross | depart,turn right,arrive | ,none:false straight:false straight;right:true, |
|
| e,l | road,cross,cross | depart,turn right,arrive | ,none:false straight:false straight;right:true, | ,none:false straight:false straight;right:true, |
|
||||||
| e,h | road,road | depart,arrive | ,none:false straight:true straight;right:true |
|
| e,h | road,road | depart,arrive | , | none:false straight:true straight;right:true, |
|
||||||
| e,j | road,cross,cross | depart,turn left,arrive | ,none:true straight:false straight;right:false, |
|
| e,j | road,cross,cross | depart,turn left,arrive | ,none:true straight:false straight;right:false, | ,none:true straight:false straight;right:false, |
|
||||||
| e,d | road,road,road | depart,continue uturn,arrive | ,none:true straight:false straight;right:false, |
|
| e,d | road,road,road | depart,continue uturn,arrive | ,none:true straight:false straight;right:false, | ,none:true straight:false straight;right:false, |
|
||||||
| i,h | cross,road,road | depart,turn right,arrive | ,, |
|
| i,h | cross,road,road | depart,turn right,arrive | ,, | |
|
||||||
| i,j | cross,cross,cross | depart,use lane straight,arrive | ,left:false straight:true, |
|
| i,j | cross,cross | depart,arrive | | left:false straight:true, |
|
||||||
| i,d | cross,road,road | depart,turn left,arrive | ,left:true straight:false, |
|
| i,d | cross,road,road | depart,turn left,arrive | ,left:true straight:false, | ,left:true straight:false, |
|
||||||
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, |
|
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, | ,left:true straight:false, |
|
||||||
|
|
||||||
#copy of former case to prevent further regression
|
#copy of former case to prevent further regression
|
||||||
@collapse @partition-lanes
|
@collapse @partition-lanes
|
||||||
@@ -295,13 +295,13 @@ Feature: Turn Lane Guidance
|
|||||||
| fl | cross | | yes |
|
| fl | cross | | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||||
| k,d | cross,road,road | depart,turn right,arrive | ,left:false straight;right:true, |
|
| k,d | cross,road,road | depart,turn right,arrive | ,left:false straight;right:true, |
|
||||||
| e,l | road,cross,cross | depart,turn right,arrive | ,none:false straight:false straight;right:true, |
|
| e,l | road,cross,cross | depart,turn right,arrive | ,none:false straight:false straight;right:true, |
|
||||||
| i,h | cross,road,road | depart,turn right,arrive | ,, |
|
| i,h | cross,road,road | depart,turn right,arrive | ,, |
|
||||||
| i,j | cross,cross | depart,arrive | , |
|
| i,j | cross,cross | depart,arrive | ;;left:false straight:true, |
|
||||||
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, |
|
| i,l | cross,cross,cross | depart,continue uturn,arrive | ;,left:true straight:false;left:true straight:false;left:false straight:true, |
|
||||||
|
|
||||||
@partition-lanes
|
@partition-lanes
|
||||||
Scenario: Turn Lanes at Segregated Road
|
Scenario: Turn Lanes at Segregated Road
|
||||||
@@ -347,7 +347,7 @@ Feature: Turn Lane Guidance
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | road,turn,turn | depart,turn right,arrive | ,none:false right:true, |
|
| a,e | road,turn,turn | depart,turn right,arrive | ,none:false right:true, |
|
||||||
| a,d | road,road | depart,arrive | , |
|
| a,d | road,road | depart,arrive | ;none:true right:false, |
|
||||||
|
|
||||||
@2654 @previous-lanes
|
@2654 @previous-lanes
|
||||||
Scenario: Turn Lanes Given earlier than actual turn
|
Scenario: Turn Lanes Given earlier than actual turn
|
||||||
@@ -368,11 +368,11 @@ Feature: Turn Lane Guidance
|
|||||||
| hk | second-turn | | |
|
| hk | second-turn | | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,k | road,second-turn,second-turn | depart,turn right,arrive | ,none:false right:true, |
|
| a,k | road,second-turn,second-turn | depart,turn right,arrive | ;,none:false right:true, |
|
||||||
| a,i | road,road | depart,arrive | , |
|
| a,i | road,road | depart,arrive | ;;none:true right:false, |
|
||||||
| i,j | road,first-turn,first-turn | depart,turn left,arrive | ,left:true none:false, |
|
| i,j | road,first-turn,first-turn | depart,turn left,arrive | ;,left:true none:false, |
|
||||||
| i,a | road,road | depart,arrive | , |
|
| i,a | road,road | depart,arrive | ;;left:false none:true, |
|
||||||
|
|
||||||
@previous-lanes
|
@previous-lanes
|
||||||
Scenario: Passing a one-way street
|
Scenario: Passing a one-way street
|
||||||
@@ -390,8 +390,8 @@ Feature: Turn Lane Guidance
|
|||||||
| cf | turn | | |
|
| cf | turn | | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true straight:false, |
|
| a,f | road,turn,turn | depart,turn left,arrive | ;left:true straight:false,left:true straight:false, |
|
||||||
|
|
||||||
@partition-lanes
|
@partition-lanes
|
||||||
Scenario: Passing a one-way street, partly pulled back lanes
|
Scenario: Passing a one-way street, partly pulled back lanes
|
||||||
@@ -411,10 +411,10 @@ Feature: Turn Lane Guidance
|
|||||||
| bg | right | | no |
|
| bg | right | | no |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true straight;right:false, |
|
| a,f | road,turn,turn | depart,turn left,arrive | ;left:true straight;right:false,left:true straight;right:false, |
|
||||||
| a,d | road,road | depart,arrive | , |
|
| a,d | road,road | depart,arrive | ;left:false straight;right:true;left:false straight;right:true, |
|
||||||
| a,g | road,right,right | depart,turn right,arrive | ,left:false straight;right:true, |
|
| a,g | road,right,right | depart,turn right,arrive | ,left:false straight;right:true, |
|
||||||
|
|
||||||
@partition-lanes @previous-lanes
|
@partition-lanes @previous-lanes
|
||||||
Scenario: Passing a one-way street, partly pulled back lanes, no through
|
Scenario: Passing a one-way street, partly pulled back lanes, no through
|
||||||
@@ -434,9 +434,9 @@ Feature: Turn Lane Guidance
|
|||||||
| bg | right | | no |
|
| bg | right | | no |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true right:false, |
|
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true right:false;left:true right:false, |
|
||||||
| a,g | road,right,right | depart,turn right,arrive | ,left:false right:true, |
|
| a,g | road,right,right | depart,turn right,arrive | ,left:false right:true, |
|
||||||
|
|
||||||
@todo @partition-lanes @previous-lanes
|
@todo @partition-lanes @previous-lanes
|
||||||
Scenario: Narrowing Turn Lanes
|
Scenario: Narrowing Turn Lanes
|
||||||
@@ -484,7 +484,7 @@ Feature: Turn Lane Guidance
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | road,road | depart,arrive | , |
|
| a,d | road,road | depart,arrive | ;straight:true right:false, |
|
||||||
| a,e | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
| a,e | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||||
|
|
||||||
@todo @roundabout
|
@todo @roundabout
|
||||||
@@ -554,9 +554,9 @@ Feature: Turn Lane Guidance
|
|||||||
| restriction | bc | dc | c | no_right_turn |
|
| restriction | bc | dc | c | no_right_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,g | road,cross,cross | depart,turn left,arrive | ,left:true left:true straight:false straight:false right:false, |
|
| a,g | road,cross,cross | depart,turn left,arrive | ,left:true left:true straight:false straight:false right:false;left:true left:true straight:false straight:false right:false, |
|
||||||
| a,e | road,road | depart,arrive | , |
|
| a,e | road,road | depart,arrive | ;left:false left:false straight:true straight:true right:false;left:false left:false straight:true straight:true right:false, |
|
||||||
|
|
||||||
#NEEDS TO BE INVESTIGATED. Turn restriction shouldn't be here. See #2867
|
#NEEDS TO BE INVESTIGATED. Turn restriction shouldn't be here. See #2867
|
||||||
@reverse @previous-lanes
|
@reverse @previous-lanes
|
||||||
@@ -589,11 +589,11 @@ Feature: Turn Lane Guidance
|
|||||||
| restriction | de | ef | e | no_left_turn |
|
| restriction | de | ef | e | no_left_turn |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | bearings | route | turns | lanes |
|
| from | to | bearings | route | turns | lanes |
|
||||||
| a | g | 180,180 180,180 | road,cross,cross | depart,turn right,arrive | ,none:false straight:false right:true, |
|
| a | g | 180,180 180,180 | road,cross,cross | depart,turn right,arrive | ;none:false straight:false right:true,none:false straight:false right:true, |
|
||||||
| a | h | 180,180 180,180 | road,cross,cross | depart,turn left,arrive | ,none:true straight:false right:false, |
|
| a | h | 180,180 180,180 | road,cross,cross | depart,turn left,arrive | ;none:true straight:false right:false,none:true straight:false right:false;, |
|
||||||
| a | i | 180,180 180,180 | road,road | depart,arrive | , |
|
| a | i | 180,180 180,180 | road,road | depart,arrive | ;none:true straight:true right:false;none:true straight:true right:false, |
|
||||||
| b | a | 90,2 270,2 | road,road,road | depart,continue uturn,arrive | ,none:true straight:false right:false, |
|
| b | a | 90,2 270,2 | road,road,road | depart,continue uturn,arrive | ,none:true straight:false right:false;, |
|
||||||
|
|
||||||
@reverse
|
@reverse
|
||||||
Scenario: Segregated Intersection Merges With Lanes
|
Scenario: Segregated Intersection Merges With Lanes
|
||||||
@@ -681,7 +681,7 @@ Feature: Turn Lane Guidance
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | road,road | depart,arrive | , |
|
| a,d | road,road | depart,arrive | ;straight:true straight:true straight;slight right:true slight right:false, |
|
||||||
| a,e | road,cross,cross | depart,turn slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
| a,e | road,cross,cross | depart,turn slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
||||||
|
|
||||||
@ramp
|
@ramp
|
||||||
@@ -700,7 +700,7 @@ Feature: Turn Lane Guidance
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | hwy,hwy | depart,arrive | , |
|
| a,d | hwy,hwy | depart,arrive | ;straight:true straight:true straight;slight right:true slight right:false, |
|
||||||
| a,e | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
| a,e | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
||||||
|
|
||||||
@todo
|
@todo
|
||||||
@@ -745,7 +745,7 @@ Feature: Turn Lane Guidance
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,c | hwy,hwy | depart,arrive | , |
|
| a,c | hwy,hwy | depart,arrive | ;straight:true straight:true slight right:false, |
|
||||||
| a,d | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false slight right:true, |
|
| a,d | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false slight right:true, |
|
||||||
|
|
||||||
@reverse
|
@reverse
|
||||||
@@ -766,8 +766,8 @@ Feature: Turn Lane Guidance
|
|||||||
| fgh | road | | primary | yes |
|
| fgh | road | | primary | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false straight:false,|
|
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false straight:false;,|
|
||||||
|
|
||||||
@reverse
|
@reverse
|
||||||
Scenario: Reverse Lane in Segregated Road with none
|
Scenario: Reverse Lane in Segregated Road with none
|
||||||
@@ -787,8 +787,8 @@ Feature: Turn Lane Guidance
|
|||||||
| fgh | road | | primary | yes |
|
| fgh | road | | primary | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false, |
|
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false;, |
|
||||||
|
|
||||||
@reverse
|
@reverse
|
||||||
Scenario: Reverse Lane in Segregated Road with none, Service Turn Prior
|
Scenario: Reverse Lane in Segregated Road with none, Service Turn Prior
|
||||||
@@ -810,8 +810,8 @@ Feature: Turn Lane Guidance
|
|||||||
| ji | park | | service | no |
|
| ji | park | | service | no |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false, |
|
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false;, |
|
||||||
|
|
||||||
@simple
|
@simple
|
||||||
Scenario: Don't collapse everything to u-turn / too wide
|
Scenario: Don't collapse everything to u-turn / too wide
|
||||||
@@ -835,9 +835,9 @@ Feature: Turn Lane Guidance
|
|||||||
| cf | secondary | bottom | |
|
| cf | secondary | bottom | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | turns | route | lanes |
|
| waypoints | turns | route | lanes |
|
||||||
| a,d | depart,continue right,turn right,arrive | road,road,road,road | ,straight:false right:true,, |
|
| a,d | depart,continue right,continue right,arrive | road,road,road,road | ,straight:false right:true,, |
|
||||||
| d,a | depart,continue left,turn left,arrive | road,road,road,road | ,left:true straight:false,, |
|
| d,a | depart,continue left,continue left,arrive | road,road,road,road | ,left:true straight:false,, |
|
||||||
|
|
||||||
@simple
|
@simple
|
||||||
Scenario: Merge Lanes Onto Freeway
|
Scenario: Merge Lanes Onto Freeway
|
||||||
@@ -873,9 +873,9 @@ Feature: Turn Lane Guidance
|
|||||||
| ab | on | motorway_link | |
|
| ab | on | motorway_link | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,j | on,xbcj | depart,arrive | , |
|
| a,j | on,xbcj | depart,arrive | ;;none:true slight right:false, |
|
||||||
| a,i | on,off,off | depart,turn right,arrive | ,none:false slight right:true, |
|
| a,i | on,off,off | depart,turn right,arrive | ;,none:false slight right:true, |
|
||||||
|
|
||||||
#http://www.openstreetmap.org/#map=17/52.47414/13.35712
|
#http://www.openstreetmap.org/#map=17/52.47414/13.35712
|
||||||
@todo @ramp @2645
|
@todo @ramp @2645
|
||||||
@@ -929,8 +929,8 @@ Feature: Turn Lane Guidance
|
|||||||
| cf | turn | primary | |
|
| cf | turn | primary | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| x,d | road,road | depart,arrive | , |
|
| x,d | road,road | depart,arrive | ;straight;right:true;straight;right:true, |
|
||||||
|
|
||||||
@partition-lanes
|
@partition-lanes
|
||||||
Scenario: Partitioned turn, Slight Curve - maxspeed
|
Scenario: Partitioned turn, Slight Curve - maxspeed
|
||||||
@@ -952,9 +952,9 @@ Feature: Turn Lane Guidance
|
|||||||
| dce | cross | primary | yes | | 1 |
|
| dce | cross | primary | yes | | 1 |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes | locations |
|
| waypoints | route | turns | lanes | locations |
|
||||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
|
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
|
||||||
| a,e | road,cross,cross | depart,end of road left,arrive | ,left:true right:false, | a,c,e |
|
| a,e | road,cross,cross | depart,end of road left,arrive | ;left:true right:false,left:true right:false, | a,c,e |
|
||||||
|
|
||||||
Scenario: Partitioned turn, Slight Curve
|
Scenario: Partitioned turn, Slight Curve
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -975,9 +975,9 @@ Feature: Turn Lane Guidance
|
|||||||
| dce | cross | primary | yes | |
|
| dce | cross | primary | yes | |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes | locations |
|
| waypoints | route | turns | lanes | locations |
|
||||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
|
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
|
||||||
| a,e | road,cross,cross | depart,end of road left,arrive | ,left:true right:false, | a,c,e |
|
| a,e | road,cross,cross | depart,end of road left,arrive | ;left:true right:false,left:true right:false, | a,c,e |
|
||||||
|
|
||||||
Scenario: Lane Parsing Issue #2694
|
Scenario: Lane Parsing Issue #2694
|
||||||
Given the node map
|
Given the node map
|
||||||
@@ -1193,7 +1193,7 @@ Feature: Turn Lane Guidance
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,e | road,cross,cross | depart,turn right,arrive | ,left:false none:false none:true, |
|
| a,e | road,cross,cross | depart,turn right,arrive | ,left:false none:false none:true, |
|
||||||
| a,c | road,road | depart,arrive | , |
|
| a,c | road,road | depart,arrive | ;left:false none:true none:true, |
|
||||||
|
|
||||||
@3379
|
@3379
|
||||||
Scenario: Don't Turn through potential through lanes
|
Scenario: Don't Turn through potential through lanes
|
||||||
@@ -1214,7 +1214,7 @@ Feature: Turn Lane Guidance
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes |
|
| waypoints | route | turns | lanes |
|
||||||
| a,d | road,cross,cross | depart,turn left,arrive | ,none:true none:false right:false, |
|
| a,d | road,cross,cross | depart,turn left,arrive | ,none:true none:false right:false, |
|
||||||
| a,c | road,road | depart,arrive | , |
|
| a,c | road,road | depart,arrive | ;none:true none:true right:false, |
|
||||||
|
|
||||||
@4189
|
@4189
|
||||||
Scenario: U-turn after a traffic light
|
Scenario: U-turn after a traffic light
|
||||||
@@ -1242,5 +1242,5 @@ Feature: Turn Lane Guidance
|
|||||||
| mdhk | road2 | 2 | | yes |
|
| mdhk | road2 | 2 | | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns | lanes | locations |
|
| waypoints | route | turns | lanes | locations |
|
||||||
| a,f | road1,road1,road1 | depart,continue uturn,arrive | ,left:true straight:false straight;right:false, | a,d,f |
|
| a,f | road1,road1,road1 | depart,continue uturn,arrive | ;left:false straight:true straight;right:false,left:true straight:false straight;right:false;;, | a,d,f |
|
||||||
|
|||||||
@@ -788,9 +788,9 @@ Feature: Simple Turns
|
|||||||
| bg | primary | yes |
|
| bg | primary | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
|
| a,d | abc,bd,bd | depart,turn right,arrive |
|
||||||
| a,f | abc,bf,bf | depart,turn right,arrive |
|
| a,f | abc,bf,bf | depart,turn slight right,arrive |
|
||||||
|
|
||||||
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 3
|
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 3
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# Broken see issue #4065
|
@contract @options @edge-weight-updates-over-factor
|
||||||
@contract @options @edge-weight-updates-over-factor @todo
|
|
||||||
Feature: osrm-contract command line option: edge-weight-updates-over-factor
|
Feature: osrm-contract command line option: edge-weight-updates-over-factor
|
||||||
|
|
||||||
Background: Log edge weight updates over given factor
|
Background: Log edge weight updates over given factor
|
||||||
@@ -22,6 +21,7 @@ Feature: osrm-contract command line option: edge-weight-updates-over-factor
|
|||||||
|
|
||||||
Scenario: Logging weight with updates over factor of 2, long segment
|
Scenario: Logging weight with updates over factor of 2, long segment
|
||||||
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
|
And the data has been partitioned
|
||||||
When I run "osrm-contract --edge-weight-updates-over-factor 2 --segment-speed-file {speeds_file} {processed_file}"
|
When I run "osrm-contract --edge-weight-updates-over-factor 2 --segment-speed-file {speeds_file} {processed_file}"
|
||||||
Then stderr should not contain "Speed values were used to update 2 segment(s)"
|
Then stderr should not contain "Speed values were used to update 2 segment(s)"
|
||||||
And stderr should contain "Segment: 1,2"
|
And stderr should contain "Segment: 1,2"
|
||||||
@@ -33,15 +33,25 @@ Feature: osrm-contract command line option: edge-weight-updates-over-factor
|
|||||||
|
|
||||||
|
|
||||||
Scenario: Logging using weigts as durations for non-duration profile
|
Scenario: Logging using weigts as durations for non-duration profile
|
||||||
Given the profile file "testbot" extended with
|
Given the profile file
|
||||||
"""
|
"""
|
||||||
properties.weight_name = 'steps'
|
local functions = require('testbot')
|
||||||
function way_function(way, result)
|
functions.setup_testbot = functions.setup
|
||||||
|
|
||||||
|
functions.setup = function()
|
||||||
|
local profile = functions.setup_testbot()
|
||||||
|
profile.properties.weight_name = 'steps'
|
||||||
|
return profile
|
||||||
|
end
|
||||||
|
|
||||||
|
functions.process_way = function(profile, way, result)
|
||||||
result.forward_mode = mode.driving
|
result.forward_mode = mode.driving
|
||||||
result.backward_mode = mode.driving
|
result.backward_mode = mode.driving
|
||||||
result.weight = 1
|
result.weight = 1
|
||||||
result.duration = 1
|
result.duration = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return functions
|
||||||
"""
|
"""
|
||||||
And the data has been saved to disk
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
|||||||
@@ -18,5 +18,5 @@ Feature: osrm-contract command line options: files
|
|||||||
Scenario: osrm-contract - Missing input file
|
Scenario: osrm-contract - Missing input file
|
||||||
When I try to run "osrm-contract over-the-rainbow.osrm"
|
When I try to run "osrm-contract over-the-rainbow.osrm"
|
||||||
And stderr should contain "over-the-rainbow.osrm"
|
And stderr should contain "over-the-rainbow.osrm"
|
||||||
And stderr should contain "not found"
|
And stderr should contain "Missing/Broken"
|
||||||
And it should exit with an error
|
And it should exit with an error
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Feature: osrm-contract command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And stdout should contain "--core"
|
And stdout should contain "--core"
|
||||||
@@ -22,6 +23,7 @@ Feature: osrm-contract command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And stdout should contain "--core"
|
And stdout should contain "--core"
|
||||||
@@ -36,6 +38,7 @@ Feature: osrm-contract command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And stdout should contain "--core"
|
And stdout should contain "--core"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Feature: osrm-contract command line options: version
|
|||||||
Given the profile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: osrm-contract - Version, short
|
Scenario: osrm-contract - Version, short
|
||||||
When I run "osrm-contract --v"
|
When I run "osrm-contract -v"
|
||||||
Then stderr should be empty
|
Then stderr should be empty
|
||||||
And stdout should contain 1 line
|
And stdout should contain 1 line
|
||||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||||
|
|||||||
@@ -19,5 +19,5 @@ Feature: osrm-contract command line options: files
|
|||||||
Scenario: osrm-customize - Missing input file
|
Scenario: osrm-customize - Missing input file
|
||||||
When I try to run "osrm-customize over-the-rainbow.osrm"
|
When I try to run "osrm-customize over-the-rainbow.osrm"
|
||||||
And stderr should contain "over-the-rainbow.osrm"
|
And stderr should contain "over-the-rainbow.osrm"
|
||||||
And stderr should contain "not found"
|
And stderr should contain "Missing/Broken"
|
||||||
And it should exit with an error
|
And it should exit with an error
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Feature: osrm-customize command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And it should exit with an error
|
And it should exit with an error
|
||||||
@@ -19,6 +20,7 @@ Feature: osrm-customize command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And it should exit successfully
|
And it should exit successfully
|
||||||
@@ -30,6 +32,7 @@ Feature: osrm-customize command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And it should exit successfully
|
And it should exit successfully
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Feature: osrm-customize command line options: version
|
|||||||
Given the profile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: osrm-customize - Version, short
|
Scenario: osrm-customize - Version, short
|
||||||
When I run "osrm-customize --v"
|
When I run "osrm-customize -v"
|
||||||
Then stderr should be empty
|
Then stderr should be empty
|
||||||
And stdout should contain 1 line
|
And stdout should contain 1 line
|
||||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Feature: osrm-extract command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--profile"
|
And stdout should contain "--profile"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
@@ -24,6 +25,7 @@ Feature: osrm-extract command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--profile"
|
And stdout should contain "--profile"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
@@ -37,6 +39,7 @@ Feature: osrm-extract command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--profile"
|
And stdout should contain "--profile"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
|
|||||||
@@ -12,15 +12,20 @@ Feature: osrm-extract lua ways:get_nodes()
|
|||||||
And the data has been saved to disk
|
And the data has been saved to disk
|
||||||
|
|
||||||
Scenario: osrm-extract - Passing base file
|
Scenario: osrm-extract - Passing base file
|
||||||
Given the profile file "testbot" extended with
|
Given the profile file
|
||||||
"""
|
"""
|
||||||
function way_function(way, result)
|
functions = require('testbot')
|
||||||
|
|
||||||
|
function way_function(profile, way, result)
|
||||||
for _, node in ipairs(way:get_nodes()) do
|
for _, node in ipairs(way:get_nodes()) do
|
||||||
print('node id ' .. node:id())
|
print('node id ' .. node:id())
|
||||||
end
|
end
|
||||||
result.forward_mode = mode.driving
|
result.forward_mode = mode.driving
|
||||||
result.forward_speed = 1
|
result.forward_speed = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
functions.process_way = way_function
|
||||||
|
return functions
|
||||||
"""
|
"""
|
||||||
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
Then it should exit successfully
|
Then it should exit successfully
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Feature: osrm-extract command line options: version
|
|||||||
Given the profile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: osrm-extract - Version, short
|
Scenario: osrm-extract - Version, short
|
||||||
When I run "osrm-extract --v"
|
When I run "osrm-extract -v"
|
||||||
Then stderr should be empty
|
Then stderr should be empty
|
||||||
And stdout should contain 1 line
|
And stdout should contain 1 line
|
||||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Feature: osrm-partition command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And stdout should contain "--balance"
|
And stdout should contain "--balance"
|
||||||
@@ -24,6 +25,7 @@ Feature: osrm-partition command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And stdout should contain "--balance"
|
And stdout should contain "--balance"
|
||||||
@@ -40,6 +42,7 @@ Feature: osrm-partition command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--threads"
|
And stdout should contain "--threads"
|
||||||
And stdout should contain "--balance"
|
And stdout should contain "--balance"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Feature: osrm-partition command line options: version
|
|||||||
Given the profile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: osrm-partition - Version, short
|
Scenario: osrm-partition - Version, short
|
||||||
When I run "osrm-partition --v"
|
When I run "osrm-partition -v"
|
||||||
Then stderr should be empty
|
Then stderr should be empty
|
||||||
And stdout should contain 1 line
|
And stdout should contain 1 line
|
||||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
Feature: Invalid profile API versions
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given a grid size of 100 meters
|
||||||
|
|
||||||
|
Scenario: Profile API version too low
|
||||||
|
Given the profile file
|
||||||
|
"""
|
||||||
|
api_version = -1
|
||||||
|
"""
|
||||||
|
And the node map
|
||||||
|
"""
|
||||||
|
ab
|
||||||
|
"""
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
When I try to run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
|
Then it should exit with an error
|
||||||
|
And stderr should contain "Invalid profile API version"
|
||||||
|
|
||||||
|
Scenario: Profile API version too high
|
||||||
|
Given the profile file
|
||||||
|
"""
|
||||||
|
api_version = 3
|
||||||
|
"""
|
||||||
|
And the node map
|
||||||
|
"""
|
||||||
|
ab
|
||||||
|
"""
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
When I try to run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
|
Then it should exit with an error
|
||||||
|
And stderr should contain "Invalid profile API version"
|
||||||
@@ -1,84 +1,36 @@
|
|||||||
Feature: Profile API version 0
|
Feature: Profile API version 0
|
||||||
|
|
||||||
Background:
|
Scenario: Profile api version 0
|
||||||
Given a grid size of 100 meters
|
|
||||||
|
|
||||||
Scenario: Not-defined API version
|
|
||||||
Given the profile file
|
Given the profile file
|
||||||
"""
|
"""
|
||||||
function way_function(way, result)
|
api_version = 0
|
||||||
result.forward_mode = mode.driving
|
-- set profile properties
|
||||||
result.forward_speed = 1
|
properties.u_turn_penalty = 20
|
||||||
end
|
properties.traffic_signal_penalty = 2
|
||||||
"""
|
properties.max_speed_for_map_matching = 180/3.6
|
||||||
And the node map
|
properties.use_turn_restrictions = true
|
||||||
"""
|
properties.continue_straight_at_waypoint = true
|
||||||
ab
|
properties.left_hand_driving = false
|
||||||
"""
|
properties.weight_name = 'duration'
|
||||||
And the ways
|
function node_function (node, result)
|
||||||
| nodes |
|
print ('node_function ' .. node:id())
|
||||||
| ab |
|
end
|
||||||
And the data has been saved to disk
|
function way_function(way, result)
|
||||||
|
result.name = way:get_value_by_key('name')
|
||||||
When I try to run "osrm-extract --profile {profile_file} {osm_file}"
|
result.forward_mode = mode.driving
|
||||||
Then it should exit successfully
|
result.backward_mode = mode.driving
|
||||||
And stderr should not contain "Invalid profile API version"
|
result.forward_speed = 36
|
||||||
|
result.backward_speed = 36
|
||||||
Scenario: Out-bound API version
|
print ('way_function ' .. way:id() .. ' ' .. result.name)
|
||||||
Given the profile file
|
end
|
||||||
"""
|
function turn_function (angle)
|
||||||
api_version = 2
|
print('turn_function ' .. angle)
|
||||||
"""
|
return angle == 0 and 0 or 42
|
||||||
And the node map
|
end
|
||||||
"""
|
function segment_function (source, target, distance, weight)
|
||||||
ab
|
print ('segment_function ' .. source.lon .. ' ' .. source.lat)
|
||||||
"""
|
end
|
||||||
And the ways
|
"""
|
||||||
| nodes |
|
|
||||||
| ab |
|
|
||||||
And the data has been saved to disk
|
|
||||||
|
|
||||||
When I try to run "osrm-extract --profile {profile_file} {osm_file}"
|
|
||||||
Then it should exit with an error
|
|
||||||
And stderr should contain "Invalid profile API version"
|
|
||||||
|
|
||||||
|
|
||||||
Scenario: Basic profile function calls and property values
|
|
||||||
Given the profile file
|
|
||||||
"""
|
|
||||||
api_version = 0
|
|
||||||
|
|
||||||
-- set profile properties
|
|
||||||
properties.u_turn_penalty = 20
|
|
||||||
properties.traffic_signal_penalty = 2
|
|
||||||
properties.max_speed_for_map_matching = 180/3.6
|
|
||||||
properties.use_turn_restrictions = true
|
|
||||||
properties.continue_straight_at_waypoint = true
|
|
||||||
properties.left_hand_driving = false
|
|
||||||
properties.weight_name = 'duration'
|
|
||||||
|
|
||||||
function node_function (node, result)
|
|
||||||
print ('node_function ' .. node:id())
|
|
||||||
end
|
|
||||||
|
|
||||||
function way_function(way, result)
|
|
||||||
result.name = way:get_value_by_key('name')
|
|
||||||
result.forward_mode = mode.driving
|
|
||||||
result.backward_mode = mode.driving
|
|
||||||
result.forward_speed = 36
|
|
||||||
result.backward_speed = 36
|
|
||||||
print ('way_function ' .. way:id() .. ' ' .. result.name)
|
|
||||||
end
|
|
||||||
|
|
||||||
function turn_function (angle)
|
|
||||||
print('turn_function ' .. angle)
|
|
||||||
return angle == 0 and 0 or 42
|
|
||||||
end
|
|
||||||
|
|
||||||
function segment_function (source, target, distance, weight)
|
|
||||||
print ('segment_function ' .. source.lon .. ' ' .. source.lat)
|
|
||||||
end
|
|
||||||
"""
|
|
||||||
And the node map
|
And the node map
|
||||||
"""
|
"""
|
||||||
a
|
a
|
||||||
@@ -105,3 +57,60 @@ end
|
|||||||
| a | b | ac,cb,cb | 24.2s |
|
| a | b | ac,cb,cb | 24.2s |
|
||||||
| a | d | ac,cd,cd | 24.2s |
|
| a | d | ac,cd,cd | 24.2s |
|
||||||
| a | e | ac,ce | 20s |
|
| a | e | ac,ce | 20s |
|
||||||
|
|
||||||
|
Scenario: Profile version undefined, assume version 0
|
||||||
|
Given the profile file
|
||||||
|
"""
|
||||||
|
-- set profile properties
|
||||||
|
properties.u_turn_penalty = 20
|
||||||
|
properties.traffic_signal_penalty = 2
|
||||||
|
properties.max_speed_for_map_matching = 180/3.6
|
||||||
|
properties.use_turn_restrictions = true
|
||||||
|
properties.continue_straight_at_waypoint = true
|
||||||
|
properties.left_hand_driving = false
|
||||||
|
properties.weight_name = 'duration'
|
||||||
|
function node_function (node, result)
|
||||||
|
print ('node_function ' .. node:id())
|
||||||
|
end
|
||||||
|
function way_function(way, result)
|
||||||
|
result.name = way:get_value_by_key('name')
|
||||||
|
result.forward_mode = mode.driving
|
||||||
|
result.backward_mode = mode.driving
|
||||||
|
result.forward_speed = 36
|
||||||
|
result.backward_speed = 36
|
||||||
|
print ('way_function ' .. way:id() .. ' ' .. result.name)
|
||||||
|
end
|
||||||
|
function turn_function (angle)
|
||||||
|
print('turn_function ' .. angle)
|
||||||
|
return angle == 0 and 0 or 42
|
||||||
|
end
|
||||||
|
function segment_function (source, target, distance, weight)
|
||||||
|
print ('segment_function ' .. source.lon .. ' ' .. source.lat)
|
||||||
|
end
|
||||||
|
"""
|
||||||
|
And the node map
|
||||||
|
"""
|
||||||
|
a
|
||||||
|
b c d
|
||||||
|
e
|
||||||
|
"""
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ac |
|
||||||
|
| cb |
|
||||||
|
| cd |
|
||||||
|
| ce |
|
||||||
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
|
Then it should exit successfully
|
||||||
|
And stdout should contain "node_function"
|
||||||
|
And stdout should contain "way_function"
|
||||||
|
And stdout should contain "turn_function"
|
||||||
|
And stdout should contain "segment_function"
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | time |
|
||||||
|
| a | b | ac,cb,cb | 24.2s |
|
||||||
|
| a | d | ac,cd,cd | 24.2s |
|
||||||
|
| a | e | ac,ce | 20s |
|
||||||
@@ -6,41 +6,42 @@ Feature: Profile API version 1
|
|||||||
Scenario: Basic profile function calls and property values
|
Scenario: Basic profile function calls and property values
|
||||||
Given the profile file
|
Given the profile file
|
||||||
"""
|
"""
|
||||||
api_version = 1
|
api_version = 1
|
||||||
|
|
||||||
-- set profile properties
|
-- set profile properties
|
||||||
properties.max_speed_for_map_matching = 180/3.6
|
properties.max_speed_for_map_matching = 180/3.6
|
||||||
properties.use_turn_restrictions = true
|
properties.use_turn_restrictions = true
|
||||||
properties.continue_straight_at_waypoint = true
|
properties.continue_straight_at_waypoint = true
|
||||||
properties.weight_name = 'test_version1'
|
properties.weight_name = 'test_version1'
|
||||||
properties.weight_precision = 2
|
properties.weight_precision = 2
|
||||||
|
|
||||||
assert(properties.max_turn_weight == 327.67)
|
assert(properties.max_turn_weight == 327.67)
|
||||||
|
|
||||||
function node_function (node, result)
|
function node_function (node, result)
|
||||||
print ('node_function ' .. node:id())
|
print(node, result)
|
||||||
end
|
print ('node_function ' .. node:id())
|
||||||
|
end
|
||||||
|
|
||||||
function way_function(way, result)
|
function way_function(way, result)
|
||||||
result.name = way:get_value_by_key('name')
|
result.name = way:get_value_by_key('name')
|
||||||
result.weight = 10
|
result.weight = 10
|
||||||
result.forward_mode = mode.driving
|
result.forward_mode = mode.driving
|
||||||
result.backward_mode = mode.driving
|
result.backward_mode = mode.driving
|
||||||
result.forward_speed = 36
|
result.forward_speed = 36
|
||||||
result.backward_speed = 36
|
result.backward_speed = 36
|
||||||
print ('way_function ' .. way:id() .. ' ' .. result.name)
|
print ('way_function ' .. way:id() .. ' ' .. result.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
function turn_function (turn)
|
function turn_function (turn)
|
||||||
print('turn_function', turn.angle, turn.turn_type, turn.direction_modifier, turn.has_traffic_light)
|
print('turn_function', turn.angle, turn.turn_type, turn.direction_modifier, turn.has_traffic_light)
|
||||||
turn.weight = turn.angle == 0 and 0 or 4.2
|
turn.weight = turn.angle == 0 and 0 or 4.2
|
||||||
turn.duration = turn.weight
|
turn.duration = turn.weight
|
||||||
end
|
end
|
||||||
|
|
||||||
function segment_function (segment)
|
function segment_function (segment)
|
||||||
print ('segment_function ' .. segment.source.lon .. ' ' .. segment.source.lat)
|
print ('segment_function ' .. segment.source.lon .. ' ' .. segment.source.lat)
|
||||||
end
|
end
|
||||||
"""
|
"""
|
||||||
And the node map
|
And the node map
|
||||||
"""
|
"""
|
||||||
a
|
a
|
||||||
@@ -67,3 +68,165 @@ end
|
|||||||
| a | b | ac,cb,cb | 19.2s |
|
| a | b | ac,cb,cb | 19.2s |
|
||||||
| a | d | ac,cd,cd | 19.2s |
|
| a | d | ac,cd,cd | 19.2s |
|
||||||
| a | e | ac,ce | 20s |
|
| a | e | ac,ce | 20s |
|
||||||
|
|
||||||
|
Scenario: Basic profile function calls and property values
|
||||||
|
Given the profile file
|
||||||
|
"""
|
||||||
|
api_version = 1
|
||||||
|
|
||||||
|
-- set profile properties
|
||||||
|
properties.max_speed_for_map_matching = 180/3.6
|
||||||
|
properties.use_turn_restrictions = true
|
||||||
|
properties.continue_straight_at_waypoint = true
|
||||||
|
properties.weight_name = 'test_version1'
|
||||||
|
properties.weight_precision = 2
|
||||||
|
|
||||||
|
assert(properties.max_turn_weight == 327.67)
|
||||||
|
|
||||||
|
function node_function (node, result)
|
||||||
|
print(node, result)
|
||||||
|
print ('node_function ' .. node:id())
|
||||||
|
end
|
||||||
|
|
||||||
|
function way_function(way, result)
|
||||||
|
result.name = way:get_value_by_key('name')
|
||||||
|
result.weight = 10
|
||||||
|
result.forward_mode = mode.driving
|
||||||
|
result.backward_mode = mode.driving
|
||||||
|
result.forward_speed = 36
|
||||||
|
result.backward_speed = 36
|
||||||
|
print ('way_function ' .. way:id() .. ' ' .. result.name)
|
||||||
|
end
|
||||||
|
|
||||||
|
function turn_function (turn)
|
||||||
|
print('turn_function', turn.angle, turn.turn_type, turn.direction_modifier, turn.has_traffic_light)
|
||||||
|
turn.weight = turn.angle == 0 and 0 or 4.2
|
||||||
|
turn.duration = turn.weight
|
||||||
|
end
|
||||||
|
|
||||||
|
function segment_function (segment)
|
||||||
|
print ('segment_function ' .. segment.source.lon .. ' ' .. segment.source.lat)
|
||||||
|
end
|
||||||
|
"""
|
||||||
|
And the node map
|
||||||
|
"""
|
||||||
|
a
|
||||||
|
bcd
|
||||||
|
e
|
||||||
|
"""
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ac |
|
||||||
|
| cb |
|
||||||
|
| cd |
|
||||||
|
| ce |
|
||||||
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
|
Then it should exit successfully
|
||||||
|
And stdout should contain "node_function"
|
||||||
|
And stdout should contain "way_function"
|
||||||
|
And stdout should contain "turn_function"
|
||||||
|
And stdout should contain "segment_function"
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | time |
|
||||||
|
| a | b | ac,cb,cb | 19.2s |
|
||||||
|
| a | d | ac,cd,cd | 19.2s |
|
||||||
|
| a | e | ac,ce | 20s |
|
||||||
|
|
||||||
|
Scenario: Weighting based on raster sources
|
||||||
|
Given the profile file
|
||||||
|
"""
|
||||||
|
api_version = 1
|
||||||
|
|
||||||
|
properties.force_split_edges = true
|
||||||
|
|
||||||
|
function source_function()
|
||||||
|
local path = os.getenv('OSRM_RASTER_SOURCE')
|
||||||
|
if not path then
|
||||||
|
path = 'rastersource.asc'
|
||||||
|
end
|
||||||
|
raster_source = sources:load(
|
||||||
|
path,
|
||||||
|
0, -- lon_min
|
||||||
|
0.1, -- lon_max
|
||||||
|
0, -- lat_min
|
||||||
|
0.1, -- lat_max
|
||||||
|
5, -- nrows
|
||||||
|
4 -- ncols
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function way_function (way, result)
|
||||||
|
result.name = way:get_value_by_key('name')
|
||||||
|
result.forward_mode = mode.cycling
|
||||||
|
result.backward_mode = mode.cycling
|
||||||
|
result.forward_speed = 15
|
||||||
|
result.backward_speed = 15
|
||||||
|
end
|
||||||
|
|
||||||
|
function segment_function (segment)
|
||||||
|
local sourceData = sources:query(raster_source, segment.source.lon, segment.source.lat)
|
||||||
|
local targetData = sources:query(raster_source, segment.target.lon, segment.target.lat)
|
||||||
|
io.write('evaluating segment: ' .. sourceData.datum .. ' ' .. targetData.datum .. '\n')
|
||||||
|
local invalid = sourceData.invalid_data()
|
||||||
|
local scaled_weight = segment.weight
|
||||||
|
local scaled_duration = segment.duration
|
||||||
|
|
||||||
|
if sourceData.datum ~= invalid and targetData.datum ~= invalid then
|
||||||
|
local slope = (targetData.datum - sourceData.datum) / segment.distance
|
||||||
|
scaled_weight = scaled_weight / (1.0 - (slope * 5.0))
|
||||||
|
scaled_duration = scaled_duration / (1.0 - (slope * 5.0))
|
||||||
|
io.write(' slope: ' .. slope .. '\n')
|
||||||
|
io.write(' was weight: ' .. segment.weight .. '\n')
|
||||||
|
io.write(' new weight: ' .. scaled_weight .. '\n')
|
||||||
|
io.write(' was duration: ' .. segment.duration .. '\n')
|
||||||
|
io.write(' new duration: ' .. scaled_duration .. '\n')
|
||||||
|
end
|
||||||
|
|
||||||
|
segment.weight = scaled_weight
|
||||||
|
segment.duration = scaled_duration
|
||||||
|
end
|
||||||
|
"""
|
||||||
|
And the node locations
|
||||||
|
| node | lat | lon |
|
||||||
|
| a | 0.1 | 0.1 |
|
||||||
|
| b | 0.05 | 0.1 |
|
||||||
|
| c | 0.0 | 0.1 |
|
||||||
|
| d | 0.05 | 0.03 |
|
||||||
|
| e | 0.05 | 0.066 |
|
||||||
|
| f | 0.075 | 0.066 |
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| ab | primary |
|
||||||
|
| ad | primary |
|
||||||
|
| bc | primary |
|
||||||
|
| dc | primary |
|
||||||
|
| de | primary |
|
||||||
|
| eb | primary |
|
||||||
|
| df | primary |
|
||||||
|
| fb | primary |
|
||||||
|
And the raster source
|
||||||
|
"""
|
||||||
|
0 0 0 0
|
||||||
|
0 0 0 250
|
||||||
|
0 0 250 500
|
||||||
|
0 0 0 250
|
||||||
|
0 0 0 0
|
||||||
|
"""
|
||||||
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | speed |
|
||||||
|
| a | b | ab,ab | 8 km/h |
|
||||||
|
| b | a | ab,ab | 22 km/h |
|
||||||
|
| a | c | ab,bc,bc | 12 km/h |
|
||||||
|
| b | c | bc,bc | 22 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 |
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
Feature: Profile API version 2
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given a grid size of 100 meters
|
||||||
|
|
||||||
|
Scenario: Basic profile function calls and property values
|
||||||
|
Given the profile file
|
||||||
|
"""
|
||||||
|
api_version = 2
|
||||||
|
|
||||||
|
Set = require('lib/set')
|
||||||
|
Sequence = require('lib/sequence')
|
||||||
|
Handlers = require("lib/way_handlers")
|
||||||
|
find_access_tag = require("lib/access").find_access_tag
|
||||||
|
limit = require("lib/maxspeed").limit
|
||||||
|
|
||||||
|
|
||||||
|
function setup()
|
||||||
|
return {
|
||||||
|
properties = {
|
||||||
|
max_speed_for_map_matching = 180/3.6,
|
||||||
|
use_turn_restrictions = true,
|
||||||
|
continue_straight_at_waypoint = true,
|
||||||
|
weight_name = 'test_version2',
|
||||||
|
weight_precision = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function process_node(profile, node, result)
|
||||||
|
print ('process_node ' .. node:id())
|
||||||
|
end
|
||||||
|
|
||||||
|
function process_way(profile, way, result)
|
||||||
|
result.name = way:get_value_by_key('name')
|
||||||
|
result.weight = 10
|
||||||
|
result.forward_mode = mode.driving
|
||||||
|
result.backward_mode = mode.driving
|
||||||
|
result.forward_speed = 36
|
||||||
|
result.backward_speed = 36
|
||||||
|
print ('process_way ' .. way:id() .. ' ' .. result.name)
|
||||||
|
end
|
||||||
|
|
||||||
|
function process_turn (profile, turn)
|
||||||
|
print('process_turn', turn.angle, turn.turn_type, turn.direction_modifier, turn.has_traffic_light)
|
||||||
|
turn.weight = turn.angle == 0 and 0 or 4.2
|
||||||
|
turn.duration = turn.weight
|
||||||
|
end
|
||||||
|
|
||||||
|
function process_segment (profile, segment)
|
||||||
|
print ('process_segment ' .. segment.source.lon .. ' ' .. segment.source.lat)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
setup = setup,
|
||||||
|
process_node = process_node,
|
||||||
|
process_way = process_way,
|
||||||
|
process_segment = process_segment,
|
||||||
|
process_turn = process_turn
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
And the node map
|
||||||
|
"""
|
||||||
|
a
|
||||||
|
bcd
|
||||||
|
e
|
||||||
|
"""
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ac |
|
||||||
|
| cb |
|
||||||
|
| cd |
|
||||||
|
| ce |
|
||||||
|
And the data has been saved to disk
|
||||||
|
|
||||||
|
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||||
|
Then it should exit successfully
|
||||||
|
And stdout should contain "process_node"
|
||||||
|
And stdout should contain "process_way"
|
||||||
|
And stdout should contain "process_turn"
|
||||||
|
And stdout should contain "process_segment"
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | time |
|
||||||
|
| a | b | ac,cb,cb | 19.2s |
|
||||||
|
| a | d | ac,cd,cd | 19.2s |
|
||||||
|
| a | e | ac,ce | 20s |
|
||||||
@@ -11,6 +11,7 @@ Feature: osrm-routed command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "--trial"
|
And stdout should contain "--trial"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--ip"
|
And stdout should contain "--ip"
|
||||||
@@ -30,6 +31,7 @@ Feature: osrm-routed command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "--trial"
|
And stdout should contain "--trial"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--ip"
|
And stdout should contain "--ip"
|
||||||
@@ -49,6 +51,7 @@ Feature: osrm-routed command line options: help
|
|||||||
And stdout should contain "Options:"
|
And stdout should contain "Options:"
|
||||||
And stdout should contain "--version"
|
And stdout should contain "--version"
|
||||||
And stdout should contain "--help"
|
And stdout should contain "--help"
|
||||||
|
And stdout should contain "--verbosity"
|
||||||
And stdout should contain "--trial"
|
And stdout should contain "--trial"
|
||||||
And stdout should contain "Configuration:"
|
And stdout should contain "Configuration:"
|
||||||
And stdout should contain "--ip"
|
And stdout should contain "--ip"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Feature: osrm-routed command line options: version
|
|||||||
Given the profile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: osrm-routed - Version, short
|
Scenario: osrm-routed - Version, short
|
||||||
When I run "osrm-routed --v"
|
When I run "osrm-routed -v"
|
||||||
Then stderr should be empty
|
Then stderr should be empty
|
||||||
And stdout should contain 1 line
|
And stdout should contain 1 line
|
||||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||||
|
|||||||
@@ -248,17 +248,20 @@ module.exports = function () {
|
|||||||
fs.writeFile(this.penaltiesCacheFile, data, callback);
|
fs.writeFile(this.penaltiesCacheFile, data, callback);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.Given(/^the profile file(?: "([^"]*)" extended with)?$/, (profile, data, callback) => {
|
this.Given(/^the profile file(?: "([^"]*)" initialized with)?$/, (profile, data, callback) => {
|
||||||
const lua_profiles_path = this.PROFILES_PATH.split(path.sep).join('/');
|
const lua_profiles_path = this.PROFILES_PATH.split(path.sep).join('/');
|
||||||
let text = 'package.path = "' + lua_profiles_path + '/?.lua;" .. package.path\n';
|
let text = 'package.path = "' + lua_profiles_path + '/?.lua;" .. package.path\n';
|
||||||
if (profile == null) {
|
if (profile == null) {
|
||||||
text += data + '\n';
|
text += data + '\n';
|
||||||
} else {
|
} else {
|
||||||
text += 'local f = assert(io.open("' + lua_profiles_path + '/' + profile + '.lua", "r"))\n';
|
text += 'local functions = require("' + profile + '")\n';
|
||||||
text += 'local s = f:read("*all") .. [[\n' + data + '\n]]\n';
|
text += 'functions.setup_parent = functions.setup\n';
|
||||||
text += 'f:close()\n';
|
text += 'functions.setup = function()\n';
|
||||||
text += 'local m = assert(loadstring and loadstring(s) or load(s))\n';
|
text += 'local profile = functions.setup_parent()\n';
|
||||||
text += 'm()\n';
|
text += data + '\n';
|
||||||
|
text += 'return profile\n';
|
||||||
|
text += 'end\n';
|
||||||
|
text += 'return functions\n';
|
||||||
}
|
}
|
||||||
this.profileFile = this.profileCacheFile;
|
this.profileFile = this.profileCacheFile;
|
||||||
// TODO: Don't overwrite if it exists
|
// TODO: Don't overwrite if it exists
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ module.exports = function () {
|
|||||||
outputRow[rate] = result[direction].status ?
|
outputRow[rate] = result[direction].status ?
|
||||||
result[direction].status.toString() : '';
|
result[direction].status.toString() : '';
|
||||||
break;
|
break;
|
||||||
case /^\d+$/.test(want):
|
case /^\d+(\.\d+){0,1}$/.test(want):
|
||||||
if (result[direction].rate !== undefined && !isNaN(result[direction].rate)) {
|
if (result[direction].rate !== undefined && !isNaN(result[direction].rate)) {
|
||||||
outputRow[rate] = result[direction].rate.toString();
|
outputRow[rate] = result[direction].rate.toString();
|
||||||
} else {
|
} else {
|
||||||
@@ -135,7 +135,7 @@ module.exports = function () {
|
|||||||
if (r.route.split(',')[0] === util.format('w%d', i)) {
|
if (r.route.split(',')[0] === util.format('w%d', i)) {
|
||||||
r.time = r.json.routes[0].duration;
|
r.time = r.json.routes[0].duration;
|
||||||
r.distance = r.json.routes[0].distance;
|
r.distance = r.json.routes[0].distance;
|
||||||
r.rate = Math.round(r.distance / r.json.routes[0].weight);
|
r.rate = Math.round(r.distance / r.json.routes[0].weight * 10) / 10.;
|
||||||
r.speed = r.time > 0 ? parseInt(3.6 * r.distance / r.time) : null;
|
r.speed = r.time > 0 ? parseInt(3.6 * r.distance / r.time) : null;
|
||||||
|
|
||||||
// use the mode of the first step of the route
|
// use the mode of the first step of the route
|
||||||
|
|||||||
@@ -85,8 +85,7 @@ module.exports = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var ok = true,
|
var ok = true,
|
||||||
encodedResult = '',
|
encodedResult = '';
|
||||||
extendedTarget = '';
|
|
||||||
|
|
||||||
if (json.trips) row.trips.split(',').forEach((sub, si) => {
|
if (json.trips) row.trips.split(',').forEach((sub, si) => {
|
||||||
if (si >= subTrips.length) {
|
if (si >= subTrips.length) {
|
||||||
@@ -98,11 +97,9 @@ module.exports = function () {
|
|||||||
outNode = subTrips[si][ni];
|
outNode = subTrips[si][ni];
|
||||||
if (this.FuzzyMatch.matchLocation(outNode, node)) {
|
if (this.FuzzyMatch.matchLocation(outNode, node)) {
|
||||||
encodedResult += sub[ni];
|
encodedResult += sub[ni];
|
||||||
extendedTarget += sub[ni];
|
|
||||||
} else {
|
} else {
|
||||||
ok = false;
|
ok = false;
|
||||||
encodedResult += util.format('? [%s,%s]', outNode[0], outNode[1]);
|
encodedResult += util.format('? [%s,%s]', outNode[0], outNode[1]);
|
||||||
extendedTarget += util.format('%s [%d,%d]', sub[ni], node.lat, node.lon);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,9 +238,9 @@ module.exports = function () {
|
|||||||
// a shallow copy of scenario parameters to avoid data inconsistency
|
// a shallow copy of scenario parameters to avoid data inconsistency
|
||||||
// if a cucumber timeout occurs during deferred jobs
|
// if a cucumber timeout occurs during deferred jobs
|
||||||
let p = {extractArgs: this.extractArgs, contractArgs: this.contractArgs,
|
let p = {extractArgs: this.extractArgs, contractArgs: this.contractArgs,
|
||||||
partitionArgs: this.partitionArgs, customizeArgs: this.customizeArgs,
|
partitionArgs: this.partitionArgs, customizeArgs: this.customizeArgs,
|
||||||
profileFile: this.profileFile, inputCacheFile: this.inputCacheFile,
|
profileFile: this.profileFile, inputCacheFile: this.inputCacheFile,
|
||||||
processedCacheFile: this.processedCacheFile, environment: this.environment};
|
processedCacheFile: this.processedCacheFile, environment: this.environment};
|
||||||
let queue = d3.queue(1);
|
let queue = d3.queue(1);
|
||||||
queue.defer(this.extractData.bind(this), p);
|
queue.defer(this.extractData.bind(this), p);
|
||||||
queue.defer(this.partitionData.bind(this), p);
|
queue.defer(this.partitionData.bind(this), p);
|
||||||
|
|||||||
+26
-11
@@ -155,6 +155,10 @@ module.exports = function () {
|
|||||||
return this.extractInstructionList(instructions, s => s.destinations || '');
|
return this.extractInstructionList(instructions, s => s.destinations || '');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.exitsList = (instructions) => {
|
||||||
|
return this.extractInstructionList(instructions, s => s.exits || '');
|
||||||
|
};
|
||||||
|
|
||||||
this.reverseBearing = (bearing) => {
|
this.reverseBearing = (bearing) => {
|
||||||
if (bearing >= 180)
|
if (bearing >= 180)
|
||||||
return bearing - 180.;
|
return bearing - 180.;
|
||||||
@@ -167,6 +171,24 @@ module.exports = function () {
|
|||||||
('out' in s.intersections[0] ? s.intersections[0].bearings[s.intersections[0].out] : 0));
|
('out' in s.intersections[0] ? s.intersections[0].bearings[s.intersections[0].out] : 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.lanesList = (instructions) => {
|
||||||
|
return this.extractInstructionList(instructions, s => {
|
||||||
|
return s.intersections.map( i => {
|
||||||
|
if(i.lanes)
|
||||||
|
{
|
||||||
|
return i.lanes.map( l => {
|
||||||
|
let indications = l.indications.join(';');
|
||||||
|
return indications + ':' + (l.valid ? 'true' : 'false');
|
||||||
|
}).join(' ');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}).join(';');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
this.approachList = (instructions) => {
|
this.approachList = (instructions) => {
|
||||||
return this.extractInstructionList(instructions, s => s.approaches || '');
|
return this.extractInstructionList(instructions, s => s.approaches || '');
|
||||||
};
|
};
|
||||||
@@ -193,17 +215,6 @@ module.exports = function () {
|
|||||||
return instructions.tracepoints.map(t => t.alternatives_count.toString()).join(',');
|
return instructions.tracepoints.map(t => t.alternatives_count.toString()).join(',');
|
||||||
};
|
};
|
||||||
|
|
||||||
this.lanesList = (instructions) => {
|
|
||||||
return this.extractInstructionList(instructions, instruction => {
|
|
||||||
if( 'lanes' in instruction.intersections[0] )
|
|
||||||
{
|
|
||||||
return instruction.intersections[0].lanes.map( p => { return (p.indications).join(';') + ':' + p.valid; } ).join(' ');
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.turnList = (instructions) => {
|
this.turnList = (instructions) => {
|
||||||
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
|
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
|
||||||
.map(v => {
|
.map(v => {
|
||||||
@@ -256,6 +267,10 @@ module.exports = function () {
|
|||||||
return this.extractInstructionList(instructions, s => s.mode);
|
return this.extractInstructionList(instructions, s => s.mode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.classesList = (instructions) => {
|
||||||
|
return this.extractInstructionList(instructions, s => '[' + s.intersections.map(i => '(' + (i.classes ? i.classes.join(',') : '') + ')').join(',') + ']');
|
||||||
|
};
|
||||||
|
|
||||||
this.timeList = (instructions) => {
|
this.timeList = (instructions) => {
|
||||||
return this.extractInstructionList(instructions, s => s.duration + 's');
|
return this.extractInstructionList(instructions, s => s.duration + 's');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ module.exports = function () {
|
|||||||
var afterRequest = (err, res, body) => {
|
var afterRequest = (err, res, body) => {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
if (body && body.length) {
|
if (body && body.length) {
|
||||||
let destinations, pronunciations, instructions, refs, bearings, turns, modes, times,
|
let destinations, exits, pronunciations, instructions, refs, bearings, turns, modes, times, classes,
|
||||||
distances, summary, intersections, lanes, locations, annotation, weight_name, weights, approaches;
|
distances, summary, intersections, lanes, locations, annotation, weight_name, weights, approaches;
|
||||||
|
|
||||||
let json = JSON.parse(body);
|
let json = JSON.parse(body);
|
||||||
@@ -48,10 +48,12 @@ module.exports = function () {
|
|||||||
pronunciations = this.pronunciationList(json.routes[0]);
|
pronunciations = this.pronunciationList(json.routes[0]);
|
||||||
refs = this.refList(json.routes[0]);
|
refs = this.refList(json.routes[0]);
|
||||||
destinations = this.destinationsList(json.routes[0]);
|
destinations = this.destinationsList(json.routes[0]);
|
||||||
|
exits = this.exitsList(json.routes[0]);
|
||||||
bearings = this.bearingList(json.routes[0]);
|
bearings = this.bearingList(json.routes[0]);
|
||||||
turns = this.turnList(json.routes[0]);
|
turns = this.turnList(json.routes[0]);
|
||||||
intersections = this.intersectionList(json.routes[0]);
|
intersections = this.intersectionList(json.routes[0]);
|
||||||
modes = this.modeList(json.routes[0]);
|
modes = this.modeList(json.routes[0]);
|
||||||
|
classes = this.classesList(json.routes[0]);
|
||||||
times = this.timeList(json.routes[0]);
|
times = this.timeList(json.routes[0]);
|
||||||
distances = this.distanceList(json.routes[0]);
|
distances = this.distanceList(json.routes[0]);
|
||||||
lanes = this.lanesList(json.routes[0]);
|
lanes = this.lanesList(json.routes[0]);
|
||||||
@@ -173,10 +175,12 @@ module.exports = function () {
|
|||||||
putValue('bearing', bearings);
|
putValue('bearing', bearings);
|
||||||
putValue('turns', turns);
|
putValue('turns', turns);
|
||||||
putValue('modes', modes);
|
putValue('modes', modes);
|
||||||
|
putValue('classes', classes);
|
||||||
putValue('times', times);
|
putValue('times', times);
|
||||||
putValue('distances', distances);
|
putValue('distances', distances);
|
||||||
putValue('pronunciations', pronunciations);
|
putValue('pronunciations', pronunciations);
|
||||||
putValue('destinations', destinations);
|
putValue('destinations', destinations);
|
||||||
|
putValue('exits', exits);
|
||||||
putValue('weight_name', weight_name);
|
putValue('weight_name', weight_name);
|
||||||
putValue('weights', weights);
|
putValue('weights', weights);
|
||||||
putValue('weight', weight);
|
putValue('weight', weight);
|
||||||
@@ -243,7 +247,7 @@ module.exports = function () {
|
|||||||
} else if (row.waypoints) {
|
} else if (row.waypoints) {
|
||||||
row.waypoints.split(',').forEach((n) => {
|
row.waypoints.split(',').forEach((n) => {
|
||||||
var node = this.findNodeByName(n.trim());
|
var node = this.findNodeByName(n.trim());
|
||||||
if (!node) return cb(new Error('*** unknown waypoint node "%s"', n.trim()));
|
if (!node) return cb(new Error(util.format('*** unknown waypoint node "%s"', n.trim())));
|
||||||
waypoints.push(node);
|
waypoints.push(node);
|
||||||
});
|
});
|
||||||
got.waypoints = row.waypoints;
|
got.waypoints = row.waypoints;
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ Feature: Alternative route
|
|||||||
| 5 | 6 | dc,ca,ab,bd,dc,dc | |
|
| 5 | 6 | dc,ca,ab,bd,dc,dc | |
|
||||||
| 7 | 8 | ca,ab,bd,dc,ca,ca | |
|
| 7 | 8 | ca,ab,bd,dc,ca,ca | |
|
||||||
|
|
||||||
@4111
|
# This test case does not work in a platform independent way
|
||||||
|
# since it depends on a specific CH structure that is only
|
||||||
|
# present on linux it seems.
|
||||||
|
@4111 @todo
|
||||||
Scenario: Alternative Loop Paths with single node path
|
Scenario: Alternative Loop Paths with single node path
|
||||||
Given the node map
|
Given the node map
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
@routing @speed @annotations
|
||||||
|
Feature: Annotations
|
||||||
|
|
||||||
|
Scenario: Ensure that turn penalties aren't included in annotations
|
||||||
|
Given the profile "turnbot"
|
||||||
|
Given a grid size of 100 meters
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
h i
|
||||||
|
j k l m
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the query options
|
||||||
|
| annotations | duration,speed,weight |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| hk | residential |
|
||||||
|
| il | residential |
|
||||||
|
| jk | residential |
|
||||||
|
| lk | residential |
|
||||||
|
| lm | residential |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | a:speed | a:weight |
|
||||||
|
| h | j | hk,jk,jk | 6.7:6.7 | 15:15 |
|
||||||
|
| i | m | il,lm,lm | 6.7:6.7 | 15:15 |
|
||||||
|
| j | m | jk,lm | 6.7:6.7:6.7 | 15:15:15 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: There should be different forward/reverse datasources
|
||||||
|
Given the profile "testbot"
|
||||||
|
|
||||||
|
And the node map
|
||||||
|
"""
|
||||||
|
a b c d e f g h i
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| abcdefghi | primary |
|
||||||
|
|
||||||
|
And the contract extra arguments "--segment-speed-file {speeds_file}"
|
||||||
|
And the customize extra arguments "--segment-speed-file {speeds_file}"
|
||||||
|
|
||||||
|
# Note: 180km/h == 50m/s for speed annotations
|
||||||
|
And the speed file
|
||||||
|
"""
|
||||||
|
1,2,180,1
|
||||||
|
2,1,180,1
|
||||||
|
3,4,180,1
|
||||||
|
5,6,180,1
|
||||||
|
8,7,180,1
|
||||||
|
"""
|
||||||
|
And the query options
|
||||||
|
| annotations | datasources,speed |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | a:datasources | a:speed |
|
||||||
|
| a | i | abcdefghi,abcdefghi | 1:0:1:0:1:0:0:0 | 50:10:50:10:50:10:10:10 |
|
||||||
|
| i | a | abcdefghi,abcdefghi | 0:1:0:0:0:0:0:1 | 10:50:10:10:10:10:10:50 |
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user