Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a22e7da2b | |||
| 40a86d43cd | |||
| 68d20c6ccc | |||
| fe491bf92c | |||
| 7b432b34bb | |||
| 6983cd0de2 | |||
| fe8177077c | |||
| 5f339f4ed6 | |||
| 3c0b52c637 | |||
| 877fc5b42c | |||
| e28785e399 | |||
| 2c4a54ce05 | |||
| a8afc74590 | |||
| d195eee7c4 |
@@ -1,13 +0,0 @@
|
||||
# Issue
|
||||
|
||||
What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.
|
||||
|
||||
## Tasklist
|
||||
- [ ] ADD OWN TASKS HERE
|
||||
- [ ] update relevant [Wiki pages](https://github.com/Project-OSRM/osrm-backend/wiki)
|
||||
- [ ] add regression / cucumber cases (see docs/testing.md)
|
||||
- [ ] review
|
||||
- [ ] adjust for comments
|
||||
|
||||
## Requirements / Relations
|
||||
Link any requirements here. Other pull requests this PR is based on?
|
||||
@@ -1,8 +1,3 @@
|
||||
# mason #
|
||||
#########
|
||||
/.mason
|
||||
/mason_packages
|
||||
|
||||
# pre compiled dependencies #
|
||||
#############################
|
||||
osrm-deps
|
||||
|
||||
+39
-33
@@ -13,6 +13,7 @@ notifications:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- "5.3"
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
@@ -24,7 +25,7 @@ env:
|
||||
global:
|
||||
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||
- CCACHE_COMPRESS=1
|
||||
- CASHER_TIME_OUT=599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742
|
||||
- CASHER_TIME_OUT=1000
|
||||
- JOBS=4
|
||||
|
||||
matrix:
|
||||
@@ -35,12 +36,20 @@ matrix:
|
||||
|
||||
# Debug Builds
|
||||
- os: linux
|
||||
compiler: "gcc-6-debug"
|
||||
addons: &gcc6
|
||||
compiler: "gcc-5-debug"
|
||||
addons: &gcc5
|
||||
apt:
|
||||
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', 'ccache']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON BUILD_COMPONENTS=ON
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Debug' COVERAGE=ON
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-4.8-debug"
|
||||
addons: &gcc48
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-4.8' CXXCOMPILER='g++-4.8' BUILD_TYPE='Debug'
|
||||
|
||||
- os: linux
|
||||
compiler: "clang-3.8-debug"
|
||||
@@ -48,7 +57,7 @@ matrix:
|
||||
apt:
|
||||
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', 'ccache']
|
||||
env: CLANG_VERSION='3.8.1' CLANG_PACKAGE="clang++" BUILD_TYPE='Debug' RUN_CLANG_FORMAT=ON BUILD_COMPONENTS=ON CUCUMBER_TIMEOUT=60000
|
||||
env: CLANG_VERSION='3.8.0' BUILD_TYPE='Debug' RUN_CLANG_FORMAT=ON
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
@@ -57,24 +66,29 @@ matrix:
|
||||
|
||||
# Release Builds
|
||||
- os: linux
|
||||
compiler: "mason-release"
|
||||
addons:
|
||||
compiler: "gcc-5-release"
|
||||
addons: &gcc5
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev', 'ccache']
|
||||
env: BUILD_TYPE='Release' ENABLE_MASON=ON
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-release"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
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', 'ccache']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_COMPONENTS=ON
|
||||
compiler: "gcc-5-release-i686"
|
||||
env: TARGET_ARCH='i686' CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-release-i686"
|
||||
env: TARGET_ARCH='i686' CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
||||
compiler: "gcc-4.8-release-armhf"
|
||||
env: TARGET_ARCH='armhf' CCOMPILER='arm-linux-gnueabihf-gcc-4.8' CXXCOMPILER='arm-linux-gnueabihf-g++-4.8' BUILD_TYPE='Release'
|
||||
|
||||
# Disabled because of CI slowness
|
||||
#- os: linux
|
||||
#- compiler: gcc
|
||||
#- addons: &gcc48
|
||||
#- apt:
|
||||
#- sources: ['ubuntu-toolchain-r-test']
|
||||
#- packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
#- env: CCOMPILER='gcc-4.8' CXXCOMPILER='g++-4.8' BUILD_TYPE='Release'
|
||||
|
||||
# Disabled because of CI slowness
|
||||
#- os: linux
|
||||
@@ -93,12 +107,12 @@ matrix:
|
||||
|
||||
# Shared Library
|
||||
- os: linux
|
||||
compiler: "gcc-6-release-shared"
|
||||
addons: &gcc6
|
||||
compiler: "gcc-5-release-shared"
|
||||
addons: &gcc5
|
||||
apt:
|
||||
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', 'ccache']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON BUILD_COMPONENTS=ON
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
# Disabled because CI slowness
|
||||
#- os: linux
|
||||
@@ -122,7 +136,7 @@ before_install:
|
||||
if [[ ${CLANG_VERSION:-false} != false ]]; then
|
||||
export CCOMPILER='clang'
|
||||
export CXXCOMPILER='clang++'
|
||||
CLANG_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/${CLANG_PACKAGE}/${CLANG_VERSION}.tar.gz"
|
||||
CLANG_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/clang/${CLANG_VERSION}.tar.gz"
|
||||
travis_retry wget --quiet -O - ${CLANG_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR} || exit 1
|
||||
fi
|
||||
- |
|
||||
@@ -130,7 +144,6 @@ before_install:
|
||||
# implicit deps, but seem to be installed by default with recent images: libxml2 GDAL boost
|
||||
brew install libzip libstxxl lua51 luabind tbb md5sha1sum ccache
|
||||
fi
|
||||
- ccache --max-size=256M # limiting the cache's size to roughly the previous job's object sizes
|
||||
|
||||
install:
|
||||
- |
|
||||
@@ -139,7 +152,7 @@ install:
|
||||
fi
|
||||
- mkdir build && pushd build
|
||||
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_MASON=${ENABLE_MASON:-OFF} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} -DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} -DBUILD_TOOLS=ON -DBUILD_COMPONENTS=${BUILD_COMPONENTS:-OFF} -DENABLE_CCACHE=ON
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DCOVERAGE=${COVERAGE:-OFF} -DBUILD_TOOLS=1 -DENABLE_CCACHE=ON
|
||||
- echo "travis_fold:start:MAKE"
|
||||
- make osrm-extract --jobs=3
|
||||
- make --jobs=${JOBS}
|
||||
@@ -153,13 +166,6 @@ install:
|
||||
sudo ldconfig
|
||||
fi
|
||||
- popd
|
||||
- |
|
||||
if [[ ${ENABLE_MASON:-OFF} == 'ON' ]]; then
|
||||
# for mason builds we need to point the example
|
||||
# at the clang++ installed by the CMakeLists.txt automatically
|
||||
export CXX=$(./third_party/mason/mason prefix clang++ 3.8.1)/bin/clang++
|
||||
export CC=$(./third_party/mason/mason prefix clang++ 3.8.1)/bin/clang
|
||||
fi
|
||||
- mkdir example/build && pushd example/build
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
- make
|
||||
@@ -187,6 +193,6 @@ after_success:
|
||||
./scripts/format.sh # we don't want to fail just yet
|
||||
fi
|
||||
- |
|
||||
if [ -n "${ENABLE_COVERAGE}" ]; then
|
||||
if [ -n "${COVERAGE}" ]; then
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
fi
|
||||
|
||||
+12
-78
@@ -1,82 +1,16 @@
|
||||
# 5.5.0
|
||||
- Changes from 5.4.0
|
||||
- API:
|
||||
- `osrm-datastore` now accepts the parameter `--max-wait` that specifies how long it waits before aquiring a shared memory lock by force
|
||||
- Shared memory now allows for multiple clients (multiple instances of libosrm on the same segment)
|
||||
- Polyline geometries can now be requested with precision 5 as well as with precision 6
|
||||
- Profiles
|
||||
- `restrictions` is now used for namespaced restrictions and restriction exceptions (e.g. `restriction:motorcar=` as well as `except=motorcar`)
|
||||
- replaced lhs/rhs profiles by using test defined profiles
|
||||
- Handle `oneway=alternating` (routed over with penalty) separately from `oneway=reversible` (not routed over due to time dependence)
|
||||
- Handle `destination:forward`, `destination:backward`, `destination:ref:forward`, `destination:ref:backward` tags
|
||||
- Properly handle destinations on `oneway=-1` roads
|
||||
- Guidance
|
||||
- Notifications are now exposed more prominently, announcing turns onto a ferry/pushing your bike more prominently
|
||||
- Improved turn angle calculation, detecting offsets due to lanes / minor variations due to inaccuracies
|
||||
- Corrected the bearings returned for intermediate steps - requires reprocessing
|
||||
- Improved turn locations for collapsed turns
|
||||
- Trip Plugin
|
||||
- changed internal behaviour to prefer the smallest lexicographic result over the largest one
|
||||
# 5.3.2
|
||||
Changes from 5.3.1
|
||||
- Bugfixes
|
||||
- fixed a bug where polyline decoding on a defective polyline could end up in out-of-bound access on a vector
|
||||
- fixed compile errors in tile unit-test framework
|
||||
- fixed a bug that could result in inconsistent behaviour when collapsing instructions
|
||||
- fixed a bug that could result in crashes when leaving a ferry directly onto a motorway ramp
|
||||
- Debug Tiles
|
||||
- Added support for turn penalties
|
||||
- fixed a bug that occurred when trimming very short segments at the begin/end of a route (less than 1 meter)
|
||||
|
||||
# 5.4.3
|
||||
- Changes from 5.4.2
|
||||
- Bugfixes
|
||||
- #3254 Fixed a bug that could end up hiding roundabout instructions
|
||||
- #3260 fixed a bug that provided the wrong location in the arrival instruction
|
||||
|
||||
# 5.4.2
|
||||
- Changes from 5.4.1
|
||||
- Bugfixes
|
||||
- #3032 Fixed a bug that could result in emitting `invalid` as an instruction type on sliproads with mode changes
|
||||
- #3085 Fixed an outdated assertion that could throw without a cause for concern
|
||||
- #3179 Fixed a bug that could trigger an assertion in TurnInstruciton generation
|
||||
|
||||
# 5.4.1
|
||||
- Changes from 5.4.0
|
||||
- Bugfixes
|
||||
- #3016: Fixes shared memory updates while queries are running
|
||||
|
||||
# 5.4.0
|
||||
- Changes from 5.3.0
|
||||
- Profiles
|
||||
- includes library guidance.lua that offers preliminary configuration on guidance.
|
||||
- added left_hand_driving flag in global profile properties
|
||||
- modified turn penalty function for car profile - better fit to real data
|
||||
- return `ref` and `name` as separate fields. Do no use ref or destination as fallback for name value
|
||||
- the default profile for car now ignores HOV only roads
|
||||
- Guidance
|
||||
- Handle Access tags for lanes, only considering valid lanes in lane-guidance (think car | car | bike | car)
|
||||
- Improved the detection of non-noticeable name-changes
|
||||
- Summaries have been improved to consider references as well
|
||||
- API:
|
||||
- `annotations=true` now returns the data source id for each segment as `datasources`
|
||||
- Reduced semantic of merge to refer only to merges from a lane onto a motorway-like road
|
||||
- new `ref` field in the `RouteStep` object. It contains the reference code or name of a way. Previously merged into the `name` property like `name (ref)` and are now separate fields.
|
||||
- Bugfixes
|
||||
- Fixed an issue that would result in segfaults for viaroutes with an invalid intermediate segment when u-turns were allowed at the via-location
|
||||
- Invalid only_* restrictions could result in loss of connectivity. As a fallback, we assume all turns allowed when the restriction is not valid
|
||||
- Fixed a bug that could result in an infinite loop when finding information about an upcoming intersection
|
||||
- Fixed a bug that led to not discovering if a road simply looses a considered prefix
|
||||
- BREAKING: Fixed a bug that could crash postprocessing of instructions on invalid roundabout taggings. This change requires reprocessing datasets with osrm-extract and osrm-contract
|
||||
- Fixed an issue that could emit `invalid` as instruction when ending on a sliproad after a traffic-light
|
||||
- Fixed an issue that would detect turning circles as sliproads
|
||||
- Fixed a bug where post-processing instructions (e.g. left + left -> uturn) could result in false pronunciations
|
||||
- Fixes a bug where a bearing range of zero would cause exhaustive graph traversals
|
||||
- Fixes a bug where certain looped geometries could cause an infinite loop during extraction
|
||||
- Fixed a bug where some roads could be falsly identified as sliproads
|
||||
- Fixed a bug where roundabout intersections could result in breaking assertions when immediately exited
|
||||
- Infrastructure:
|
||||
- Adds a feature to limit results in nearest service with a default of 100 in `osrm-routed`
|
||||
# 5.3.1
|
||||
Changes from 5.3.1
|
||||
- Bugfixes:
|
||||
- Disabled broken lane handling for complex uturn/oneway combinations for now (190 intersections affected on the planet)
|
||||
- Fixed a bug with overlaping geometries, which broke OSRM on recent Egypt extracts with data-modelling issues
|
||||
|
||||
# 5.3.0
|
||||
- Changes from 5.3.0-rc.3
|
||||
Changes from 5.3.0-rc.3
|
||||
- Guidance
|
||||
- Only announce `use lane` on required turns (not using all lanes to go straight)
|
||||
- Moved `lanes` to the intersection objects. This is BREAKING in relation to other Release Candidates but not with respect to other releases.
|
||||
@@ -84,7 +18,7 @@
|
||||
- Fix BREAKING: bug that could result in failure to load 'osrm.icd' files. This breaks the dataformat
|
||||
- Fix: bug that results in segfaults when `use lane` instructions are suppressed
|
||||
|
||||
- Changes form 5.2.7
|
||||
Changes form 5.2.7
|
||||
- API
|
||||
- Introduces new `TurnType` in the form of `use lane`. The type indicates that you have to stick to a lane without turning
|
||||
- Introduces `lanes` to the `Intersection` object. The lane data contains both the markings at the intersection and a flag indicating if they can be chosen for the next turn
|
||||
@@ -108,7 +42,7 @@
|
||||
- Fix devide by zero on updating speed data using osrm-contract
|
||||
|
||||
# 5.3.0 RC3
|
||||
- Changes from 5.3.0-rc.2
|
||||
Changes from 5.3.0-rc.2
|
||||
- Guidance
|
||||
- Improved detection of obvious turns
|
||||
- Improved turn lane detection
|
||||
@@ -116,7 +50,7 @@
|
||||
- Fix bug that didn't chose minimal weights on overlapping edges
|
||||
|
||||
# 5.3.0 RC2
|
||||
- Changes from 5.3.0-rc.1
|
||||
Changes from 5.3.0-rc.1
|
||||
- Bugfixes
|
||||
- Fixes invalid checks in the lane-extraction part of the car profile
|
||||
|
||||
|
||||
+131
-298
@@ -7,45 +7,10 @@ Please create a directory and run cmake from there, passing the path to this sou
|
||||
This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. Please delete them.")
|
||||
endif()
|
||||
|
||||
option(ENABLE_MASON "Use mason for dependencies" OFF)
|
||||
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
|
||||
option(BUILD_TOOLS "Build OSRM tools" OFF)
|
||||
option(BUILD_COMPONENTS "Build osrm-components" OFF)
|
||||
option(ENABLE_ASSERTIONS "Use assertions in release mode" OFF)
|
||||
option(ENABLE_COVERAGE "Build with coverage instrumentalisation" OFF)
|
||||
option(ENABLE_SANITIZER "Use memory sanitizer for Debug build" OFF)
|
||||
option(ENABLE_LTO "Use LTO if available" ON)
|
||||
option(ENABLE_FUZZING "Fuzz testing using LLVM's libFuzzer" OFF)
|
||||
option(ENABLE_GOLD_LINKER "Use GNU gold linker if available" ON)
|
||||
|
||||
if(ENABLE_MASON)
|
||||
|
||||
# versions in use
|
||||
set(MASON_CLANG_VERSION "3.8.1")
|
||||
set(MASON_BOOST_VERSION "1.61.0")
|
||||
set(MASON_STXXL_VERSION "1.4.1")
|
||||
set(MASON_EXPAT_VERSION "2.1.1")
|
||||
set(MASON_LUA_VERSION "5.2.4")
|
||||
set(MASON_LUABIND_VERSION "e414c57bcb687bb3091b7c55bbff6947f052e46b")
|
||||
set(MASON_BZIP2_VERSION "1.0.6")
|
||||
set(MASON_TBB_VERSION "43_20150316")
|
||||
set(MASON_CCACHE_VERSION "3.3.1")
|
||||
|
||||
message(STATUS "Enabling mason")
|
||||
set(MASON_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/third_party/mason/mason)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/third_party/mason/mason.cmake)
|
||||
if(NOT CMAKE_CXX_COMPILER)
|
||||
mason_use(clang++ VERSION ${MASON_CLANG_VERSION})
|
||||
message(STATUS "Setting compiler to clang++ ${MASON_CLANG_VERSION} (via mason) ${MASON_PACKAGE_clang++_PREFIX}/bin/clang++")
|
||||
set(CMAKE_CXX_COMPILER "${MASON_PACKAGE_clang++_PREFIX}/bin/clang++")
|
||||
set(CMAKE_C_COMPILER "${MASON_PACKAGE_clang++_PREFIX}/bin/clang")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
project(OSRM C CXX)
|
||||
set(OSRM_VERSION_MAJOR 5)
|
||||
set(OSRM_VERSION_MINOR 5)
|
||||
set(OSRM_VERSION_PATCH 0)
|
||||
set(OSRM_VERSION_MINOR 3)
|
||||
set(OSRM_VERSION_PATCH 2)
|
||||
|
||||
# these two functions build up custom variables:
|
||||
# OSRM_INCLUDE_PATHS and OSRM_DEFINES
|
||||
@@ -81,6 +46,15 @@ if(WIN32 AND MSVC_VERSION LESS 1900)
|
||||
message(FATAL_ERROR "Building with Microsoft compiler needs Latest Visual Studio 2015 (Community or better)")
|
||||
endif()
|
||||
|
||||
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
|
||||
option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF)
|
||||
option(BUILD_TOOLS "Build OSRM tools" OFF)
|
||||
option(BUILD_COMPONENTS "Build osrm-components" OFF)
|
||||
option(ENABLE_ASSERTIONS OFF)
|
||||
option(COVERAGE OFF)
|
||||
option(SANITIZER OFF)
|
||||
option(ENABLE_LTO "Use LTO if available" ON)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/)
|
||||
@@ -92,7 +66,7 @@ add_custom_target(FingerPrintConfigure ALL ${CMAKE_COMMAND}
|
||||
COMMENT "Configuring revision fingerprint"
|
||||
VERBATIM)
|
||||
|
||||
set(BOOST_COMPONENTS date_time chrono filesystem iostreams program_options regex system thread unit_test_framework)
|
||||
set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/util/version.hpp.in
|
||||
@@ -124,64 +98,25 @@ add_library(osrm_extract $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
|
||||
|
||||
if(ENABLE_GOLD_LINKER)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
if("${LD_VERSION}" MATCHES "GNU gold")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
|
||||
message(STATUS "Using GNU gold as linker.")
|
||||
|
||||
# Issue 2785: check gold binutils version and don't use gc-sections for versions prior 2.25
|
||||
string(REGEX REPLACE ".*\\(GNU Binutils[^\\)0-9]+([0-9]+\\.[0-9]+)[^\\)]*\\).*" "\\1" GOLD_BINUTILS_VERSION "${LD_VERSION}")
|
||||
if ("${GOLD_BINUTILS_VERSION}" VERSION_LESS "2.26")
|
||||
message(STATUS "Disabling gc-sections on gold binutils < 2.26, see: https://sourceware.org/bugzilla/show_bug.cgi?id=17639")
|
||||
set(LD_AVOID_GC_SECTIONS TRUE)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "GNU gold linker isn't available.")
|
||||
set(ENABLE_GOLD_LINKER OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Explicitly set the build type to Release if no other type is specified
|
||||
# on the command line. Without this, cmake defaults to an unoptimized,
|
||||
# non-debug build, which almost nobody wants.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "No build type specified, defaulting to Release")
|
||||
# Check the release mode
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
message(STATUS "Configuring OSRM in debug mode")
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
message(STATUS "Configuring OSRM in release mode")
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
message(STATUS "Configuring OSRM in release mode with debug flags")
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES MinRelSize)
|
||||
message(STATUS "Configuring OSRM in release mode with minimized size")
|
||||
else()
|
||||
message(STATUS "Unrecognized build type - will use cmake defaults")
|
||||
endif()
|
||||
|
||||
# Additional logic for the different build types
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
message(STATUS "Configuring debug mode flags")
|
||||
set(ENABLE_ASSERTIONS ON)
|
||||
if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-inline -fno-omit-frame-pointer")
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ggdb")
|
||||
else()
|
||||
# Don't override the -O parameter for RelWithDebInfo, we want an optimized build
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-inline -fno-omit-frame-pointer")
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ggdb")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES MinRelSize OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
message(STATUS "Configuring release mode optimizations")
|
||||
if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
message(STATUS "Configuring OSRM in release mode")
|
||||
# Check if LTO is available
|
||||
check_cxx_compiler_flag("-flto" LTO_AVAILABLE)
|
||||
if(ENABLE_LTO AND LTO_AVAILABLE)
|
||||
@@ -218,27 +153,25 @@ if(CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES MinRelSize OR CM
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_MASON AND (LTO_WORKS OR ENABLE_GOLD_LINKER))
|
||||
message(WARNING "ENABLE_MASON and ENABLE_LTO/ENABLE_GOLD_LINKER may not work on all linux systems currently")
|
||||
message(WARNING "For more details see: https://github.com/Project-OSRM/osrm-backend/issues/3202")
|
||||
endif()
|
||||
|
||||
set(MAYBE_COVERAGE_LIBRARIES "")
|
||||
if (ENABLE_COVERAGE)
|
||||
if (COVERAGE)
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
message(ERROR "ENABLE_COVERAGE=ON only make sense with a Debug build")
|
||||
message(ERROR "COVERAGE=ON only make sense with a Debug build")
|
||||
endif()
|
||||
message(INFO "Enabling coverage")
|
||||
set(MAYBE_COVERAGE_LIBRARIES "-lgcov")
|
||||
set(MAYBE_COVERAGE_LIBRARIES "gcov")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
endif()
|
||||
if (ENABLE_SANITIZER)
|
||||
if (SANITIZER)
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
message(ERROR "SANITIZER=ON only make sense with a Debug build")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
|
||||
# Configuring compilers
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "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")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=2 -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics")
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
set(COLOR_FLAG "-fdiagnostics-color=auto")
|
||||
check_cxx_compiler_flag("-fdiagnostics-color=auto" HAS_COLOR_FLAG)
|
||||
@@ -246,7 +179,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
set(COLOR_FLAG "")
|
||||
endif()
|
||||
# using GCC
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${COLOR_FLAG} -fPIC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=1 -D_FORTIFY_SOURCE=2 ${COLOR_FLAG} -fPIC")
|
||||
if(WIN32) # using mingw
|
||||
add_dependency_defines(-DWIN32)
|
||||
set(OPTIONAL_SOCKET_LIBS ws2_32 wsock32)
|
||||
@@ -256,7 +189,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel -wd10237 -Wall -ipo -fPIC")
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib)
|
||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} date_time chrono zlib)
|
||||
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
|
||||
add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation
|
||||
@@ -272,7 +205,7 @@ execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-Wl,--version" ERROR_QUIET OUTPUT
|
||||
# For ld.gold and ld.bfs (the GNU linkers) we optimize hard
|
||||
if("${LINKER_VERSION}" MATCHES "GNU gold" OR "${LINKER_VERSION}" MATCHES "GNU ld")
|
||||
message(STATUS "Setting linker optimizations")
|
||||
if(NOT (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC" OR "${LD_AVOID_GC_SECTIONS}"))
|
||||
if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
# 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")
|
||||
# Tell linker to do dead code and data eminination during link time discarding sections
|
||||
@@ -287,15 +220,13 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
|
||||
# Activate C++1y
|
||||
# Activate C++11
|
||||
if(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
|
||||
# Configuring other platform dependencies
|
||||
if(APPLE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10")
|
||||
execute_process(COMMAND xcrun --sdk macosx --show-sdk-path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||
message(STATUS "Set Architecture to x64 on OS X")
|
||||
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)
|
||||
@@ -310,170 +241,60 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(MAYBE_RT_LIBRARY -lrt)
|
||||
set(MAYBE_RT_LIBRARY rt)
|
||||
endif()
|
||||
|
||||
# Disallow deprecated protozero APIs
|
||||
add_definitions(-DPROTOZERO_STRICT_API)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# if mason is enabled no find_package calls are made
|
||||
# to ensure that we are only compiling and linking against
|
||||
# fully portable mason packages
|
||||
if(ENABLE_MASON)
|
||||
message(STATUS "Installing dependencies via mason")
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
mason_use(boost VERSION ${MASON_BOOST_VERSION} HEADER_ONLY)
|
||||
add_dependency_includes(${MASON_PACKAGE_boost_INCLUDE_DIRS})
|
||||
mason_use(boost_libfilesystem VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_FILESYSTEM_LIBRARY ${MASON_PACKAGE_boost_libfilesystem_STATIC_LIBS})
|
||||
mason_use(boost_libiostreams VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_IOSTREAMS_LIBRARY ${MASON_PACKAGE_boost_libiostreams_STATIC_LIBS})
|
||||
mason_use(boost_libprogram_options VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY ${MASON_PACKAGE_boost_libprogram_options_STATIC_LIBS})
|
||||
mason_use(boost_libregex VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_REGEX_LIBRARY ${MASON_PACKAGE_boost_libregex_STATIC_LIBS})
|
||||
mason_use(boost_libtest VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY ${MASON_PACKAGE_boost_libtest_STATIC_LIBS})
|
||||
mason_use(boost_libdate_time VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_DATE_TIME_LIBRARY ${MASON_PACKAGE_boost_libdate_time_STATIC_LIBS})
|
||||
mason_use(boost_libthread VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_THREAD_LIBRARY ${MASON_PACKAGE_boost_libthread_STATIC_LIBS})
|
||||
mason_use(boost_libsystem VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_SYSTEM_LIBRARY ${MASON_PACKAGE_boost_libsystem_STATIC_LIBS})
|
||||
|
||||
mason_use(stxxl VERSION ${MASON_STXXL_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_stxxl_INCLUDE_DIRS})
|
||||
set(STXXL_LIBRARY ${MASON_PACKAGE_stxxl_STATIC_LIBS})
|
||||
|
||||
mason_use(expat VERSION ${MASON_EXPAT_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_expat_INCLUDE_DIRS})
|
||||
set(EXPAT_LIBRARIES ${MASON_PACKAGE_expat_STATIC_LIBS})
|
||||
|
||||
mason_use(lua VERSION ${MASON_LUA_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_lua_INCLUDE_DIRS})
|
||||
set(USED_LUA_LIBRARIES ${MASON_PACKAGE_lua_STATIC_LIBS})
|
||||
|
||||
mason_use(luabind_lua524 VERSION ${MASON_LUABIND_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_luabind_lua524_INCLUDE_DIRS})
|
||||
set(LUABIND_LIBRARY ${MASON_PACKAGE_luabind_lua524_STATIC_LIBS})
|
||||
|
||||
mason_use(bzip2 VERSION ${MASON_BZIP2_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_bzip2_INCLUDE_DIRS})
|
||||
set(BZIP2_LIBRARIES ${MASON_PACKAGE_bzip2_STATIC_LIBS})
|
||||
|
||||
mason_use(tbb VERSION ${MASON_TBB_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_tbb_INCLUDE_DIRS})
|
||||
set(TBB_LIBRARIES ${MASON_PACKAGE_tbb_LDFLAGS})
|
||||
|
||||
if(NOT MASON_PACKAGE_tbb_LIBRARY_DIRS)
|
||||
message(FATAL_ERROR "MASON_PACKAGE_tbb_LIBRARY_DIRS is empty, rpath will not work")
|
||||
endif()
|
||||
foreach(libpath ${MASON_PACKAGE_tbb_LIBRARY_DIRS})
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(LINKER_FLAGS "-Wl,-rpath,${libpath}")
|
||||
elseif(APPLE)
|
||||
set(LINKER_FLAGS "-Wl,-rpath, -Wl,${libpath}")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
file(GLOB TBBGlob ${libpath}/*.*)
|
||||
install(FILES ${TBBGlob} DESTINATION lib)
|
||||
endforeach()
|
||||
|
||||
if(BUILD_COMPONENTS)
|
||||
message(FATAL_ERROR "BUILD_COMPONENTS is not supported with ENABLE_MASON")
|
||||
endif()
|
||||
|
||||
# current mason packages target -D_GLIBCXX_USE_CXX11_ABI=0
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
|
||||
if(ENABLE_CCACHE)
|
||||
mason_use(ccache VERSION ${MASON_CCACHE_VERSION})
|
||||
message(STATUS "Setting ccache to ccache ${MASON_CCACHE_VERSION} (via mason) ${MASON_PACKAGE_ccache_PREFIX}/bin/ccache")
|
||||
message(STATUS "Using ccache to speed up incremental builds")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${MASON_PACKAGE_ccache_PREFIX}/bin/ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${MASON_PACKAGE_ccache_PREFIX}/bin/ccache)
|
||||
set(ENV{CCACHE_CPP2} "true")
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
find_package(Boost 1.49.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
add_dependency_includes(${Boost_INCLUDE_DIRS})
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
add_dependency_includes(${TBB_INCLUDE_DIR})
|
||||
if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(TBB_LIBRARIES ${TBB_DEBUG_LIBRARIES})
|
||||
endif()
|
||||
find_package(Luabind REQUIRED)
|
||||
add_dependency_includes(${LUABIND_INCLUDE_DIR})
|
||||
set(USED_LUA_LIBRARIES ${LUA_LIBRARY})
|
||||
add_dependency_includes(${LUA_INCLUDE_DIR})
|
||||
|
||||
find_package(EXPAT REQUIRED)
|
||||
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
find_package(STXXL REQUIRED)
|
||||
add_dependency_includes(${STXXL_INCLUDE_DIR})
|
||||
|
||||
find_package(BZip2 REQUIRED)
|
||||
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
||||
|
||||
if(BUILD_COMPONENTS)
|
||||
find_package(GDAL)
|
||||
endif()
|
||||
|
||||
# add a target to generate API documentation with Doxygen
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
# 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"))
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
message(STATUS "Using ccache to speed up incremental builds")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
set(ENV{CCACHE_CPP2} "true")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# even with mason builds we want to link to system zlib
|
||||
# to ensure that osrm binaries play well with other binaries like nodejs
|
||||
find_package(ZLIB REQUIRED)
|
||||
add_dependency_includes(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/cmake")
|
||||
set(OSMIUM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include")
|
||||
find_package(Osmium REQUIRED COMPONENTS io)
|
||||
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIR})
|
||||
add_dependency_includes(${OSMIUM_INCLUDE_DIR})
|
||||
|
||||
|
||||
find_package(Boost 1.49.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
|
||||
# collect a subset of the boost libraries needed
|
||||
# by libosrm
|
||||
foreach(lib ${Boost_LIBRARIES})
|
||||
if(NOT WIN32)
|
||||
if(lib MATCHES filesystem OR lib MATCHES thread OR lib MATCHES iostreams OR lib MATCHES system)
|
||||
list(APPEND BOOST_ENGINE_LIBRARIES "${lib}")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND BOOST_ENGINE_LIBRARIES "${lib}")
|
||||
endif()
|
||||
endforeach(lib)
|
||||
|
||||
if(NOT WIN32 AND NOT Boost_USE_STATIC_LIBS)
|
||||
add_dependency_defines(-DBOOST_TEST_DYN_LINK)
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT WIN32 AND NOT Boost_USE_STATIC_LIBS)
|
||||
add_dependency_defines(-DBOOST_TEST_DYN_LINK)
|
||||
endif()
|
||||
|
||||
add_dependency_defines(-DBOOST_SPIRIT_USE_PHOENIX_V3)
|
||||
add_dependency_defines(-DBOOST_RESULT_OF_USE_DECLTYPE)
|
||||
add_dependency_defines(-DBOOST_FILESYSTEM_NO_DEPRECATED)
|
||||
add_dependency_includes(${Boost_INCLUDE_DIRS})
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
add_dependency_includes(${TBB_INCLUDE_DIR})
|
||||
if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(TBB_LIBRARIES ${TBB_DEBUG_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_package(Luabind REQUIRED)
|
||||
include(check_luabind)
|
||||
add_dependency_includes(${LUABIND_INCLUDE_DIR})
|
||||
|
||||
set(USED_LUA_LIBRARIES ${LUA_LIBRARY})
|
||||
if(LUAJIT_FOUND)
|
||||
set(USED_LUA_LIBRARIES, LUAJIT_LIBRARIES)
|
||||
endif()
|
||||
add_dependency_includes(${LUA_INCLUDE_DIR})
|
||||
|
||||
find_package(EXPAT REQUIRED)
|
||||
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
find_package(STXXL REQUIRED)
|
||||
add_dependency_includes(${STXXL_INCLUDE_DIR})
|
||||
|
||||
set(OpenMP_FIND_QUIETLY ON)
|
||||
find_package(OpenMP)
|
||||
@@ -482,32 +303,29 @@ if(OPENMP_FOUND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
find_package(BZip2 REQUIRED)
|
||||
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
add_dependency_includes(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
if (ENABLE_JSON_LOGGING)
|
||||
message(STATUS "Enabling json logging")
|
||||
add_dependency_defines(-DENABLE_JSON_LOGGING)
|
||||
endif()
|
||||
|
||||
add_definitions(${OSRM_DEFINES})
|
||||
include_directories(SYSTEM ${OSRM_INCLUDE_PATHS})
|
||||
|
||||
set(BOOST_BASE_LIBRARIES
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_IOSTREAMS_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY})
|
||||
|
||||
set(BOOST_ENGINE_LIBRARIES
|
||||
${Boost_ZLIB_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${BOOST_BASE_LIBRARIES})
|
||||
|
||||
# Binaries
|
||||
target_link_libraries(osrm-datastore osrm_store ${Boost_PROGRAM_OPTIONS_LIBRARY} ${BOOST_BASE_LIBRARIES})
|
||||
target_link_libraries(osrm-extract osrm_extract ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_REGEX_LIBRARY} ${BOOST_BASE_LIBRARIES})
|
||||
target_link_libraries(osrm-contract ${Boost_PROGRAM_OPTIONS_LIBRARY} ${BOOST_BASE_LIBRARIES} ${TBB_LIBRARIES} osrm_contract)
|
||||
target_link_libraries(osrm-routed osrm ${Boost_PROGRAM_OPTIONS_LIBRARY} ${BOOST_ENGINE_LIBRARIES} ${OPTIONAL_SOCKET_LIBS} ${ZLIB_LIBRARY})
|
||||
target_link_libraries(osrm-datastore osrm_store ${Boost_LIBRARIES})
|
||||
target_link_libraries(osrm-extract osrm_extract ${Boost_LIBRARIES})
|
||||
target_link_libraries(osrm-contract ${Boost_LIBRARIES} ${TBB_LIBRARIES} osrm_contract)
|
||||
target_link_libraries(osrm-routed osrm ${Boost_LIBRARIES} ${OPTIONAL_SOCKET_LIBS} ${ZLIB_LIBRARY})
|
||||
|
||||
set(EXTRACTOR_LIBRARIES
|
||||
${BZIP2_LIBRARIES}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${EXPAT_LIBRARIES}
|
||||
${LUABIND_LIBRARY}
|
||||
@@ -518,7 +336,7 @@ set(EXTRACTOR_LIBRARIES
|
||||
${ZLIB_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(CONTRACTOR_LIBRARIES
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LUABIND_LIBRARY}
|
||||
${USED_LUA_LIBRARIES}
|
||||
@@ -534,13 +352,13 @@ set(ENGINE_LIBRARIES
|
||||
${MAYBE_COVERAGE_LIBRARIES}
|
||||
${ZLIB_LIBRARY})
|
||||
set(STORAGE_LIBRARIES
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(UTIL_LIBRARIES
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
@@ -552,11 +370,12 @@ target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
||||
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
||||
|
||||
if(BUILD_COMPONENTS)
|
||||
find_package(GDAL)
|
||||
if(GDAL_FOUND)
|
||||
add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_link_libraries(osrm-components ${TBB_LIBRARIES})
|
||||
include_directories(SYSTEM ${GDAL_INCLUDE_DIR})
|
||||
target_link_libraries(osrm-components ${GDAL_LIBRARIES} ${BOOST_BASE_LIBRARIES})
|
||||
target_link_libraries(osrm-components ${GDAL_LIBRARIES} ${Boost_LIBRARIES})
|
||||
install(TARGETS osrm-components DESTINATION bin)
|
||||
else()
|
||||
message(WARNING "libgdal and/or development headers not found")
|
||||
@@ -566,14 +385,14 @@ endif()
|
||||
if(BUILD_TOOLS)
|
||||
message(STATUS "Activating OSRM internal tools")
|
||||
add_executable(osrm-io-benchmark src/tools/io-benchmark.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_link_libraries(osrm-io-benchmark ${BOOST_BASE_LIBRARIES})
|
||||
target_link_libraries(osrm-io-benchmark ${Boost_LIBRARIES})
|
||||
add_executable(osrm-unlock-all src/tools/unlock_all_mutexes.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_link_libraries(osrm-unlock-all ${BOOST_BASE_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries(osrm-unlock-all ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(osrm-unlock-all rt)
|
||||
endif()
|
||||
add_executable(osrm-springclean src/tools/springclean.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_link_libraries(osrm-springclean ${BOOST_BASE_LIBRARIES})
|
||||
target_link_libraries(osrm-springclean ${Boost_LIBRARIES})
|
||||
|
||||
install(TARGETS osrm-io-benchmark DESTINATION bin)
|
||||
install(TARGETS osrm-unlock-all DESTINATION bin)
|
||||
@@ -597,7 +416,7 @@ file(GLOB VariantGlob third_party/variant/*.hpp)
|
||||
file(GLOB LibraryGlob include/osrm/*.hpp)
|
||||
file(GLOB ParametersGlob include/engine/api/*_parameters.hpp)
|
||||
set(EngineHeader include/engine/status.hpp include/engine/engine_config.hpp include/engine/hint.hpp include/engine/bearing.hpp include/engine/phantom_node.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/strong_typedef.hpp include/util/exception.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/strong_typedef.hpp)
|
||||
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp include/extractor/travel_mode.hpp)
|
||||
set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.hpp)
|
||||
set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp)
|
||||
@@ -618,8 +437,13 @@ install(TARGETS osrm_extract DESTINATION lib)
|
||||
install(TARGETS osrm_contract DESTINATION lib)
|
||||
install(TARGETS osrm_store DESTINATION lib)
|
||||
|
||||
list(GET ENGINE_LIBRARIES 1 ENGINE_LIBRARY_FIRST)
|
||||
foreach(lib ${ENGINE_LIBRARIES})
|
||||
set(ENGINE_LIBRARY_LISTING "${ENGINE_LIBRARY_LISTING} ${lib}")
|
||||
get_filename_component(ENGINE_LIBRARY_PATH "${ENGINE_LIBRARY_FIRST}" PATH)
|
||||
get_filename_component(ENGINE_LIBRARY_NAME "${lib}" NAME_WE)
|
||||
string(REPLACE "lib" "" ENGINE_LIBRARY_NAME ${ENGINE_LIBRARY_NAME})
|
||||
string(REPLACE "-l" "" ENGINE_LIBRARY_NAME ${ENGINE_LIBRARY_NAME})
|
||||
set(ENGINE_LIBRARY_LISTING "${ENGINE_LIBRARY_LISTING} -L${ENGINE_LIBRARY_PATH} -l${ENGINE_LIBRARY_NAME}")
|
||||
endforeach()
|
||||
|
||||
if(BUILD_DEBIAN_PACKAGE)
|
||||
@@ -639,6 +463,28 @@ JOIN("-I${OSRM_INCLUDE_PATHS}" " -I" OSRM_INCLUDE_PATHS_STRING)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig.in libosrm.pc @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/libosrm.pc DESTINATION lib/pkgconfig)
|
||||
|
||||
# add a target to generate API documentation with Doxygen
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
# 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"))
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
message(STATUS "Using ccache to speed up incremental builds")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
set(ENV{CCACHE_CPP2} "true")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# uninstall target
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
@@ -652,16 +498,3 @@ add_custom_target(uninstall
|
||||
# Modular build system: each directory registered here provides its own CMakeLists.txt
|
||||
add_subdirectory(unit_tests)
|
||||
add_subdirectory(src/benchmarks)
|
||||
|
||||
if (ENABLE_FUZZING)
|
||||
# Requires libosrm being built with sanitizers; make configurable and default to ubsan
|
||||
set(FUZZ_SANITIZER "undefined" CACHE STRING "Sanitizer to be used for Fuzz testing")
|
||||
set_property(CACHE FUZZ_SANITIZER PROPERTY STRINGS "undefined" "integer" "address" "memory" "thread" "leak")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize-coverage=edge,indirect-calls,8bit-counters -fsanitize=address")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||
|
||||
message(STATUS "Using -fsanitize=${FUZZ_SANITIZER} for Fuzz testing")
|
||||
|
||||
add_subdirectory(fuzz)
|
||||
endif ()
|
||||
|
||||
@@ -10,11 +10,6 @@ The Open Source Routing Machine is a high performance routing engine written in
|
||||
| Windows | [](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) |
|
||||
| Coverage | [](https://codecov.io/gh/Project-OSRM/osrm-backend) |
|
||||
|
||||
## Contact
|
||||
|
||||
- IRC: server `irc.oftc.net`, channel: `#osrm` (see: `https://www.oftc.net`, and for a webchat: `https://webchat.oftc.net`)
|
||||
- Mailinglist: `https://lists.openstreetmap.org/listinfo/osrm-talk`
|
||||
|
||||
## Building
|
||||
|
||||
For instructions on how to [build](https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM) and [run OSRM](https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM), please consult [the Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
|
||||
|
||||
+7
-7
@@ -8,18 +8,18 @@ SET PROJECT_DIR=%CD%
|
||||
ECHO PROJECT_DIR^: %PROJECT_DIR%
|
||||
ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS%
|
||||
ECHO cmake^: && cmake --version
|
||||
IF %ERRORLEVEL% NEQ 0 ECHO CMAKE not found && GOTO CMAKE_NOT_OK
|
||||
IF %ERRORLEVEL% NEQ 0 ECHO CMAKE not found GOTO ERROR
|
||||
|
||||
cmake --version | findstr /C:"3.7.0" && GOTO CMAKE_OK
|
||||
FOR /F %%G IN ("--version") DO cmake %%G 2>&1 | findstr /C:"3.5.0" > nul && goto CMAKE_NOT_OK
|
||||
GOTO CMAKE_OK
|
||||
|
||||
:CMAKE_NOT_OK
|
||||
SET CMAKE_VERSION=3.7.0-rc2
|
||||
ECHO CMAKE NOT OK - downloading new CMake %CMAKE_VERSION%
|
||||
IF NOT EXIST cm.zip powershell Invoke-WebRequest https://cmake.org/files/v3.7/cmake-%CMAKE_VERSION%-win32-x86.zip -OutFile $env:PROJECT_DIR\cm.zip
|
||||
ECHO CMAKE NOT OK - downloading new CMake
|
||||
IF NOT EXIST cm.zip powershell Invoke-WebRequest https://cmake.org/files/v3.5/cmake-3.5.1-win32-x86.zip -OutFile $env:PROJECT_DIR\cm.zip
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
IF NOT EXIST cmake-%CMAKE_VERSION%-win32-x86 7z -y x cm.zip | %windir%\system32\FIND "ing archive"
|
||||
IF NOT EXIST cmake-3.5.1-win32-x86 7z -y x cm.zip | %windir%\system32\FIND "ing archive"
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
SET PATH=%PROJECT_DIR%\cmake-%CMAKE_VERSION%-win32-x86\bin;%PATH%
|
||||
SET PATH=%PROJECT_DIR%\cmake-3.5.1-win32-x86\bin;%PATH%
|
||||
|
||||
:CMAKE_OK
|
||||
ECHO CMAKE_OK
|
||||
|
||||
+2
-1
@@ -11,7 +11,8 @@ SET CONFIGURATION=Release
|
||||
FOR /F "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do SET APPVEYOR_REPO_BRANCH=%%i
|
||||
ECHO APPVEYOR_REPO_BRANCH^: %APPVEYOR_REPO_BRANCH%
|
||||
|
||||
SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.7.0-rc2-win32-x86\bin;%PATH%
|
||||
::SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.5.0-win32-x86\bin;%PATH%
|
||||
SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.5.1-win32-x86\bin;%PATH%
|
||||
SET PATH=C:\Program Files\7-Zip;%PATH%
|
||||
|
||||
powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindLua
|
||||
# -------
|
||||
#
|
||||
#
|
||||
#
|
||||
# Locate Lua library This module defines
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LUA_FOUND - if false, do not try to link to Lua
|
||||
# LUA_LIBRARIES - both lua and lualib
|
||||
# LUA_INCLUDE_DIR - where to find lua.h
|
||||
# LUA_VERSION_STRING - the version of Lua found
|
||||
# LUA_VERSION_MAJOR - the major version of Lua
|
||||
# LUA_VERSION_MINOR - the minor version of Lua
|
||||
# LUA_VERSION_PATCH - the patch version of Lua
|
||||
#
|
||||
#
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# #include "lua.h"
|
||||
#
|
||||
# and not
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# #include <lua/lua.h>
|
||||
#
|
||||
# This is because, the lua location is not standardized and may exist in
|
||||
# locations other than lua/
|
||||
|
||||
unset(_lua_include_subdirs)
|
||||
unset(_lua_library_names)
|
||||
unset(_lua_append_versions)
|
||||
|
||||
# this is a function only to have all the variables inside go away automatically
|
||||
function(_lua_set_version_vars)
|
||||
set(LUA_VERSIONS5 5.3 5.2 5.1 5.0)
|
||||
|
||||
if (Lua_FIND_VERSION_EXACT)
|
||||
if (Lua_FIND_VERSION_COUNT GREATER 1)
|
||||
set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR})
|
||||
endif ()
|
||||
elseif (Lua_FIND_VERSION)
|
||||
# once there is a different major version supported this should become a loop
|
||||
if (NOT Lua_FIND_VERSION_MAJOR GREATER 5)
|
||||
if (Lua_FIND_VERSION_COUNT EQUAL 1)
|
||||
set(_lua_append_versions ${LUA_VERSIONS5})
|
||||
else ()
|
||||
foreach (subver IN LISTS LUA_VERSIONS5)
|
||||
if (NOT subver VERSION_LESS ${Lua_FIND_VERSION})
|
||||
list(APPEND _lua_append_versions ${subver})
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
# once there is a different major version supported this should become a loop
|
||||
set(_lua_append_versions ${LUA_VERSIONS5})
|
||||
endif ()
|
||||
|
||||
list(APPEND _lua_include_subdirs "include/lua" "include")
|
||||
|
||||
foreach (ver IN LISTS _lua_append_versions)
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}")
|
||||
list(APPEND _lua_include_subdirs
|
||||
include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
|
||||
include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
)
|
||||
list(APPEND _lua_library_names
|
||||
lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
|
||||
lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
lua.${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
|
||||
set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
|
||||
set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
|
||||
endfunction(_lua_set_version_vars)
|
||||
|
||||
function(_lua_check_header_version _hdr_file)
|
||||
# At least 5.[012] have different ways to express the version
|
||||
# so all of them need to be tested. Lua 5.2 defines LUA_VERSION
|
||||
# and LUA_RELEASE as joined by the C preprocessor, so avoid those.
|
||||
file(STRINGS "${_hdr_file}" lua_version_strings
|
||||
REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*")
|
||||
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};")
|
||||
if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$")
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};")
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};")
|
||||
set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
|
||||
else ()
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
|
||||
if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$")
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
|
||||
endif ()
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}")
|
||||
endif ()
|
||||
foreach (ver IN LISTS _lua_append_versions)
|
||||
if (ver STREQUAL "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}")
|
||||
set(LUA_VERSION_MAJOR ${LUA_VERSION_MAJOR} PARENT_SCOPE)
|
||||
set(LUA_VERSION_MINOR ${LUA_VERSION_MINOR} PARENT_SCOPE)
|
||||
set(LUA_VERSION_PATCH ${LUA_VERSION_PATCH} PARENT_SCOPE)
|
||||
set(LUA_VERSION_STRING ${LUA_VERSION_STRING} PARENT_SCOPE)
|
||||
return()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endfunction(_lua_check_header_version)
|
||||
|
||||
_lua_set_version_vars()
|
||||
|
||||
if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
|
||||
_lua_check_header_version("${LUA_INCLUDE_DIR}/lua.h")
|
||||
endif ()
|
||||
|
||||
if (NOT LUA_VERSION_STRING)
|
||||
foreach (subdir IN LISTS _lua_include_subdirs)
|
||||
unset(LUA_INCLUDE_PREFIX CACHE)
|
||||
find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
if (LUA_INCLUDE_PREFIX)
|
||||
_lua_check_header_version("${LUA_INCLUDE_PREFIX}/${subdir}/lua.h")
|
||||
if (LUA_VERSION_STRING)
|
||||
set(LUA_INCLUDE_DIR "${LUA_INCLUDE_PREFIX}/${subdir}")
|
||||
break()
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
unset(_lua_include_subdirs)
|
||||
unset(_lua_append_versions)
|
||||
|
||||
find_library(LUA_LIBRARY
|
||||
NAMES ${_lua_library_names} lua
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
unset(_lua_library_names)
|
||||
|
||||
if (LUA_LIBRARY)
|
||||
# include the math library for Unix
|
||||
if (UNIX AND NOT APPLE AND NOT BEOS)
|
||||
find_library(LUA_MATH_LIBRARY m)
|
||||
set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
else ()
|
||||
set(LUA_LIBRARIES "${LUA_LIBRARY}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
|
||||
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
||||
VERSION_VAR LUA_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
|
||||
@@ -0,0 +1,82 @@
|
||||
# Locate Lua library
|
||||
# This module defines
|
||||
# LUA52_FOUND, if false, do not try to link to Lua
|
||||
# LUA_LIBRARIES
|
||||
# LUA_INCLUDE_DIR, where to find lua.h
|
||||
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "lua.h"
|
||||
# and not
|
||||
# #include <lua/lua.h>
|
||||
# This is because, the lua location is not standardized and may exist
|
||||
# in locations other than lua/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
# Copyright 2016 for Project-OSRM, Lua5.1 => Lua5.2
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
find_path(LUA_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES include/lua52 include/lua5.2 include/lua-5.2 include/lua include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
find_library(LUA_LIBRARY
|
||||
NAMES lua52 lua5.2 lua-5.2 lua
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
if(LUA_LIBRARY)
|
||||
# include the math library for Unix
|
||||
if(UNIX AND NOT APPLE AND NOT BEOS)
|
||||
find_library(LUA_MATH_LIBRARY m)
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
else()
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
|
||||
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
|
||||
|
||||
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
||||
unset(lua_version_str)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua52
|
||||
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
||||
VERSION_VAR LUA_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# Locate Lua library
|
||||
# This module defines
|
||||
# LUAJIT_FOUND, if false, do not try to link to Lua
|
||||
# LUAJIT_LIBRARIES
|
||||
# LUAJIT_INCLUDE_DIR, where to find lua.h
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "lua.h"
|
||||
# and not
|
||||
# #include <lua/lua.h>
|
||||
# This is because, the lua location is not standardized and may exist
|
||||
# in locations other than lua/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
#
|
||||
# ################
|
||||
# 2010 - modified for cronkite to find luajit instead of lua, as it was before.
|
||||
#
|
||||
|
||||
if ( NOT LuaJIT_FIND_VERSION )
|
||||
MESSAGE(FATAL_ERROR "You need to specify a version of libluajit to use")
|
||||
ENDIF()
|
||||
|
||||
IF( NOT LUAJIT_FIND_QUIETLY )
|
||||
MESSAGE(STATUS "Looking for LuaJIT ${LuaJIT_FIND_VERSION}")
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
$ENV{LUAJIT_DIR}
|
||||
PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUAJIT_LIBRARY
|
||||
NAMES luajit-${LuaJIT_FIND_VERSION_MAJOR}${LuaJIT_FIND_VERSION_MINOR} luajit-${LuaJIT_FIND_VERSION}
|
||||
HINTS
|
||||
$ENV{LUAJIT_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
IF(LUAJIT_LIBRARY)
|
||||
# include the math library for Unix
|
||||
IF(UNIX AND NOT APPLE)
|
||||
FIND_LIBRARY(LUAJIT_MATH_LIBRARY m)
|
||||
SET( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY};${LUAJIT_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
ELSE(UNIX AND NOT APPLE)
|
||||
SET( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
ENDIF(LUAJIT_LIBRARY)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUAJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
|
||||
|
||||
IF( NOT LUAJIT_FIND_QUIETLY )
|
||||
IF( LUAJIT_FOUND AND LUAJIT_LIBRARIES)
|
||||
MESSAGE(STATUS "Found LuaJIT: ${LUAJIT_LIBRARY}" )
|
||||
MARK_AS_ADVANCED(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARIES LUAJIT_LIBRARY LUAJIT_MATH_LIBRARY)
|
||||
ELSE()
|
||||
SET ( LUAJIT_FOUND FALSE )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
+7
-25
@@ -3,34 +3,16 @@
|
||||
# LUABIND_FOUND, if false, do not try to link to Luabind
|
||||
# LUABIND_LIBRARIES
|
||||
# LUABIND_INCLUDE_DIR, where to find luabind.hpp
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include <luabind/luabind.hpp>
|
||||
# and not
|
||||
# #include <luabind.hpp>
|
||||
|
||||
# First we try using EXACT but in some verison of
|
||||
# cmake this would also match patch versions
|
||||
FIND_PACKAGE(Lua 5.2 EXACT)
|
||||
IF (LUA_FOUND)
|
||||
MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
|
||||
ELSE()
|
||||
FIND_PACKAGE(Lua 5.1 EXACT)
|
||||
IF (LUA_FOUND)
|
||||
MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
|
||||
ELSE()
|
||||
# Now fall back to a lua verison without exact
|
||||
# in case this cmake version also forces patch versions
|
||||
FIND_PACKAGE(Lua 5.2)
|
||||
IF (LUA_FOUND)
|
||||
MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
|
||||
ELSE()
|
||||
FIND_PACKAGE(Lua 5.1)
|
||||
IF (LUA_FOUND)
|
||||
MESSAGE(STATUS "Using Lua ${LUA_VERSION_STRING}")
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Lua 5.1 or 5.2 was not found.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF( NOT LUABIND_FIND_QUIETLY )
|
||||
MESSAGE(STATUS "Looking for Luabind...")
|
||||
ENDIF()
|
||||
|
||||
|
||||
FIND_PATH(LUABIND_INCLUDE_DIR luabind.hpp
|
||||
HINTS
|
||||
$ENV{LUABIND_DIR}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
unset(LUABIND_WORKS CACHE)
|
||||
unset(LUABIND51_WORKS CACHE)
|
||||
set (LUABIND_CHECK_SRC "extern \"C\" {\n#include \"lua.h\"\n#include \"lauxlib.h\"\n}\n#include <luabind/open.hpp>\nint main() { lua_State *x = luaL_newstate(); luabind::open(x); }")
|
||||
set (CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
||||
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||
|
||||
find_package(Lua52)
|
||||
if(NOT APPLE)
|
||||
find_package(LuaJIT 5.2)
|
||||
endif()
|
||||
if(LUA52_FOUND)
|
||||
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND_WORKS)
|
||||
endif()
|
||||
|
||||
if(LUABIND_WORKS)
|
||||
message(STATUS "Luabind/Lua5.2 combination working with ${LUA_LIBRARY}")
|
||||
else()
|
||||
message(STATUS "Luabind/Lua5.2 not feasible, falling back to Lua 5.1.")
|
||||
unset(LUA_FOUND CACHE)
|
||||
unset(LUA_INCLUDE_DIR CACHE)
|
||||
unset(LUA_LIBRARY CACHE)
|
||||
find_package(Lua51 REQUIRED)
|
||||
if(NOT APPLE)
|
||||
find_package(LuaJIT 5.1)
|
||||
endif()
|
||||
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND51_WORKS)
|
||||
|
||||
if(LUABIND51_WORKS)
|
||||
message(STATUS "Luabind works with Lua 5.1 at ${LUA_LIBRARY}")
|
||||
else()
|
||||
message(FATAL_ERROR "Luabind does not work with Lua 5.1 at ${LUA_LIBRARY}, no working Luabind found")
|
||||
endif()
|
||||
endif()
|
||||
+6
-4
@@ -1,8 +1,10 @@
|
||||
module.exports = {
|
||||
default: '--strict --tags ~@stress --tags ~@todo --require features/support --require features/step_definitions',
|
||||
verify: '--strict --tags ~@stress --tags ~@todo -f progress --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'
|
||||
default: '--require features --tags ~@stress --tags ~@todo',
|
||||
verify: '--require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress',
|
||||
jenkins: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress',
|
||||
bugs: '--require features --tags @bug',
|
||||
todo: '--require features --tags @todo',
|
||||
all: '--require features'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# Developing / Debugging guidance code
|
||||
|
||||
When changing guidance code, it is easy to introduce problems somewhere in the network.
|
||||
To get a better feeling of how your changes impact the OSRM experience, we offer ways of generating geojson output to inspect (e.g. with Mapbox Studio).
|
||||
When you do changes, make sure to inspect a few areas for the impact of the changes.
|
||||
|
||||
## How to use GeoJson-Debugging
|
||||
|
||||
This is a short guide to describe usage of our GeoJson debug logging mechanism. It is synchronized to guarantee thread-safe logging.
|
||||
|
||||
## Outputting into a single file
|
||||
To use it, the inclusion of `geojson_debug_logger.hpp` `geojson_debug_policies.hpp` from the `util` directory is required.
|
||||
|
||||
Geojson debugging requires a few simple steps to output data into a feature collection.
|
||||
|
||||
- Create a Scoped Guard that lives through the process and provide it with all required datastructures (it needs to span the lifetime of all your logging efforts)
|
||||
- At the location of the output, simply call Write with your own parameters.
|
||||
|
||||
A guard (ScopedGeojsonLoggerGuard) requires a logging policy. Per default we provide a way of printing out node-ids as coordinates.
|
||||
|
||||
The initialisation to do so looks like this:
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||
|
||||
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 policy itself offers a `operator()` accepting a `vector` of `NodeID`.
|
||||
|
||||
For outputting data into our file (debug.geojson), we simply need to call the matching logging routine of the guard: `util::ScioedGeojsonLoggerGuard<util::NodeIdVectorToLineString>::Write(list_of_node_ids);`
|
||||
(or `guard.Write(list_of_node_ids)` if you created an instance).
|
||||
|
||||
### Possible Scopeguard Location
|
||||
Think of the scopeguard as you would do of any reference. If you wan't to access to logging during a call, the guard object must be alive and valid.
|
||||
|
||||
As an example: a good location to create the a scopeguard to log decisions in the edge-based-graph-factory would be right before we run it ([here](https://github.com/Project-OSRM/osrm-backend/blob/a933b5d94943bf3edaf42c84a614a99650d23cba/src/extractor/extractor.cpp#L497)). If you put `util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", node_coordinate_vector);` at that location, you can then print `util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString>::Write(list_of_node_ids);` anywhere within the `edge-based-graph-factory`.
|
||||
|
||||
This location would enable call for all guidance related pre-processing which is called in the edge-based-graph-factory.
|
||||
Logging any turn-handler decisions, for example, would now be possible.
|
||||
|
||||
## Limitations
|
||||
GeoJson debugging requires a single GeoJsonGuard (ScopedGeojsonLoggerGuard) for each desired output file.
|
||||
For each set of template parameters, only the most recent guard will actually produce output.
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug-2.geojson", data-for-conversion);`
|
||||
|
||||
Will not provide a way to write into two files, but only `debug-2` will actually contain features.
|
||||
|
||||
We cannot nest-these calls.
|
||||
|
||||
If we want to use the same policy for multiple files, we need to use different template parameters both for the logger and the guard.
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString,0> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString,1> geojson_guard( "debug-2.geojson", data-for-conversion);`
|
||||
|
||||
as well as,
|
||||
|
||||
`util::ScopedGeojsonLoggerGuardr<util::NodeIdVectorToLineString,0>::Write(list_of_node_ids);`
|
||||
|
||||
`util::ScopedGeojsonLoggerGuardr<util::NodeIdVectorToLineString,1>::Write(list_of_node_ids);`
|
||||
+30
-66
@@ -30,17 +30,17 @@ http://{server}/{service}/{version}/{profile}/{coordinates}[.{format}]?option=va
|
||||
|
||||
| Service | Description |
|
||||
|-------------|-----------------------------------------------------------|
|
||||
| [`route`](#service-route) | fastest path between given coordinates |
|
||||
| [`route`](#service-route) | shortest path between given coordinates |
|
||||
| [`nearest`](#service-nearest) | returns the nearest street segment for a given coordinate |
|
||||
| [`table`](#service-table) | computes distance tables for given coordinates |
|
||||
| [`match`](#service-match) | matches given coordinates to the road network |
|
||||
| [`trip`](#service-trip) | Compute the fastest round trip between given coordinates |
|
||||
| [`trip`](#service-trip) | Compute the shortest round trip between given coordinates |
|
||||
| [`tile`](#service-tile) | Return vector tiles containing debugging info |
|
||||
|
||||
- `version`: Version of the protocol implemented by the service.
|
||||
- `profile`: Mode of transportation, is determined statically by the Lua profile that is used to prepare the data using `osrm-extract`.
|
||||
- `profile`: Mode of transportation, is determined by the profile that is used to prepare the data
|
||||
- `coordinates`: String of format `{longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...]` or `polyline({polyline})`.
|
||||
- `format`: Only `json` is supported at the moment. This parameter is optional and defaults to `json`.
|
||||
- `format`: Only `json` is supportest at the moment. This parameter is optional and defaults to `json`.
|
||||
|
||||
Passing any `option=value` is optional. `polyline` follows Google's polyline format with precision 5 and can be generated using [this package](https://www.npmjs.com/package/polyline).
|
||||
To pass parameters to each location some options support an array like encoding:
|
||||
@@ -107,8 +107,6 @@ Where `code` is on one of the strings below or service dependent:
|
||||
| `InvalidService` | Service name is invalid. |
|
||||
| `InvalidVersion` | Version is not found. |
|
||||
| `InvalidOptions` | Options are invalid. |
|
||||
| `InvalidQuery` | The query string is synctactically malformed. |
|
||||
| `InvalidValue` | The successfully parsed query parameters are invalid. |
|
||||
| `NoSegment` | One of the supplied input coordinates could not snap to street segment. |
|
||||
| `TooBig` | The request size violates one of the service specific request size restrictions. |
|
||||
|
||||
@@ -153,19 +151,19 @@ http://router.project-osrm.org/nearest/v1/driving/13.388860,52.517037?number=3&b
|
||||
### Request
|
||||
|
||||
```
|
||||
http://{server}/route/v1/{profile}/{coordinates}?alternatives={true|false}&steps={true|false}&geometries={polyline|polyline6|geojson}&overview={full|simplified|false}&annotations={true|false}
|
||||
http://{server}/route/v1/{profile}/{coordinates}?alternatives={true|false}&steps={true|false}&geometries={polyline|geojson}&overview={full|simplified|false}&annotations={true|false}
|
||||
```
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|---------------------------------------------|-------------------------------------------------------------------------------|
|
||||
|alternatives|`true`, `false` (default) |Search for alternative routes and return as well.\* |
|
||||
|steps |`true`, `false` (default) |Return route steps for each route leg |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|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.|
|
||||
|continue_straight |`default` (default), `true`, `false` |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. |
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------|-------------------------------------------------------------------------------|
|
||||
|alternatives|`true`, `false` (default) |Search for alternative routes and return as well.\* |
|
||||
|steps |`true`, `false` (default) |Return route steps for each route leg |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|geometries |`polyline` (default), `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.|
|
||||
|continue_straight |`default` (default), `true`, `false`|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. |
|
||||
|
||||
\* Please note that even if an alternative route is requested, a result cannot be guaranteed.
|
||||
|
||||
@@ -179,18 +177,10 @@ In case of error the following `code`s are supported in addition to the general
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|-----------------|
|
||||
| `NoRoute` | No route found. |
|
||||
| `NoRoute` | No route found. |
|
||||
|
||||
All other fields might be undefined.
|
||||
|
||||
### Example
|
||||
|
||||
Query on Berlin with three coordinates and no overview geometry returned:
|
||||
|
||||
```
|
||||
http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false
|
||||
```
|
||||
|
||||
## Service `table`
|
||||
### Request
|
||||
```
|
||||
@@ -251,7 +241,7 @@ http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52
|
||||
|
||||
Returns a asymmetric 3x2 matrix with from the polyline encoded locations `qikdcB}~dpXkkHz`:
|
||||
```
|
||||
http://router.project-osrm.org/table/v1/driving/polyline(egs_Iq_aqAppHzbHulFzeMe`EuvKpnCglA)?sources=0;1;3&destinations=2;4
|
||||
http://router.project-osrm.org/table/v1/driving/qikdcB}~dpXkkHz?sources=0;1;3&destinations=2;4
|
||||
```
|
||||
|
||||
## Service `match`
|
||||
@@ -263,7 +253,7 @@ The algorithm might not be able to match all points. Outliers are removed if the
|
||||
### Request
|
||||
|
||||
```
|
||||
http://{server}/match/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|polyline6|geojson}&overview={simplified|full|false}&annotations={true|false}
|
||||
http://{server}/match/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|geojson}&overview={simplified|full|false}&annotations={true|false}
|
||||
```
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
@@ -272,10 +262,10 @@ In addition to the [general options](#general-options) the following options are
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------------|------------------------------------------------------------------------------------------|
|
||||
|steps |`true`, `false` (default) |Return route steps for each route |
|
||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|geometries |`polyline` (default), `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|annotations |`true`, `false` (default) |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.|
|
||||
|timestamps |`{timestamp};{timestamp}[;{timestamp} ...]` |Timestamp of the input location. Timestamps need to be monotonically increasing. |
|
||||
|timestamps |`{timestamp};{timestamp}[;{timestamp} ...]` |Timestamp of the input location. |
|
||||
|radiuses |`{radius};{radius}[;{radius} ...]` |Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy.|
|
||||
|
||||
|Parameter |Values |
|
||||
@@ -285,7 +275,7 @@ In addition to the [general options](#general-options) the following options are
|
||||
|
||||
### Response
|
||||
- `code` if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `tracepoints`: Array of `Waypoint` objects representing all points of the trace in order.
|
||||
- `tracepoints`: Array of `Ẁaypoint` objects representing all points of the trace in order.
|
||||
If the trace point was ommited by map matching because it is an outlier, the entry will be `null`.
|
||||
Each `Waypoint` object has the following additional properties:
|
||||
- `matchings_index`: Index to the `Route` object in `matchings` the sub-trace was matched to.
|
||||
@@ -304,14 +294,14 @@ All other fields might be undefined.
|
||||
## Service `trip`
|
||||
|
||||
The trip plugin solves the Traveling Salesman Problem using a greedy heuristic (farthest-insertion algorithm).
|
||||
The returned path does not have to be the fastest path, as TSP is NP-hard it is only an approximation.
|
||||
The returned path does not have to be the shortest path, as TSP is NP-hard it is only an approximation.
|
||||
Note that if the input coordinates can not be joined by a single trip (e.g. the coordinates are on several disconnected islands)
|
||||
multiple trips for each connected component are returned.
|
||||
|
||||
### Request
|
||||
|
||||
```
|
||||
http://{server}/trip/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|polyline6|geojson}&overview={simplified|full|false}&annotations={true|false}
|
||||
http://{server}/trip/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|geojson}&overview={simplified|full|false}&annotations={true|false}
|
||||
```
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
@@ -319,8 +309,8 @@ In addition to the [general options](#general-options) the following options are
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------------|---------------------------------------------------------------------------|
|
||||
|steps |`true`, `false` (default) |Return route instructions for each trip |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|geometries |`polyline` (default), `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.|
|
||||
|
||||
### Response
|
||||
@@ -335,7 +325,7 @@ In case of error the following `code`s are supported in addition to the general
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|---------------------|
|
||||
| `NoTrips` | No trips found. |
|
||||
| `NoTrips` | No trips found. |
|
||||
|
||||
All other fields might be undefined.
|
||||
|
||||
@@ -409,8 +399,8 @@ Represents a route between two waypoints.
|
||||
|
||||
| annotations | |
|
||||
|--------------|-----------------------------------------------------------------------|
|
||||
| true | An `Annotation` object containing node ids, durations and distances |
|
||||
| false | `undefined` |
|
||||
| true | returns distance and durations of each coordinate along the route |
|
||||
| false | will not exist |
|
||||
|
||||
#### Example
|
||||
|
||||
@@ -424,35 +414,11 @@ With `steps=false` and `annotations=true`:
|
||||
"annotation": {
|
||||
"distance": [5,5,10,5,5],
|
||||
"duration": [15,15,40,15,15],
|
||||
"datasources": [1,0,0,0,1],
|
||||
"nodes": [49772551,49772552,49786799,49786800,49786801,49786802]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Annotation
|
||||
|
||||
Annotation of the whole route leg with fine-grained information about each segment or node id.
|
||||
|
||||
#### Properties
|
||||
|
||||
- `distance`: The distance, in metres, between each pair of coordinates
|
||||
- `duration`: The duration between each pair of coordinates, in seconds
|
||||
- `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
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"distance": [5,5,10,5,5],
|
||||
"duration": [15,15,40,15,15],
|
||||
"datasources": [1,0,0,0,1],
|
||||
"nodes": [49772551,49772552,49786799,49786800,49786801,49786802]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### RouteStep
|
||||
|
||||
A step consists of a maneuver such as a turn or merge, followed
|
||||
@@ -468,11 +434,9 @@ step.
|
||||
| geometries | |
|
||||
|------------|--------------------------------------------------------------------|
|
||||
| polyline | [polyline](https://www.npmjs.com/package/polyline) with precision 5 in [latitude,longitude] encoding |
|
||||
| polyline6 | [polyline](https://www.npmjs.com/package/polyline) with precision 6 in [latitude,longitude] encoding |
|
||||
| geojson | [GeoJSON `LineString`](http://geojson.org/geojson-spec.html#linestring) or [GeoJSON `Point`](http://geojson.org/geojson-spec.html#point) if it is only one coordinate (not wrapped by a GeoJSON feature)|
|
||||
|
||||
- `name`: The name of the way along which travel proceeds.
|
||||
- `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.
|
||||
- `destinations`: The destinations of the way. Will be `undefined` if there are no destinations.
|
||||
- `mode`: A string signifying the mode of transportation.
|
||||
@@ -541,7 +505,7 @@ step.
|
||||
| `use lane` | going straight on a specific lane |
|
||||
| `continue` | Turn in direction of `modifier` to stay on the same road |
|
||||
| `roundabout` | traverse roundabout, has additional field `exit` with NR if the roundabout is left. `the modifier specifies the direction of entering the roundabout` |
|
||||
| `rotary` | a larger version of a roundabout, can offer `rotary_name/rotary_pronunciation` in addition to the `exit` parameter. |
|
||||
| `rotary` | a larger version of a roundabout, can offer `rotary_name` in addition to the `exit` parameter. |
|
||||
| `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 |
|
||||
|
||||
@@ -574,7 +538,7 @@ step.
|
||||
|
||||
| `type` | Description |
|
||||
|------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
||||
| `roundabout`/`rotary` | Number of the roundabout exit to take. If exit is `undefined` the destination is on the roundabout. |
|
||||
| `roundabout` | Number of the roundabout exit to take. If exit is `undefined` the destination is on the roundabout. |
|
||||
| else | Indicates the number of intersections passed until the turn. Example instruction: `at the fourth intersection, turn left` |
|
||||
|
||||
|
||||
@@ -627,7 +591,7 @@ location of the StepManeuver. Further intersections are listed for every cross-w
|
||||
in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for `depart` maneuvers.
|
||||
- `out`: index into the bearings/entry array. Used to extract the bearing just after the turn. Namely, The clockwise angle from true north to the
|
||||
direction of travel immediately after the maneuver/passing the intersection. The value is not supplied for `arrive` maneuvers.
|
||||
- `lanes`: Array of `Lane` objects that denote the available turn lanes at the intersection. If no lane information is available for an intersection, the `lanes` property will not be present.
|
||||
- `lanes`: Array of `Lane` objects that denote the available turn lanes at the turn location
|
||||
|
||||
#### Example
|
||||
```
|
||||
|
||||
@@ -32,16 +32,3 @@ Given an OpenStreetMap way, the way_function will either return nothing (meaning
|
||||
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)
|
||||
|
||||
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.
|
||||
|
||||
## 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.
|
||||
|
||||
### Road Classification
|
||||
|
||||
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 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.
|
||||
|
||||
+32
-32
@@ -1,50 +1,50 @@
|
||||
# Releasing a new OSRM version
|
||||
|
||||
We are using http://semver.org/ for versioning with major, minor and patch versions.
|
||||
Do decide if this is a major or minor version bump use: http://semver.org/
|
||||
|
||||
## Guarantees
|
||||
What we guarantee on major version changes:
|
||||
|
||||
We are giving the following guarantees between versions:
|
||||
- Breaking changes will be in the changelog
|
||||
- If we break an HTTP API we bump the version
|
||||
|
||||
### Major version change
|
||||
What we guarantee on minor version changes:
|
||||
|
||||
- There are no guarantees about compatiblity of APIs or datasets
|
||||
- Breaking changes will be noted as `BREAKING` in the changelog
|
||||
- HTTP API does not include breaking changes
|
||||
- C++ library API does not include breaking changes
|
||||
- node-osrm API does not include breaking changes
|
||||
|
||||
### Minor version change
|
||||
What we DO NOT guarantee on minor version changes:
|
||||
|
||||
We may introduce forward-compatible changes: query parameters and response properties may be added in responses, but existing properties may not be changed or removed. One exception to this is the addition of new turn types, which we see as forward-compatible changes.
|
||||
- file format comp ability. Breakage will be listed in the changelog.
|
||||
- new turn types and fields may be introduced. How to handle this see [the HTTP API docs](http.md).
|
||||
|
||||
- Forward-compatible HTTP API
|
||||
- Forward-compatible C++ library API
|
||||
- Forward-compatible node-osrm API
|
||||
- No compatiblity between OSRM datasets (needs new processing)
|
||||
What we guarantee on patch version changes:
|
||||
|
||||
### Patch version change
|
||||
- HTTP API does not include breaking changes
|
||||
- C++ library API does not include breaking changes
|
||||
- node-osrm API does not include breaking changes
|
||||
- full file format compatibility
|
||||
|
||||
- No change of query parameters or response formats
|
||||
- Compatible HTTP API
|
||||
- Compatible C++ library API
|
||||
- Compatible node-osrm API
|
||||
- Compatible OSRM datasets
|
||||
## Major or Minor release x.y
|
||||
|
||||
## Release and branch management
|
||||
1. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
||||
2. Make sure `CHANGELOG.md` is up to date.
|
||||
3. Make sure the OSRM version in `CMakeLists.txt` is up to date
|
||||
4. Use an annotated tag to mark the release: `git tag vx.y.0 -a` Body of the tag description should be the changelog entries.
|
||||
5. Push tags and commits: `git push; git push --tags`
|
||||
6. Branch of the `vx.y.0` tag to create a release branch `x.y`:
|
||||
`git branch x.y. vx.y.0; git push -u x.y:origin/x.y`
|
||||
7. Modify `.travis.yml` to allow builds for the `x.y` branch.
|
||||
8. Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
||||
|
||||
- The `master` branch is for the bleeding edge development
|
||||
- We create and maintain release branches `x.y` to control the release flow
|
||||
- No minor or major version will be released without a code-equal release candidates
|
||||
- For quality assurance, release candidates will be run on the demo server for 24 hours before releaseing the version proper
|
||||
- Patch versions may be released without a release candidate
|
||||
- We may backport fixes to older versions and release them as patch versions
|
||||
## Patch release x.y.z
|
||||
|
||||
## Releasing a version
|
||||
|
||||
1. Check out the appropriate release branch `x.y`
|
||||
2. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
||||
3. Make sure `CHANGELOG.md` is up to date.
|
||||
1. Check out the appropriate release branch x.y
|
||||
2. Make sure all fixes are listed in the changelog and included in the branch
|
||||
3. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
||||
4. Make sure the OSRM version in `CMakeLists.txt` is up to date
|
||||
5. 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. Push tags and commits: `git push; git push --tags`
|
||||
8. Proceede with the `node-osrm` release as [outlined in the repository](https://github.com/Project-OSRM/node-osrm/blob/master/docs/releasing.md).
|
||||
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
||||
7. Proceede with the `node-osrm` release as outlined in the repository.
|
||||
8. Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
||||
|
||||
|
||||
+16
-88
@@ -55,9 +55,7 @@ Background:
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -94,9 +92,7 @@ Background:
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -121,10 +117,8 @@ Background:
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -146,10 +140,8 @@ Background:
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
d c
|
||||
"""
|
||||
| a | b | e |
|
||||
| d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -173,10 +165,8 @@ Scenario: Enter and Exit mini roundabout with sharp angle # features/guidance/
|
||||
Given the profile "car" # features/step_definitions/data.js:8
|
||||
Given a grid size of 10 meters # features/step_definitions/data.js:20
|
||||
Given the node map # features/step_definitions/data.js:45
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
And the ways # features/step_definitions/data.js:128
|
||||
| nodes | highway | name |
|
||||
| ab | tertiary | MySt |
|
||||
@@ -205,11 +195,9 @@ OSRM converts the grid into a so called edge-based graph.
|
||||
```
|
||||
Scenario: Testbot - Intersection
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
b a d
|
||||
c
|
||||
"""
|
||||
| | e | |
|
||||
| b | a | d |
|
||||
| | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -225,13 +213,11 @@ To guarantee discovery, use:
|
||||
```
|
||||
Scenario: Testbot - Intersection
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
4
|
||||
b 1 a 3 d
|
||||
2
|
||||
c
|
||||
"""
|
||||
| | | e | | |
|
||||
| | | 4 | | |
|
||||
| b | 1 | a | 3 | d |
|
||||
| | | 2 | | |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -251,61 +237,3 @@ If you are testing for a duration metric, allow for a tiny offset to ensure a pa
|
||||
#### Don't Rely on Alternatives
|
||||
|
||||
Alternative route discovery is a random feature in itself. The discovery of routes depends on the contraction order of roads and cannot be assumed successful, ever.
|
||||
|
||||
### Understanding Turn Restrictions
|
||||
|
||||
Adding turn restrictions requires the restriction to follow a very specific format.
|
||||
|
||||
We specify them in a table with the header `| type | way:from | way:to | node:via | restriction |`.
|
||||
It is important that turn restrictions require micro segmentation.
|
||||
|
||||
Consider the following scenario:
|
||||
```
|
||||
Given the node map:
|
||||
"""
|
||||
e
|
||||
|
|
||||
a - - b - - c
|
||||
|
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abc | yes |
|
||||
| ebd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | ebd | b | no_right_turn |
|
||||
```
|
||||
|
||||
The setting looks perfectly fine at first glance. However, it is not well defined.
|
||||
The forbidden right turn could be either a superfluous addition, forbidding the turn `cb` to `be`, or actually refer to the turn `ab` to `bd` to say that a turn is forbidden here.
|
||||
|
||||
To model turn-restrictions correctly and unique, we need to split segments that contribute to the restriction into the smallest possible parts.
|
||||
E.g. the above scenario could correctly be expressed as:
|
||||
|
||||
```
|
||||
Given the node map:
|
||||
"""
|
||||
e
|
||||
|
|
||||
a - - b - - c
|
||||
|
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | name |
|
||||
| ab | yes | abc |
|
||||
| bc | yes | abc |
|
||||
| eb | yes | ebd |
|
||||
| bd | yes | ebd |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | ab | bd | b | no_right_turn |
|
||||
```
|
||||
|
||||
Unless this format is used, OSRM will omit the (then ambiguous) turn restrictions and ignore them.
|
||||
|
||||
+7
-3
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
int main(int argc, const char *argv[]) try
|
||||
{
|
||||
if (argc < 2)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ int main(int argc, const char *argv[])
|
||||
config.use_shared_memory = false;
|
||||
|
||||
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
|
||||
const OSRM osrm{config};
|
||||
OSRM osrm{config};
|
||||
|
||||
// The following shows how to use the Route service; configure this service
|
||||
RouteParameters params;
|
||||
@@ -67,7 +67,6 @@ int main(int argc, const char *argv[])
|
||||
|
||||
std::cout << "Distance: " << distance << " meter\n";
|
||||
std::cout << "Duration: " << duration << " seconds\n";
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
else if (status == Status::Error)
|
||||
{
|
||||
@@ -79,3 +78,8 @@ int main(int argc, const char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "Error: " << e.what() << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,9 @@ Feature: Bike - Squares and other areas
|
||||
@square
|
||||
Scenario: Bike - Route along edge of a squares
|
||||
Given the node map
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | area | highway |
|
||||
@@ -32,11 +30,9 @@ Feature: Bike - Squares and other areas
|
||||
@building
|
||||
Scenario: Bike - Don't route on buildings
|
||||
Given the node map
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | area | building | access |
|
||||
@@ -57,11 +53,9 @@ Feature: Bike - Squares and other areas
|
||||
@parking
|
||||
Scenario: Bike - parking areas
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b y
|
||||
d c
|
||||
"""
|
||||
| e | | | f |
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | amenity |
|
||||
@@ -87,10 +81,8 @@ Feature: Bike - Squares and other areas
|
||||
@train @platform
|
||||
Scenario: Bike - railway platforms
|
||||
Given the node map
|
||||
"""
|
||||
x a b y
|
||||
d c
|
||||
"""
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway |
|
||||
|
||||
@@ -6,11 +6,9 @@ Feature: Bicycle - Handle cycling
|
||||
|
||||
Scenario: Bicycle - Use a ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | bicycle |
|
||||
@@ -31,11 +29,9 @@ Feature: Bicycle - Handle cycling
|
||||
|
||||
Scenario: Bicycle - Properly handle durations
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | duration |
|
||||
|
||||
@@ -6,12 +6,10 @@ Feature: Bike - Destination only, no passing through
|
||||
|
||||
Scenario: Bike - Destination only street
|
||||
Given the node map
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -33,12 +31,10 @@ Feature: Bike - Destination only, no passing through
|
||||
|
||||
Scenario: Bike - Destination only street
|
||||
Given the node map
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -61,11 +57,9 @@ Feature: Bike - Destination only, no passing through
|
||||
|
||||
Scenario: Bike - Routing inside a destination only area
|
||||
Given the node map
|
||||
"""
|
||||
a c e
|
||||
b d
|
||||
x y
|
||||
"""
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
|
||||
@@ -6,11 +6,9 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
Scenario: Bike - Ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
@@ -31,12 +29,10 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
Scenario: Bike - Ferry duration, single node
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
e f
|
||||
g h
|
||||
i j
|
||||
"""
|
||||
| a | b | c | d |
|
||||
| | | e | f |
|
||||
| | | g | h |
|
||||
| | | i | j |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle | duration |
|
||||
@@ -52,10 +48,8 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
Scenario: Bike - Ferry duration, multiple nodes
|
||||
Given the node map
|
||||
"""
|
||||
x y
|
||||
a b c d
|
||||
"""
|
||||
| x | | | | | y |
|
||||
| | a | b | c | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle | duration |
|
||||
|
||||
@@ -7,15 +7,15 @@ Feature: Bike - Max speed restrictions
|
||||
|
||||
Scenario: Bicycle - Respect maxspeeds when lower that way type speed
|
||||
Then routability should be
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 15 km/h +- 1 |
|
||||
| residential | 10 | 10 km/h +- 1 |
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 15 km/h |
|
||||
| residential | 10 | 10 km/h |
|
||||
|
||||
Scenario: Bicycle - Ignore maxspeed when higher than way speed
|
||||
Then routability should be
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 15 km/h +- 1 |
|
||||
| residential | 80 | 15 km/h |
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 15 km/h |
|
||||
| residential | 80 | 15 km/h |
|
||||
|
||||
@todo
|
||||
Scenario: Bicycle - Maxspeed formats
|
||||
@@ -40,9 +40,7 @@ Feature: Bike - Max speed restrictions
|
||||
|
||||
Scenario: Bike - Do not use maxspeed when higher that way type speed
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed |
|
||||
@@ -63,14 +61,14 @@ Feature: Bike - Max speed restrictions
|
||||
| snail | 720s ~10% |
|
||||
|
||||
Then routability should be
|
||||
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| | | | 15 km/h +- 1 | 15 km/h +- 1 |
|
||||
| 10 | | | 10 km/h +- 1 | 10 km/h +- 1 |
|
||||
| | 10 | | 10 km/h +- 1 | 15 km/h +- 1 |
|
||||
| | | 10 | 15 km/h | 10 km/h +- 1 |
|
||||
| 2 | 10 | | 10 km/h +- 1 | 2 km/h |
|
||||
| 2 | | 10 | 2 km/h | 10 km/h +- 1 |
|
||||
| 2 | 5 | 10 | 5 km/h | 10 km/h +- 1 |
|
||||
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| | | | 15 km/h | 15 km/h |
|
||||
| 10 | | | 10 km/h | 10 km/h |
|
||||
| | 10 | | 10 km/h | 15 km/h |
|
||||
| | | 10 | 15 km/h | 10 km/h |
|
||||
| 2 | 10 | | 10 km/h | 2 km/h |
|
||||
| 2 | | 10 | 2 km/h | 10 km/h |
|
||||
| 2 | 5 | 10 | 5 km/h | 10 km/h |
|
||||
|
||||
Scenario: Bike - Maxspeed should not allow routing on unroutable ways
|
||||
Then routability should be
|
||||
|
||||
@@ -6,10 +6,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when using a ferry
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -28,10 +26,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when using a train
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
@@ -50,10 +46,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when pushing bike against oneways
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
f c d
|
||||
"""
|
||||
| a | b | e |
|
||||
| f | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -75,10 +69,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain streets
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -97,10 +89,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain areas
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d f
|
||||
"""
|
||||
| a | b | | |
|
||||
| | c | d | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | area |
|
||||
@@ -119,10 +109,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when pushing on steps
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d f
|
||||
"""
|
||||
| a | b | | |
|
||||
| | c | d | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -141,10 +129,8 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bike - Mode when bicycle=dismount
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d f
|
||||
"""
|
||||
| a | b | | |
|
||||
| | c | d | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bicycle |
|
||||
@@ -163,9 +149,7 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bicycle - Modes when starting on forward oneway
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -178,9 +162,7 @@ Feature: Bike - Mode flag
|
||||
|
||||
Scenario: Bicycle - Modes when starting on reverse oneway
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
|
||||
@@ -6,10 +6,8 @@ Feature: Bike - Street names in instructions
|
||||
|
||||
Scenario: Bike - A named street
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
@@ -17,15 +15,13 @@ Feature: Bike - Street names in instructions
|
||||
| bc | Your Way | A7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way,Your Way | A6,A7,A7 |
|
||||
| from | to | route |
|
||||
| a | c | My Way (A6),Your Way (A7),Your Way (A7) |
|
||||
|
||||
@unnamed
|
||||
Scenario: Bike - No longer use way type to describe unnamed ways, see #3231
|
||||
Scenario: Bike - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -33,5 +29,5 @@ Feature: Bike - Street names in instructions
|
||||
| bcd | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | , |
|
||||
| from | to | route |
|
||||
| a | d | {highway:cycleway},{highway:track},{highway:track} |
|
||||
|
||||
@@ -18,10 +18,8 @@ Feature: Bike - Oneway streets
|
||||
|
||||
Scenario: Bike - Around the Block
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
f d c e
|
||||
"""
|
||||
| | a | b | |
|
||||
| f | d | c | e |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -119,9 +117,7 @@ Feature: Bike - Oneway streets
|
||||
|
||||
Scenario: Bike - Two consecutive oneways
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
|
||||
@@ -35,11 +35,9 @@ Feature: Bike - Accessability of different way types
|
||||
@square
|
||||
Scenario: Bike - Push bikes on pedestrian areas
|
||||
Given the node map
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | area | highway |
|
||||
@@ -65,7 +63,6 @@ Feature: Bike - Accessability of different way types
|
||||
| runway | | | |
|
||||
| runway | yes | foot | foot |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Pushing bikes on ways with foot=yes in one direction
|
||||
Then routability should be
|
||||
| highway | foot:forward | foot:backward | forw | backw |
|
||||
@@ -90,10 +87,8 @@ Feature: Bike - Accessability of different way types
|
||||
|
||||
Scenario: Bike - Instructions when pushing bike on oneways
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
f c d
|
||||
"""
|
||||
| a | b | e |
|
||||
| f | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -112,10 +107,8 @@ Feature: Bike - Accessability of different way types
|
||||
|
||||
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
|
||||
@@ -6,37 +6,31 @@ Feature: Bike - Way ref
|
||||
|
||||
Scenario: Bike - Way with both name and ref
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| 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 |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive (E7),Utopia Drive (E7) |
|
||||
|
||||
Scenario: Bike - Way with only ref
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | ref |
|
||||
| a | b | , | E7,E7 |
|
||||
| from | to | route |
|
||||
| a | b | E7,E7 |
|
||||
|
||||
Scenario: Bike - Way with only name
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
|
||||
@@ -9,11 +9,9 @@ Feature: Bike - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Bike - No left turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -35,11 +33,9 @@ Feature: Bike - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Bike - No right turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -61,11 +57,9 @@ Feature: Bike - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Bike - No u-turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -87,11 +81,9 @@ Feature: Bike - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Bike - Handle any no_* relation
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -113,11 +105,9 @@ Feature: Bike - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Bike - Only left turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -139,11 +129,9 @@ Feature: Bike - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Bike - Only right turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -165,11 +153,9 @@ Feature: Bike - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Bike - Only straight on
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -191,11 +177,9 @@ Feature: Bike - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Bike - Handle any only_* restriction
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -217,11 +201,9 @@ Feature: Bike - Turn restrictions
|
||||
@except
|
||||
Scenario: Bike - Except tag and on no_ restrictions
|
||||
Given the node map
|
||||
"""
|
||||
b x c
|
||||
a j d
|
||||
s
|
||||
"""
|
||||
| b | x | c |
|
||||
| a | j | d |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -249,11 +231,9 @@ Feature: Bike - Turn restrictions
|
||||
@except
|
||||
Scenario: Bike - Except tag and on only_ restrictions
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
j
|
||||
s
|
||||
"""
|
||||
| a | | b |
|
||||
| | j | |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -273,14 +253,12 @@ Feature: Bike - Turn restrictions
|
||||
@except
|
||||
Scenario: Bike - Multiple except tag values
|
||||
Given the node map
|
||||
"""
|
||||
s j a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
"""
|
||||
| s | j | a |
|
||||
| | | b |
|
||||
| | | c |
|
||||
| | | d |
|
||||
| | | e |
|
||||
| | | f |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
|
||||
@@ -14,10 +14,8 @@ Feature: Bike - Stop areas for public transport
|
||||
|
||||
Scenario: Bike - railway platforms
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
s t
|
||||
"""
|
||||
| a | b | c | d |
|
||||
| | s | t | |
|
||||
|
||||
And the nodes
|
||||
| node | public_transport |
|
||||
|
||||
@@ -7,43 +7,42 @@ Feature: Bike - Surfaces
|
||||
Scenario: Bicycle - Slow surfaces
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48 s |
|
||||
| cycleway | asphalt | 48 s |
|
||||
| cycleway | cobblestone:flattened | 72 s |
|
||||
| cycleway | paving_stones | 72 s |
|
||||
| cycleway | compacted | 72 s |
|
||||
| cycleway | cobblestone | 120 s |
|
||||
| cycleway | fine_gravel | 120 s |
|
||||
| cycleway | gravel | 120 s |
|
||||
| cycleway | pebblestone | 120 s |
|
||||
| cycleway | dirt | 120 s |
|
||||
| cycleway | earth | 120 s |
|
||||
| cycleway | grass | 120 s |
|
||||
| cycleway | mud | 240 s |
|
||||
| cycleway | sand | 240 s |
|
||||
| cycleway | | 48s |
|
||||
| cycleway | asphalt | 48s |
|
||||
| cycleway | cobblestone:flattened | 72s |
|
||||
| cycleway | paving_stones | 72s |
|
||||
| cycleway | compacted | 72s |
|
||||
| cycleway | cobblestone | 120s |
|
||||
| cycleway | unpaved | 120s |
|
||||
| cycleway | fine_gravel | 120s |
|
||||
| cycleway | gravel | 120s |
|
||||
| cycleway | pebblestone | 120s |
|
||||
| cycleway | dirt | 120s |
|
||||
| cycleway | earth | 120s |
|
||||
| cycleway | grass | 120s |
|
||||
| cycleway | mud | 240s |
|
||||
| cycleway | sand | 240s |
|
||||
|
||||
Scenario: Bicycle - Good surfaces on small paths
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48 s |
|
||||
| path | | 60 s |
|
||||
| track | | 60 s |
|
||||
| track | asphalt | 60 s |
|
||||
| path | asphalt | 60 s |
|
||||
| cycleway | | 48s |
|
||||
| path | | 60s |
|
||||
| track | | 60s |
|
||||
| track | asphalt | 48s |
|
||||
| path | asphalt | 48s |
|
||||
|
||||
Scenario: Bicycle - Surfaces should not make unknown ways routable
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48 s |
|
||||
| cycleway | | 48s |
|
||||
| nosense | | |
|
||||
| nosense | asphalt | |
|
||||
|
||||
Scenario: Bicycle - Surfaces should not increase speed when pushing bikes
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b |
|
||||
| c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | surface |
|
||||
|
||||
@@ -7,11 +7,9 @@ Feature: Turn Penalties
|
||||
Scenario: Bike - turns should incur a delay that depend on the angle
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
c d e
|
||||
b j f
|
||||
a s g
|
||||
"""
|
||||
| c | d | e |
|
||||
| b | j | f |
|
||||
| a | s | g |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Car - Restricted access
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Access tag hierarchy on ways
|
||||
Scenario: Car - Access tag hierarchy on ways
|
||||
Then routability should be
|
||||
| access | vehicle | motor_vehicle | motorcar | bothw |
|
||||
| | | | | x |
|
||||
@@ -148,44 +148,3 @@ Feature: Car - Restricted access
|
||||
| primary | | | no | | x |
|
||||
| runway | | | | yes | |
|
||||
| primary | | | | no | x |
|
||||
|
||||
Scenario: Car - only designated HOV ways are ignored by default
|
||||
Then routability should be
|
||||
| highway | hov | bothw |
|
||||
| primary | designated | |
|
||||
| primary | yes | x |
|
||||
| primary | no | x |
|
||||
|
||||
Scenario: Car - a way with all lanes HOV-designated is inaccessible by default (similar to hov=designated)
|
||||
Then routability should be
|
||||
| highway | hov:lanes:forward | hov:lanes:backward | hov:lanes | oneway | forw | backw |
|
||||
| primary | designated | designated | | | | |
|
||||
| primary | | designated | | | x | |
|
||||
| primary | designated | | | | | x |
|
||||
| primary | designated\|designated | designated\|designated | | | | |
|
||||
| primary | designated\|no | designated\|no | | | x | x |
|
||||
| primary | yes\|no | yes\|no | | | x | x |
|
||||
| primary | | | | | x | x |
|
||||
| primary | designated | | | -1 | | |
|
||||
| primary | | designated | | -1 | | x |
|
||||
| primary | | | designated | yes | | |
|
||||
| primary | | | designated | -1 | | |
|
||||
| primary | | | designated\| | yes | x | |
|
||||
| primary | | | designated\| | -1 | | x |
|
||||
| primary | | | designated\|designated | yes | | |
|
||||
| primary | | | designated\|designated | -1 | | |
|
||||
| primary | | | designated\|yes | yes | x | |
|
||||
| primary | | | designated\|no | -1 | | x |
|
||||
|
||||
Scenario: Car - these toll roads always work
|
||||
Then routability should be
|
||||
| highway | toll | bothw |
|
||||
| primary | no | x |
|
||||
| primary | snowmobile | x |
|
||||
|
||||
# To test this we need issue #2781
|
||||
@todo
|
||||
Scenario: Car - only toll=yes ways are ignored by default
|
||||
Then routability should be
|
||||
| highway | toll | bothw |
|
||||
| primary | yes | |
|
||||
|
||||
@@ -8,9 +8,7 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
Scenario: Car - Advisory speed overwrites maxspeed
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed | maxspeed:advisory |
|
||||
@@ -19,14 +17,12 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 36 km/h +- 1 |
|
||||
| b | c | bc,bc | 36 km/h +- 1 |
|
||||
| a | b | ab,ab | 47 km/h +- 1 |
|
||||
| b | c | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites forward maxspeed
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:forward | maxspeed:advisory:forward |
|
||||
@@ -35,14 +31,12 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 36 km/h +- 1 |
|
||||
| b | c | bc,bc | 36 km/h +- 1 |
|
||||
| a | b | ab,ab | 47 km/h +- 1 |
|
||||
| b | c | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites backwards maxspeed
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
|
||||
@@ -51,14 +45,12 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| b | a | ab,ab | 36 km/h +- 1 |
|
||||
| c | b | bc,bc | 36 km/h +- 1 |
|
||||
| b | a | ab,ab | 47 km/h +- 1 |
|
||||
| c | b | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites backwards maxspeed
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
|
||||
@@ -68,14 +60,12 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| c | b | bc,bc | 36 km/h +- 1 |
|
||||
| d | c | cd,cd | 36 km/h +- 1 |
|
||||
| c | b | bc,bc | 47 km/h +- 1 |
|
||||
| d | c | cd,cd | 47 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Directional advisory speeds play nice with eachother
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:advisory | maxspeed:advisory:forward | maxspeed:advisory:backward |
|
||||
@@ -84,9 +74,9 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 36 km/h +- 1 |
|
||||
| b | a | ab,ab | 48 km/h +- 1 |
|
||||
| b | c | bc,bc | 48 km/h +- 1 |
|
||||
| c | b | bc,bc | 36 km/h +- 1 |
|
||||
| a | b | ab,ab | 47 km/h +- 1 |
|
||||
| b | a | ab,ab | 59 km/h +- 1 |
|
||||
| b | c | bc,bc | 59 km/h +- 1 |
|
||||
| c | b | bc,bc | 47 km/h +- 1 |
|
||||
|
||||
|
||||
|
||||
+14
-18
@@ -6,11 +6,9 @@ Feature: Car - Handle driving
|
||||
|
||||
Scenario: Car - Use a ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | bicycle |
|
||||
@@ -19,23 +17,21 @@ Feature: Car - Handle driving
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving |
|
||||
| e | c | cde,cde | driving,driving |
|
||||
| e | c | cde,cde | driving,driving |
|
||||
| e | b | cde,abc,abc | driving,driving,driving |
|
||||
| e | a | cde,abc,abc | driving,driving,driving |
|
||||
| c | e | cde,cde | driving,driving |
|
||||
| c | e | cde,cde | driving,driving |
|
||||
| c | f | cde,efg,efg | driving,driving,driving |
|
||||
| c | g | cde,efg,efg | driving,driving,driving |
|
||||
|
||||
Scenario: Car - Properly handle durations
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | duration |
|
||||
@@ -44,8 +40,8 @@ Feature: Car - Handle driving
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 6 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 4 km/h |
|
||||
| c | e | cde,cde | driving,driving | 2 km/h |
|
||||
| e | c | cde,cde | driving,driving | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 7 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 5 km/h |
|
||||
| c | e | cde,cde | driving,driving | 2 km/h |
|
||||
| e | c | cde,cde | driving,driving | 2 km/h |
|
||||
|
||||
@@ -6,12 +6,10 @@ Feature: Car - Destination only, no passing through
|
||||
|
||||
Scenario: Car - Destination only street
|
||||
Given the node map
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -33,12 +31,10 @@ Feature: Car - Destination only, no passing through
|
||||
|
||||
Scenario: Car - Destination only street
|
||||
Given the node map
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -61,11 +57,9 @@ Feature: Car - Destination only, no passing through
|
||||
|
||||
Scenario: Car - Routing inside a destination only area
|
||||
Given the node map
|
||||
"""
|
||||
a c e
|
||||
b d
|
||||
x y
|
||||
"""
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
|
||||
+17
-23
@@ -6,11 +6,9 @@ Feature: Car - Handle ferry routes
|
||||
|
||||
Scenario: Car - Use a ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
@@ -31,11 +29,9 @@ Feature: Car - Handle ferry routes
|
||||
|
||||
Scenario: Car - Properly handle simple durations
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -45,18 +41,16 @@ Feature: Car - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 23 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h |
|
||||
| c | e | cde,cde | ferry,ferry | 11 km/h |
|
||||
| e | c | cde,cde | ferry,ferry | 11 km/h |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 25 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 20 km/h |
|
||||
| c | e | cde,cde | ferry,ferry | 12 km/h |
|
||||
| e | c | cde,cde | ferry,ferry | 12 km/h |
|
||||
|
||||
Scenario: Car - Properly handle ISO 8601 durations
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -66,7 +60,7 @@ Feature: Car - Handle ferry routes
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 23 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h |
|
||||
| c | e | cde,cde | ferry,ferry | 11 km/h |
|
||||
| e | c | cde,cde | ferry,ferry | 11 km/h |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 25 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 20 km/h |
|
||||
| c | e | cde,cde | ferry,ferry | 12 km/h |
|
||||
| e | c | cde,cde | ferry,ferry | 12 km/h |
|
||||
|
||||
+10
-20
@@ -9,10 +9,8 @@ Feature: Car - Speed on links
|
||||
|
||||
Scenario: Car - Use motorway_link when reasonable
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -32,10 +30,8 @@ Feature: Car - Speed on links
|
||||
|
||||
Scenario: Car - Use trunk_link when reasonable
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -54,10 +50,8 @@ Feature: Car - Speed on links
|
||||
|
||||
Scenario: Car - Use primary_link when reasonable
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -76,10 +70,8 @@ Feature: Car - Speed on links
|
||||
|
||||
Scenario: Car - Use secondary_link when reasonable
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -99,10 +91,8 @@ Feature: Car - Speed on links
|
||||
|
||||
Scenario: Car - Use tertiary_link when reasonable
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
|
||||
@@ -8,9 +8,7 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
Scenario: Car - Respect maxspeeds when lower that way type speed
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e f g
|
||||
"""
|
||||
| a | b | c | d | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed |
|
||||
@@ -22,19 +20,17 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
| fg | trunk | CH:motorway |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 68 km/h |
|
||||
| b | c | bc,bc | 48 km/h |
|
||||
| c | d | cd,cd | 40 km/h |
|
||||
| d | e | de,de | 64 km/h |
|
||||
| e | f | ef,ef | 80 km/h |
|
||||
| f | g | fg,fg | 96 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 79 km/h |
|
||||
| b | c | bc,bc | 59 km/h +- 1 |
|
||||
| c | d | cd,cd | 51 km/h |
|
||||
| d | e | de,de | 75 km/h |
|
||||
| e | f | ef,ef | 91 km/h |
|
||||
| f | g | fg,fg | 107 km/h |
|
||||
|
||||
Scenario: Car - Do not ignore maxspeed when higher than way speed
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed |
|
||||
@@ -43,23 +39,23 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
| cd | living_street | FR:urban |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 20 km/h |
|
||||
| b | c | bc,bc | 72 km/h |
|
||||
| c | d | cd,cd | 40 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 31 km/h |
|
||||
| b | c | bc,bc | 83 km/h +- 1 |
|
||||
| c | d | cd,cd | 51 km/h |
|
||||
|
||||
Scenario: Car - Forward/backward maxspeed
|
||||
Given a grid size of 100 meters
|
||||
|
||||
Then routability should be
|
||||
| highway | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| primary | | | | 52 km/h | 52 km/h |
|
||||
| primary | 60 | | | 48 km/h | 48 km/h |
|
||||
| primary | | 60 | | 48 km/h | 48 km/h +- 5 |
|
||||
| primary | | | 60 | 52 km/h | 52 km/h +- 5 |
|
||||
| primary | 15 | 60 | | 48 km/h | 12 km/h |
|
||||
| primary | 15 | | 60 | 12 km/h | 48 km/h |
|
||||
| primary | 15 | 30 | 60 | 24 km/h | 48 km/h |
|
||||
| primary | | | | 65 km/h | 65 km/h |
|
||||
| primary | 60 | | | 60 km/h | 60 km/h |
|
||||
| primary | | 60 | | 60 km/h | 65 km/h |
|
||||
| primary | | | 60 | 65 km/h | 60 km/h |
|
||||
| primary | 15 | 60 | | 60 km/h | 23 km/h |
|
||||
| primary | 15 | | 60 | 23 km/h | 60 km/h |
|
||||
| primary | 15 | 30 | 60 | 34 km/h | 60 km/h |
|
||||
|
||||
Scenario: Car - Maxspeed should not allow routing on unroutable ways
|
||||
Then routability should be
|
||||
@@ -82,44 +78,44 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
Then routability should be
|
||||
|
||||
| highway | maxspeed | width | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| primary | | | | | 52 km/h | 52 km/h |
|
||||
| primary | | | | | 63 km/h | 63 km/h |
|
||||
| primary | | 3 | | | 32 km/h | 32 km/h |
|
||||
| primary | 60 | | | | 47 km/h | 47 km/h |
|
||||
| primary | 60 | 3 | | | 29 km/h | 29 km/h |
|
||||
| primary | | | 60 | | 47 km/h | 52 km/h |
|
||||
| primary | | 3 | 60 | | 29 km/h | 32 km/h |
|
||||
| primary | | | | 60 | 52 km/h | 47 km/h |
|
||||
| primary | | 3 | | 60 | 32 km/h | 29 km/h |
|
||||
| primary | 15 | | 60 | | 47 km/h | 12 km/h |
|
||||
| primary | 15 | 3 | 60 | | 29 km/h | 7 km/h |
|
||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h |
|
||||
| primary | 15 | 3 | | 60 | 7 km/h | 29 km/h |
|
||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h |
|
||||
| primary | 15 | 3 | 30 | 60 | 14 km/h | 29 km/h |
|
||||
| primary | 60 | | | | 59 km/h | 59 km/h |
|
||||
| primary | 60 | 3 | | | 30 km/h | 30 km/h |
|
||||
| primary | | | 60 | | 59 km/h | 63 km/h |
|
||||
| primary | | 3 | 60 | | 30 km/h | 32 km/h |
|
||||
| primary | | | | 60 | 63 km/h | 59 km/h |
|
||||
| primary | | 3 | | 60 | 32 km/h | 30 km/h |
|
||||
| primary | 15 | | 60 | | 59 km/h | 23 km/h |
|
||||
| primary | 15 | 3 | 60 | | 30 km/h | 7 km/h |
|
||||
| primary | 15 | | | 60 | 23 km/h | 59 km/h |
|
||||
| primary | 15 | 3 | | 60 | 7 km/h | 30 km/h |
|
||||
| primary | 15 | | 30 | 60 | 34 km/h | 59 km/h |
|
||||
| primary | 15 | 3 | 30 | 60 | 15 km/h | 30 km/h |
|
||||
|
||||
Scenario: Car - Single lane streets be ignored or incur a penalty
|
||||
Then routability should be
|
||||
|
||||
| highway | maxspeed | lanes | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| primary | | | | | 52 km/h | 52 km/h |
|
||||
| primary | | | | | 63 km/h | 63 km/h |
|
||||
| primary | | 1 | | | 32 km/h | 32 km/h |
|
||||
| primary | 60 | | | | 47 km/h | 47 km/h |
|
||||
| primary | 60 | 1 | | | 29 km/h | 29 km/h |
|
||||
| primary | | | 60 | | 47 km/h | 52 km/h |
|
||||
| primary | | 1 | 60 | | 29 km/h | 32 km/h |
|
||||
| primary | | | | 60 | 52 km/h | 47 km/h |
|
||||
| primary | | 1 | | 60 | 32 km/h | 29 km/h |
|
||||
| primary | 15 | | 60 | | 47 km/h | 12 km/h |
|
||||
| primary | 15 | 1 | 60 | | 29 km/h | 7 km/h |
|
||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h |
|
||||
| primary | 15 | 1 | | 60 | 7 km/h | 29 km/h |
|
||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h |
|
||||
| primary | 15 | 1 | 30 | 60 | 14 km/h | 29 km/h |
|
||||
| primary | 60 | | | | 59 km/h | 59 km/h |
|
||||
| primary | 60 | 1 | | | 30 km/h | 30 km/h |
|
||||
| primary | | | 60 | | 59 km/h | 63 km/h |
|
||||
| primary | | 1 | 60 | | 30 km/h | 32 km/h |
|
||||
| primary | | | | 60 | 63 km/h | 59 km/h |
|
||||
| primary | | 1 | | 60 | 32 km/h | 30 km/h |
|
||||
| primary | 15 | | 60 | | 59 km/h | 23 km/h |
|
||||
| primary | 15 | 1 | 60 | | 30 km/h | 7 km/h |
|
||||
| primary | 15 | | | 60 | 23 km/h | 59 km/h |
|
||||
| primary | 15 | 1 | | 60 | 7 km/h | 30 km/h |
|
||||
| primary | 15 | | 30 | 60 | 34 km/h | 59 km/h |
|
||||
| primary | 15 | 1 | 30 | 60 | 15 km/h | 30 km/h |
|
||||
|
||||
Scenario: Car - Single lane streets only incure a penalty for two-way streets
|
||||
Then routability should be
|
||||
| highway | maxspeed | lanes | oneway | forw | backw |
|
||||
| primary | 30 | 1 | yes | 23 km/h | |
|
||||
| primary | 30 | 1 | -1 | | 23 km/h |
|
||||
| primary | 30 | 1 | yes | 34 km/h | |
|
||||
| primary | 30 | 1 | -1 | | 34 km/h |
|
||||
| primary | 30 | 1 | | 15 km/h | 15 km/h |
|
||||
| primary | 30 | 2 | | 23 km/h | 23 km/h |
|
||||
| primary | 30 | 2 | | 34 km/h | 34 km/h |
|
||||
|
||||
@@ -5,10 +5,8 @@ Feature: Car - Mode flag
|
||||
|
||||
Scenario: Car - Mode when using a ferry
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -27,9 +25,7 @@ Feature: Car - Mode flag
|
||||
|
||||
Scenario: Car - Snapping when using a ferry
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e f
|
||||
"""
|
||||
| a | b | | c | d | | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
|
||||
+12
-68
@@ -3,14 +3,11 @@ Feature: Car - Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
Scenario: Car - A named street
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
@@ -18,53 +15,30 @@ Feature: Car - Street names in instructions
|
||||
| bc | Your Way | A1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way,Your Way | ,A1,A1|
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way (A1),Your Way (A1) |
|
||||
|
||||
Scenario: Car - A named street with pronunciation
|
||||
Given the node map
|
||||
"""
|
||||
a b d
|
||||
1
|
||||
c
|
||||
"""
|
||||
| a | b | d |
|
||||
| | 1 | |
|
||||
| | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | name |name:pronunciation | ref |
|
||||
| nodes | name |name:pronunciation | ref |
|
||||
| ab | My Way | | |
|
||||
| bd | My Way | meyeway | A1 |
|
||||
| cd | Your Way | yourewaye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | pronunciations | ref |
|
||||
| a | d | My Way,My Way,My Way | ,meyeway,meyeway | ,A1,A1 |
|
||||
| 1 | c | Your Way,Your Way | yourewaye,yourewaye | , |
|
||||
|
||||
# See #2860
|
||||
Scenario: Car - same street name but different pronunciation
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | name:pronunciation |
|
||||
| abc | Houston St | hew-stun |
|
||||
| bde | Houston St | how-stun |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | pronunciations |
|
||||
| a | c | Houston St,Houston St | hew-stun,hew-stun |
|
||||
| a | e | Houston St,Houston St,Houston St | hew-stun,how-stun,how-stun |
|
||||
| from | to | route | pronunciations |
|
||||
| a | d | My Way,My Way (A1) | ,meyeway |
|
||||
| 1 | c | Your Way,Your Way | yourewaye,yourewaye |
|
||||
|
||||
@todo
|
||||
Scenario: Car - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -74,33 +48,3 @@ Feature: Car - Street names in instructions
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | tertiary,residential,residential |
|
||||
|
||||
Scenario: Inner city expressway with on road
|
||||
Given the node map
|
||||
"""
|
||||
a b c g
|
||||
f
|
||||
|
||||
|
||||
|
||||
d
|
||||
|
||||
|
||||
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | name:pronunciation |
|
||||
| abc | primary | road | roooaad |
|
||||
| cg | primary | road | roooaad |
|
||||
| bfd | trunk_link | | |
|
||||
| cde | trunk | trunk | truank |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cde | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | pronunciations |
|
||||
| a,e | road,trunk,trunk | depart,turn right,arrive | roooaad,truank,truank |
|
||||
|
||||
@@ -35,10 +35,8 @@ Feature: Car - Oneway streets
|
||||
|
||||
Scenario: Car - Around the Block
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
f d c e
|
||||
"""
|
||||
| | a | b | |
|
||||
| f | d | c | e |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -72,9 +70,7 @@ Feature: Car - Oneway streets
|
||||
|
||||
Scenario: Car - Two consecutive oneways
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -85,12 +81,3 @@ Feature: Car - Oneway streets
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
|
||||
|
||||
# Reversible oneways (low frequency) vs alternating oneways (high frequency).
|
||||
# See: https://github.com/Project-OSRM/osrm-backend/issues/2837
|
||||
Scenario: Car - Route over alternating but not reversible oneways
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | reversible | | |
|
||||
| primary | alternating | x | x |
|
||||
|
||||
@@ -10,11 +10,9 @@ Feature: Car - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Car - No left turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -36,11 +34,9 @@ Feature: Car - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Car - No straight on
|
||||
Given the node map
|
||||
"""
|
||||
a b j d e
|
||||
v z
|
||||
w x y
|
||||
"""
|
||||
| a | b | j | d | e |
|
||||
| v | | | | z |
|
||||
| | w | x | y | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -66,11 +62,9 @@ Feature: Car - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Car - No right turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -92,11 +86,9 @@ Feature: Car - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Car - No u-turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -118,11 +110,9 @@ Feature: Car - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Car - Handle any no_* relation
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -144,11 +134,9 @@ Feature: Car - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Car - Only left turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -161,38 +149,18 @@ Feature: Car - Turn restrictions
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | sj | wj | j | only_left_turn |
|
||||
|
||||
Scenario: Car - Only right turn, invalid
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e r
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
| re | -1 |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | sj | er | j | only_right_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | r | sj,ej,re,re |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | |
|
||||
| s | e | |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only right turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -214,11 +182,9 @@ Feature: Car - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Car - Only straight on
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -240,11 +206,9 @@ Feature: Car - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Car - Handle any only_* restriction
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -266,11 +230,9 @@ Feature: Car - Turn restrictions
|
||||
@specific
|
||||
Scenario: Car - :hgv-qualified on a standard turn restriction
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -292,11 +254,9 @@ Feature: Car - Turn restrictions
|
||||
@specific
|
||||
Scenario: Car - :motorcar-qualified on a standard turn restriction
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -318,11 +278,9 @@ Feature: Car - Turn restrictions
|
||||
@except
|
||||
Scenario: Car - Except tag and on no_ restrictions
|
||||
Given the node map
|
||||
"""
|
||||
b x c
|
||||
a j d
|
||||
s
|
||||
"""
|
||||
| b | x | c |
|
||||
| a | j | d |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -350,11 +308,9 @@ Feature: Car - Turn restrictions
|
||||
@except
|
||||
Scenario: Car - Except tag and on only_ restrictions
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
j
|
||||
s
|
||||
"""
|
||||
| a | | b |
|
||||
| | j | |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -374,12 +330,10 @@ Feature: Car - Turn restrictions
|
||||
@except
|
||||
Scenario: Car - Several only_ restrictions at the same segment
|
||||
Given the node map
|
||||
"""
|
||||
y
|
||||
i j f b x a e g h
|
||||
|
||||
c d
|
||||
"""
|
||||
| | | | | y | | | | |
|
||||
| i | j | f | b | x | a | e | g | h |
|
||||
| | | | | | | | | |
|
||||
| | | | c | | d | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -411,15 +365,13 @@ Feature: Car - Turn restrictions
|
||||
@except
|
||||
Scenario: Car - two only_ restrictions share same to-way
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
a
|
||||
|
||||
c x d
|
||||
y
|
||||
|
||||
b
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| | | | | a | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | c | | x | | d | | |
|
||||
| | | | | y | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | b | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -447,15 +399,13 @@ Feature: Car - Turn restrictions
|
||||
@except
|
||||
Scenario: Car - two only_ restrictions share same from-way
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
a
|
||||
|
||||
c x d
|
||||
y
|
||||
|
||||
b
|
||||
"""
|
||||
| | | e | | | | f | | |
|
||||
| | | | | a | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | c | | x | | d | | |
|
||||
| | | | | y | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | b | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -480,29 +430,3 @@ Feature: Car - Turn restrictions
|
||||
| a | b | ax,xy,yb,yb |
|
||||
| b | a | yb,xy,ax,ax |
|
||||
|
||||
@specific
|
||||
Scenario: Car - Ignore unrecognized 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 | wj | j | yield |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
@routing @car @surface
|
||||
Feature: Car - Surfaces
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Surface should reduce speed
|
||||
Then routability should be
|
||||
| highway | service | forw | backw |
|
||||
| service | alley | 5 km/h +-1 | 5 km/h +-1 |
|
||||
| service | emergency_access | | |
|
||||
| service | driveway | 5 km/h +-1 | 5 km/h +-1 |
|
||||
| service | drive-through | 5 km/h +-1 | 5 km/h +-1 |
|
||||
| service | parking | 5 km/h +-1 | 5 km/h +-1 |
|
||||
@@ -6,11 +6,9 @@ Feature: Car - Handle ferryshuttle train routes
|
||||
|
||||
Scenario: Car - Use a ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g h
|
||||
"""
|
||||
| a | b | c | | | |
|
||||
| | | d | | | |
|
||||
| | | e | f | g | h |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
|
||||
+15
-28
@@ -7,31 +7,18 @@ Feature: Car - speeds
|
||||
|
||||
Scenario: Car - speed of various way types
|
||||
Then routability should be
|
||||
| highway | oneway | bothw |
|
||||
| motorway | no | 71 km/h |
|
||||
| motorway_link | no | 36 km/h |
|
||||
| trunk | no | 68 km/h |
|
||||
| trunk_link | no | 31 km/h |
|
||||
| primary | no | 52 km/h |
|
||||
| primary_link | no | 23 km/h |
|
||||
| secondary | no | 44 km/h |
|
||||
| secondary_link | no | 19 km/h |
|
||||
| tertiary | no | 31 km/h |
|
||||
| tertiary_link | no | 16 km/h |
|
||||
| unclassified | no | 19 km/h |
|
||||
| residential | no | 19 km/h |
|
||||
| living_street | no | 8 km/h |
|
||||
| service | no | 11 km/h |
|
||||
|
||||
# Alternating oneways have to take average waiting time into account.
|
||||
Scenario: Car - scaled speeds for oneway=alternating
|
||||
Then routability should be
|
||||
| highway | oneway | junction | forw | backw | # |
|
||||
| tertiary | | | 31 km/h | 31 km/h | |
|
||||
| tertiary | alternating | | 12 km/h +- 1 | 12 km/h +- 1 | |
|
||||
| motorway | | | 71 km/h | | implied oneway |
|
||||
| motorway | alternating | | 28 km/h +- 1 | | implied oneway |
|
||||
| motorway | reversible | | | | unroutable |
|
||||
| primary | | roundabout | 52 km/h | | implied oneway |
|
||||
| primary | alternating | roundabout | 20 km/h +- 1 | | implied oneway |
|
||||
| primary | reversible | roundabout | | | unroutable |
|
||||
| highway | oneway | bothw |
|
||||
| motorway | no | 82 km/h |
|
||||
| motorway_link | no | 47 km/h |
|
||||
| trunk | no | 79 km/h +- 1 |
|
||||
| trunk_link | no | 43 km/h +- 1 |
|
||||
| primary | no | 63 km/h +- 1 |
|
||||
| primary_link | no | 34 km/h |
|
||||
| secondary | no | 54 km/h +- 1 |
|
||||
| secondary_link | no | 31 km/h |
|
||||
| tertiary | no | 43 km/h |
|
||||
| tertiary_link | no | 26 km/h |
|
||||
| unclassified | no | 31 km/h |
|
||||
| residential | no | 31 km/h |
|
||||
| living_street | no | 18 km/h |
|
||||
| service | no | 23 km/h |
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
@routing @basic @car
|
||||
Feature: Basic Routing
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 500 meters
|
||||
|
||||
@smallest
|
||||
Scenario: Summaries when routing on a simple network
|
||||
Given the node map
|
||||
"""
|
||||
b f
|
||||
|
||||
c d g
|
||||
|
||||
a e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| acb | road |
|
||||
| de | 1 st |
|
||||
| cd | |
|
||||
| dg | blvd |
|
||||
| df | street |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,e | road,,1 st,1 st | road, 1 st |
|
||||
| a,d,f | road,,,street,street | road;street |
|
||||
| a,e,f | road,,1 st,1 st,1 st,street,street | road, 1 st;1 st, street |
|
||||
|
||||
Scenario: Name Empty
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | road |
|
||||
| bc | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,c | road, | road |
|
||||
|
||||
Scenario: Name Empty But Ref
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | road | |
|
||||
| bc | | 101 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,c | road, | road, 101 |
|
||||
|
||||
Scenario: Only Refs
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | 100 |
|
||||
| bc | | 101 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,c | , | 100, 101 |
|
||||
|
||||
Scenario: Single Ref
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | |
|
||||
| bc | | 101 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,c | ,, | 101 |
|
||||
|
||||
Scenario: Nothing
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | |
|
||||
| bc | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,c | , | |
|
||||
@@ -4,7 +4,7 @@ Feature: Car - Surfaces
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Routability of tracktype tags
|
||||
Scenario: Car - Routeability of tracktype tags
|
||||
Then routability should be
|
||||
| highway | tracktype | bothw |
|
||||
| trunk | grade1 | x |
|
||||
@@ -26,8 +26,8 @@ Feature: Car - Surfaces
|
||||
| trunk | very_horrible | x |
|
||||
| trunk | impassable | |
|
||||
| trunk | nonsense | x |
|
||||
|
||||
Scenario: Car - Routability of surface tags
|
||||
|
||||
Scenario: Car - Routabiliy of surface tags
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| trunk | asphalt | x |
|
||||
@@ -64,64 +64,64 @@ Feature: Car - Surfaces
|
||||
Scenario: Car - Surface should reduce speed
|
||||
Then routability should be
|
||||
| highway | oneway | surface | forw | backw |
|
||||
| motorway | no | | 72 km/h | 72 km/h |
|
||||
| motorway | no | asphalt | 72 km/h | 72 km/h +-1 |
|
||||
| motorway | no | concrete | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | concrete:plates | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | concrete:lanes | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | paved | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | cement | 64 km/h +-1 | 64 km/h +-1 |
|
||||
| motorway | no | compacted | 64 km/h +-1 | 64 km/h +-1 |
|
||||
| motorway | no | fine_gravel | 64 km/h +-1 | 64 km/h +-1 |
|
||||
| motorway | no | paving_stones | 48 km/h +-1 | 48 km/h +-1 |
|
||||
| motorway | no | metal | 48 km/h +-1 | 48 km/h +-1 |
|
||||
| motorway | no | bricks | 48 km/h +-1 | 48 km/h +-1 |
|
||||
| motorway | no | grass | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | wood | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | sett | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | grass_paver | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | gravel | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | unpaved | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | ground | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | dirt | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | pebblestone | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | tartan | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | cobblestone | 24 km/h +-1 | 24 km/h +-1 |
|
||||
| motorway | no | clay | 24 km/h +-1 | 24 km/h +-1 |
|
||||
| motorway | no | earth | 16 km/h +-1 | 16 km/h +-1 |
|
||||
| motorway | no | stone | 16 km/h +-1 | 16 km/h +-1 |
|
||||
| motorway | no | rocky | 16 km/h +-1 | 16 km/h +-1 |
|
||||
| motorway | no | sand | 16 km/h +-1 | 16 km/h +-1 |
|
||||
| motorway | no | | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | asphalt | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | concrete | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | concrete:plates | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | concrete:lanes | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | paved | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | cement | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | compacted | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | fine_gravel | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | paving_stones | 60 km/h +-1 | 60 km/h +-1 |
|
||||
| motorway | no | metal | 60 km/h +-1 | 60 km/h +-1 |
|
||||
| motorway | no | bricks | 60 km/h +-1 | 60 km/h +-1 |
|
||||
| motorway | no | grass | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | wood | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | sett | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | grass_paver | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | gravel | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | unpaved | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | ground | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | dirt | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | pebblestone | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | tartan | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | cobblestone | 34 km/h +-1 | 34 km/h +-1 |
|
||||
| motorway | no | clay | 34 km/h +-1 | 34 km/h +-1 |
|
||||
| motorway | no | earth | 26 km/h +-1 | 26 km/h +-1 |
|
||||
| motorway | no | stone | 26 km/h +-1 | 26 km/h +-1 |
|
||||
| motorway | no | rocky | 26 km/h +-1 | 26 km/h +-1 |
|
||||
| motorway | no | sand | 26 km/h +-1 | 26 km/h +-1 |
|
||||
|
||||
Scenario: Car - Tracktypes should reduce speed
|
||||
Then routability should be
|
||||
| highway | oneway | tracktype | forw | backw |
|
||||
| motorway | no | | 72 km/h | 72 km/h |
|
||||
| motorway | no | grade1 | 48 km/h +-1 | 48 km/h +-1 |
|
||||
| motorway | no | grade2 | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | grade3 | 24 km/h +-1 | 24 km/h +-1 |
|
||||
| motorway | no | grade4 | 20 km/h +-1 | 20 km/h +-1 |
|
||||
| motorway | no | grade5 | 16 km/h +-1 | 16 km/h +-1 |
|
||||
| motorway | no | | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | grade1 | 60 km/h +-1 | 60 km/h +-1 |
|
||||
| motorway | no | grade2 | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | grade3 | 34 km/h +-1 | 34 km/h +-1 |
|
||||
| motorway | no | grade4 | 31 km/h +-1 | 31 km/h +-1 |
|
||||
| motorway | no | grade5 | 26 km/h +-1 | 26 km/h +-1 |
|
||||
|
||||
Scenario: Car - Smoothness should reduce speed
|
||||
Then routability should be
|
||||
| highway | oneway | smoothness | forw | backw |
|
||||
| motorway | no | | 72 km/h | 72 km/h |
|
||||
| motorway | no | intermediate | 64 km/h | 64 km/h |
|
||||
| motorway | no | bad | 32 km/h +-1 | 32 km/h +-1 |
|
||||
| motorway | no | very_bad | 16 km/h +-1 | 16 km/h +-1 |
|
||||
| motorway | no | horrible | 8 km/h +-1 | 8 km/h +-1 |
|
||||
| motorway | no | very_horrible | 4 km/h +-1 | 4 km/h +-1 |
|
||||
| motorway | no | | 80 km/h +-1 | 80 km/h +-1 |
|
||||
| motorway | no | intermediate | 72 km/h +-1 | 72 km/h +-1 |
|
||||
| motorway | no | bad | 42 km/h +-1 | 42 km/h +-1 |
|
||||
| motorway | no | very_bad | 26 km/h +-1 | 26 km/h +-1 |
|
||||
| motorway | no | horrible | 18 km/h +-1 | 18 km/h +-1 |
|
||||
| motorway | no | very_horrible | 15 km/h +-1 | 15 km/h +-1 |
|
||||
|
||||
Scenario: Car - Combination of surface tags should use lowest speed
|
||||
Then routability should be
|
||||
| highway | oneway | tracktype | surface | smoothness | backw | forw |
|
||||
| motorway | no | | | | 72 km/h | 72 km/h |
|
||||
| service | no | grade1 | asphalt | excellent | 12 km/h | 12 km/h |
|
||||
| motorway | no | grade5 | asphalt | excellent | 16 km/h | 16 km/h |
|
||||
| motorway | no | grade1 | mud | excellent | 8 km/h | 8 km/h |
|
||||
| motorway | no | grade1 | asphalt | very_horrible | 4 km/h | 4 km/h |
|
||||
| service | no | grade5 | mud | very_horrible | 4 km/h | 4 km/h |
|
||||
| motorway | no | | | | 80 km/h | 80 km/h |
|
||||
| service | no | grade1 | asphalt | excellent | 23 km/h | 23 km/h |
|
||||
| motorway | no | grade5 | asphalt | excellent | 26 km/h | 26 km/h |
|
||||
| motorway | no | grade1 | mud | excellent | 18 km/h | 18 km/h |
|
||||
| motorway | no | grade1 | asphalt | very_horrible | 15 km/h | 15 km/h |
|
||||
| service | no | grade5 | mud | very_horrible | 15 km/h | 15 km/h |
|
||||
|
||||
Scenario: Car - Surfaces should not affect oneway direction
|
||||
Then routability should be
|
||||
@@ -138,3 +138,4 @@ Feature: Car - Surfaces
|
||||
| primary | -1 | grade1 | excellent | asphalt | | x |
|
||||
| primary | -1 | grade5 | very_bad | mud | | x |
|
||||
| primary | -1 | nonsense | nonsense | nonsense | | x |
|
||||
|
||||
|
||||
@@ -2,17 +2,15 @@
|
||||
Feature: Traffic - speeds
|
||||
|
||||
Background: Use specific speeds
|
||||
|
||||
Scenario: Weighting based on speed file
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 0.1 | 0.1 |
|
||||
| b | 0.05 | 0.1 |
|
||||
| b | .05 | 0.1 |
|
||||
| c | 0.0 | 0.1 |
|
||||
| d | 0.05 | 0.03 |
|
||||
| e | 0.05 | 0.066 |
|
||||
| f | 0.075 | 0.066 |
|
||||
| g | 0.075 | 0.1 |
|
||||
| d | .05 | .03 |
|
||||
| e | .05 | .066 |
|
||||
| f | .075 | .066 |
|
||||
| g | .075 | 0.1 |
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
@@ -23,105 +21,27 @@ Feature: Traffic - speeds
|
||||
| eb | primary |
|
||||
| df | primary |
|
||||
| fb | primary |
|
||||
Given the profile "testbot"
|
||||
Given the extract extra arguments "--generate-edge-lookup"
|
||||
Given the contract extra arguments "--segment-speed-file {speeds_file}"
|
||||
Given the speed file
|
||||
And the speed file
|
||||
"""
|
||||
1,2,0
|
||||
2,1,0
|
||||
1,2,27
|
||||
2,1,27
|
||||
2,3,27
|
||||
3,2,27
|
||||
1,4,27
|
||||
4,1,27
|
||||
"""
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ad,de,eb,eb | 30 km/h |
|
||||
| a | c | ad,dc,dc | 31 km/h |
|
||||
| b | c | bc,bc | 27 km/h |
|
||||
| a | d | ad,ad | 27 km/h |
|
||||
| d | c | dc,dc | 36 km/h |
|
||||
| g | b | fb,fb | 36 km/h |
|
||||
| a | g | ad,df,fb,fb | 30 km/h |
|
||||
|
||||
|
||||
Scenario: Speeds that isolate a single node (a)
|
||||
Given 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 |
|
||||
| g | 0.075 | 0.1 |
|
||||
| h | 2.075 | 19.1 |
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| ad | primary |
|
||||
| bc | primary |
|
||||
| dc | primary |
|
||||
| de | primary |
|
||||
| eb | primary |
|
||||
| df | primary |
|
||||
| fb | primary |
|
||||
Scenario: Weighting based on speed file
|
||||
Given the profile "testbot"
|
||||
Given the extract extra arguments "--generate-edge-lookup"
|
||||
Given the contract extra arguments "--segment-speed-file {speeds_file}"
|
||||
Given the speed file
|
||||
"""
|
||||
1,2,0
|
||||
2,1,0
|
||||
2,3,27
|
||||
3,2,27
|
||||
1,4,0
|
||||
4,1,0
|
||||
"""
|
||||
Given the contract extra arguments "--segment-speed-file speeds.csv"
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | fb,fb | 36 km/h |
|
||||
| a | c | fb,bc,bc | 30 km/h |
|
||||
| b | c | bc,bc | 27 km/h |
|
||||
| a | d | fb,df,df | 36 km/h |
|
||||
| d | c | dc,dc | 36 km/h |
|
||||
| g | b | fb,fb | 36 km/h |
|
||||
| a | g | fb,fb | 36 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 27 km/h |
|
||||
| a | c | ab,bc,bc | 27 km/h |
|
||||
| b | c | bc,bc | 27 km/h |
|
||||
| a | d | ad,ad | 27 km/h |
|
||||
| d | c | dc,dc | 36 km/h |
|
||||
| g | b | ab,ab | 27 km/h |
|
||||
| a | g | ab,ab | 27 km/h |
|
||||
|
||||
Scenario: Verify that negative values cause an error, they're not valid at all
|
||||
Given 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 |
|
||||
| g | 0.075 | 0.1 |
|
||||
| h | 1.075 | 10.1 |
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| ad | primary |
|
||||
| bc | primary |
|
||||
| dc | primary |
|
||||
| de | primary |
|
||||
| eb | primary |
|
||||
| df | primary |
|
||||
| fb | primary |
|
||||
Given the profile "testbot"
|
||||
Given the extract extra arguments "--generate-edge-lookup"
|
||||
Given the speed file
|
||||
"""
|
||||
1,2,-10
|
||||
2,1,-20
|
||||
2,3,27
|
||||
3,2,27
|
||||
1,4,-3
|
||||
4,1,-5
|
||||
"""
|
||||
And the data has been extracted
|
||||
When I try to run "osrm-contract --segment-speed-file {speeds_file} {processed_file}"
|
||||
And stderr should contain "malformed"
|
||||
And it should exit with an error
|
||||
|
||||
@@ -3,33 +3,11 @@ Feature: Traffic - turn penalties
|
||||
|
||||
Background: Evenly spaced grid with multiple intersections
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d e f g
|
||||
h i
|
||||
j k l m n
|
||||
o p
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | id |
|
||||
| a | 1 |
|
||||
| b | 2 |
|
||||
| c | 3 |
|
||||
| d | 4 |
|
||||
| e | 5 |
|
||||
| f | 6 |
|
||||
| g | 7 |
|
||||
| h | 8 |
|
||||
| i | 9 |
|
||||
| j | 10 |
|
||||
| k | 11 |
|
||||
| l | 12 |
|
||||
| m | 13 |
|
||||
| n | 14 |
|
||||
| o | 15 |
|
||||
| p | 16 |
|
||||
|
||||
| | a:1 | | b:2 | |
|
||||
| c:3 | d:4 | e:5 | f:6 | g:7 |
|
||||
| | h:8 | | i:9 | |
|
||||
| j:10 | k:11 | l:12 | m:13 | n:14 |
|
||||
| | o:15 | | p:16 | |
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ad | primary |
|
||||
@@ -53,21 +31,21 @@ Feature: Traffic - turn penalties
|
||||
Scenario: Weighting not based on turn penalty file
|
||||
When I route I should get
|
||||
| from | to | route | speed | time |
|
||||
| a | h | ad,dhk,dhk | 52 km/h | 14s +-1 |
|
||||
| a | h | ad,dhk,dhk | 63 km/h | 11.5s +-1 |
|
||||
# straight
|
||||
| i | g | fim,fg,fg | 45 km/h | 16s +-1 |
|
||||
| i | g | fim,fg,fg | 59 km/h | 12s +-1 |
|
||||
# right
|
||||
| a | e | ad,def,def | 38 km/h | 19s +-1 |
|
||||
| a | e | ad,def,def | 57 km/h | 12.5s +-1 |
|
||||
# left
|
||||
| c | g | cd,def,fg,fg | 52 km/h | 27s +-1 |
|
||||
| c | g | cd,def,fg,fg | 63 km/h | 23s +-1 |
|
||||
# double straight
|
||||
| p | g | mp,fim,fg,fg | 48 km/h | 29s +-1 |
|
||||
| p | g | mp,fim,fg,fg | 61 km/h | 23.5s +-1 |
|
||||
# straight-right
|
||||
| a | l | ad,dhk,klm,klm | 44 km/h | 33s +-1 |
|
||||
| a | l | ad,dhk,klm,klm | 60 km/h | 24s +-1 |
|
||||
# straight-left
|
||||
| l | e | klm,dhk,def,def | 45 km/h | 32s +-1 |
|
||||
| l | e | klm,dhk,def,def | 59 km/h | 24.5s +-1 |
|
||||
# double right
|
||||
| g | n | fg,fim,mn,mn | 38 km/h | 38s +-1 |
|
||||
| g | n | fg,fim,mn,mn | 57 km/h | 25s +-1 |
|
||||
# double left
|
||||
|
||||
Scenario: Weighting based on turn penalty file
|
||||
@@ -75,35 +53,35 @@ Feature: Traffic - turn penalties
|
||||
"""
|
||||
9,6,7,1.8
|
||||
9,13,14,24.5
|
||||
8,4,3,35
|
||||
8,4,3,26
|
||||
12,11,8,9
|
||||
8,11,12,23
|
||||
8,11,12,13
|
||||
1,4,5,-0.2
|
||||
"""
|
||||
And the contract extra arguments "--turn-penalty-file {penalties_file}"
|
||||
And the contract extra arguments "--turn-penalty-file penalties.csv"
|
||||
When I route I should get
|
||||
| from | to | route | speed | time |
|
||||
| a | h | ad,dhk,dhk | 52 km/h | 14s +-1 |
|
||||
| a | h | ad,dhk,dhk | 63 km/h | 11.5s +-1 |
|
||||
# straight
|
||||
| i | g | fim,fg,fg | 46 km/h | 15s +-1 |
|
||||
| i | g | fim,fg,fg | 55 km/h | 13s +-1 |
|
||||
# right - ifg penalty
|
||||
| a | e | ad,def,def | 53 km/h | 14s +-1 |
|
||||
| a | e | ad,def,def | 64 km/h | 11s +-1 |
|
||||
# left - faster because of negative ade penalty
|
||||
| c | g | cd,def,fg,fg | 52 km/h | 27s +-1 |
|
||||
| c | g | cd,def,fg,fg | 63 km/h | 23s +-1 |
|
||||
# double straight
|
||||
| p | g | mp,fim,fg,fg | 49 km/h | 29s +-1 |
|
||||
| p | g | mp,fim,fg,fg | 59 km/h | 24.5s +-1 |
|
||||
# straight-right - ifg penalty
|
||||
| a | l | ad,def,fim,klm,klm | 48 km/h | 45s +-1 |
|
||||
| a | l | ad,def,fim,klm,klm | 61 km/h | 35.5s +-1 |
|
||||
# was straight-left - forced around by hkl penalty
|
||||
| l | e | klm,fim,def,def | 38 km/h | 38s +-1 |
|
||||
| l | e | klm,fim,def,def | 57 km/h | 25s +-1 |
|
||||
# double right - forced left by lkh penalty
|
||||
| g | n | fg,fim,mn,mn | 25 km/h | 57s +-1 |
|
||||
| g | n | fg,fim,mn,mn | 30 km/h | 47.5s +-1 |
|
||||
# double left - imn penalty
|
||||
| j | c | jk,klm,fim,def,cd,cd | 44 km/h | 65.8s +-1 |
|
||||
| j | c | jk,klm,fim,def,cd,cd | 60 km/h | 48s +-1 |
|
||||
# double left - hdc penalty ever so slightly higher than imn; forces all the way around
|
||||
|
||||
Scenario: Too-negative penalty clamps, but does not fail
|
||||
Given the contract extra arguments "--turn-penalty-file {penalties_file}"
|
||||
Given the contract extra arguments "--turn-penalty-file penalties.csv"
|
||||
And the profile "testbot"
|
||||
And the turn penalty file
|
||||
"""
|
||||
|
||||
+11
-19
@@ -7,11 +7,9 @@ Feature: Foot - Squares and other areas
|
||||
@square
|
||||
Scenario: Foot - Route along edge of a squares
|
||||
Given the node map
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | area | highway |
|
||||
@@ -32,11 +30,9 @@ Feature: Foot - Squares and other areas
|
||||
@building
|
||||
Scenario: Foot - Don't route on buildings
|
||||
Given the node map
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | area | building | access |
|
||||
@@ -57,11 +53,9 @@ Feature: Foot - Squares and other areas
|
||||
@parking
|
||||
Scenario: Foot - parking areas
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
x a b y
|
||||
d c
|
||||
"""
|
||||
| e | | | f |
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | amenity |
|
||||
@@ -86,10 +80,8 @@ Feature: Foot - Squares and other areas
|
||||
@train @platform
|
||||
Scenario: Foot - railway platforms
|
||||
Given the node map
|
||||
"""
|
||||
x a b y
|
||||
d c
|
||||
"""
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway |
|
||||
|
||||
@@ -6,11 +6,9 @@ Feature: Foot - Handle ferry routes
|
||||
|
||||
Scenario: Foot - Ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | foot |
|
||||
@@ -31,12 +29,10 @@ Feature: Foot - Handle ferry routes
|
||||
|
||||
Scenario: Foot - Ferry duration, single node
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
e f
|
||||
g h
|
||||
i j
|
||||
"""
|
||||
| a | b | c | d |
|
||||
| | | e | f |
|
||||
| | | g | h |
|
||||
| | | i | j |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | foot | duration |
|
||||
@@ -52,10 +48,8 @@ Feature: Foot - Handle ferry routes
|
||||
|
||||
Scenario: Foot - Ferry duration, multiple nodes
|
||||
Given the node map
|
||||
"""
|
||||
x y
|
||||
a b c d
|
||||
"""
|
||||
| x | | | | | y |
|
||||
| | a | b | c | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | foot | duration |
|
||||
|
||||
@@ -6,14 +6,14 @@ Background: Use specific speeds
|
||||
|
||||
Scenario: Foot - Ignore maxspeed
|
||||
Then routability should be
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 145 s ~10% |
|
||||
| residential | 1 | 145 s ~10% |
|
||||
| residential | 100 | 145 s ~10% |
|
||||
| residential | 1 | 145 s ~10% |
|
||||
| residential | 1mph | 145 s ~10% |
|
||||
| residential | 1 mph | 145 s ~10% |
|
||||
| residential | 1unknown | 145 s ~10% |
|
||||
| residential | 1 unknown | 145 s ~10% |
|
||||
| residential | none | 145 s ~10% |
|
||||
| residential | signals | 145 s ~10% |
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 145s ~10% |
|
||||
| residential | 1 | 145s ~10% |
|
||||
| residential | 100 | 145s ~10% |
|
||||
| residential | 1 | 145s ~10% |
|
||||
| residential | 1mph | 145s ~10% |
|
||||
| residential | 1 mph | 145s ~10% |
|
||||
| residential | 1unknown | 145s ~10% |
|
||||
| residential | 1 unknown | 145s ~10% |
|
||||
| residential | none | 145s ~10% |
|
||||
| residential | signals | 145s ~10% |
|
||||
|
||||
@@ -6,10 +6,8 @@ Feature: Foot - Street names in instructions
|
||||
|
||||
Scenario: Foot - A named street
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
@@ -18,14 +16,12 @@ Feature: Foot - Street names in instructions
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way,Your Way |
|
||||
| a | c | My Way (A6),Your Way (B7),Your Way (B7) |
|
||||
|
||||
@unnamed
|
||||
Scenario: Foot - No longer use way type to describe unnamed ways, see #3231
|
||||
Scenario: Foot - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -33,5 +29,5 @@ Feature: Foot - Street names in instructions
|
||||
| bcd | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | , |
|
||||
| from | to | route |
|
||||
| a | d | {highway:footway},{highway:track},{highway:track} |
|
||||
|
||||
@@ -6,37 +6,31 @@ Feature: Foot - Way ref
|
||||
|
||||
Scenario: Foot - Way with both name and ref
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| 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 |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive (E7),Utopia Drive (E7) |
|
||||
|
||||
Scenario: Foot - Way with only ref
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | ref |
|
||||
| a | b | , | E7,E7 |
|
||||
| from | to | route |
|
||||
| a | b | E7,E7 |
|
||||
|
||||
Scenario: Foot - Way with only name
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
| a | b |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
|
||||
@@ -8,11 +8,9 @@ Feature: Foot - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Foot - No left turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -34,11 +32,9 @@ Feature: Foot - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Foot - No right turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -60,11 +56,9 @@ Feature: Foot - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Foot - No u-turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -86,11 +80,9 @@ Feature: Foot - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Foot - Handle any no_* relation
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -112,11 +104,9 @@ Feature: Foot - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Foot - Only left turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -138,11 +128,9 @@ Feature: Foot - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Foot - Only right turn
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -164,11 +152,9 @@ Feature: Foot - Turn restrictions
|
||||
@only_turning
|
||||
Scenario: Foot - Only straight on
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -190,11 +176,9 @@ Feature: Foot - Turn restrictions
|
||||
@no_turning
|
||||
Scenario: Foot - Handle any only_* restriction
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -216,11 +200,9 @@ Feature: Foot - Turn restrictions
|
||||
@except
|
||||
Scenario: Foot - Except tag and on no_ restrictions
|
||||
Given the node map
|
||||
"""
|
||||
b x c
|
||||
a j d
|
||||
s
|
||||
"""
|
||||
| b | x | c |
|
||||
| a | j | d |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -248,11 +230,9 @@ Feature: Foot - Turn restrictions
|
||||
@except
|
||||
Scenario: Foot - Except tag and on only_ restrictions
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
j
|
||||
s
|
||||
"""
|
||||
| a | | b |
|
||||
| | j | |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -272,14 +252,12 @@ Feature: Foot - Turn restrictions
|
||||
@except
|
||||
Scenario: Foot - Multiple except tag values
|
||||
Given the node map
|
||||
"""
|
||||
s j a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
"""
|
||||
| s | j | a |
|
||||
| | | b |
|
||||
| | | c |
|
||||
| | | d |
|
||||
| | | e |
|
||||
| | | f |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
|
||||
@@ -10,13 +10,11 @@ Feature: Roundabout Instructions
|
||||
# make sense when you're going the opposite way around the roundabout.
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
v
|
||||
d
|
||||
s a c u
|
||||
b
|
||||
t
|
||||
"""
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
| s | a | | c | u |
|
||||
| | | b | | |
|
||||
| | | t | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
|
||||
@@ -6,10 +6,10 @@ Feature: Foot - Surfaces
|
||||
|
||||
Scenario: Foot - Slow surfaces
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| footway | | 145 s ~10% |
|
||||
| footway | fine_gravel | 193 s ~10% |
|
||||
| footway | gravel | 193 s ~10% |
|
||||
| footway | pebblestone | 193 s ~10% |
|
||||
| footway | mud | 289 s ~10% |
|
||||
| footway | sand | 289 s ~10% |
|
||||
| highway | surface | bothw |
|
||||
| footway | | 145s ~10% |
|
||||
| footway | fine_gravel | 193s ~10% |
|
||||
| footway | gravel | 193s ~10% |
|
||||
| footway | pebblestone | 193s ~10% |
|
||||
| footway | mud | 289s ~10% |
|
||||
| footway | sand | 289s ~10% |
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
@routing @guidance @turn-lanes
|
||||
Feature: Turn Lane Guidance
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 3 meters
|
||||
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c g
|
||||
d
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | | in | yes |
|
||||
| bc | left\|through | in | yes |
|
||||
| bd | right | in | yes |
|
||||
| ec | | cross | no |
|
||||
| cd | | cross | no |
|
||||
| df | | cross | no |
|
||||
| cg | | straight | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | cd | d | no_left_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| 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,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c g
|
||||
d
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | | in | yes |
|
||||
| bc | left\|through | in | yes |
|
||||
| bd | right | in | yes |
|
||||
| ec | | cross | no |
|
||||
| cd | | cross | no |
|
||||
| df | | cross | no |
|
||||
| cg | | straight | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | cd | d | no_left_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| 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,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes Next to other turns
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c g
|
||||
d
|
||||
f
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
i h j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | | in | yes |
|
||||
| bc | left\|through | in | yes |
|
||||
| bd | right | in | yes |
|
||||
| ec | | cross | no |
|
||||
| cd | | cross | no |
|
||||
| df | | cross | no |
|
||||
| cg | | straight | no |
|
||||
| bh | left\|right | turn | yes |
|
||||
| ihj | | other | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | cd | d | no_left_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| 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,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
| 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, |
|
||||
|
||||
@todo @2654 @none
|
||||
#https://github.com/Project-OSRM/osrm-backend/issues/2645
|
||||
#http://www.openstreetmap.org/export#map=19/52.56054/13.32152
|
||||
Scenario: Kurt-Schuhmacher-Damm
|
||||
Given the node map
|
||||
"""
|
||||
g f
|
||||
|
||||
j h e
|
||||
|
||||
a b c
|
||||
i d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes |
|
||||
| ab | | motorway_link | yes | left\|none\|right |
|
||||
| bc | | primary_link | yes | |
|
||||
| cd | ksd | secondary | yes | |
|
||||
| cef | ksd | primary | yes | |
|
||||
| hj | | motorway_link | yes | |
|
||||
| eh | | secondary_link | yes | |
|
||||
| gh | ksd | primary | yes | |
|
||||
| hbi | ksd | secondary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | ,ksd,ksd | depart,turn left,arrive | ,left:true none:true right:false, |
|
||||
| a,i | ,ksd,ksd | depart,turn right,arrive | ,left:false none:true right:true, |
|
||||
|
||||
@todo @2650 @sliproads
|
||||
#market and haight in SF, restricted turn
|
||||
#http://www.openstreetmap.org/#map=19/37.77308/-122.42238
|
||||
Scenario: Market/Haight without Through Street
|
||||
Given the node map
|
||||
"""
|
||||
g j
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
f
|
||||
e
|
||||
d
|
||||
a b c
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
l h i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | ghough | secondary | yes | |
|
||||
| bc | ghough | secondary | yes | through\|through |
|
||||
| bd | ghough | secondary | yes | none\|through |
|
||||
| def | ghough | secondary | yes | |
|
||||
| gd | market | primary | yes | |
|
||||
| dc | market | primary | yes | |
|
||||
| ch | market | primary | yes | |
|
||||
| iej | market | primary | yes | |
|
||||
| bl | haight | residential | yes | left\|none |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| relation | bd | dc | d | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,l | ghough,haight,haight | depart,turn right,arrive | ,none:false straight:false straight:false straight:true, |
|
||||
| a,h | ghough,market,market | depart,turn slight right,arrive | ,none:false straight:false straight:true straight:true, |
|
||||
| a,j | ghough,market,market | depart,turn left,arrive | ,none:true straight:false straight:false straight:false, |
|
||||
| a,f | ghough,ghough,ghough | depart,continue slight left,arrive | ,none:true straight:true straight:false straight:false, |
|
||||
|
||||
@todo @2650 @sliproads
|
||||
#market and haight in SF, unrestricted
|
||||
#http://www.openstreetmap.org/#map=19/37.77308/-122.42238
|
||||
Scenario: Market/Haight without Through Street
|
||||
Given the node map
|
||||
"""
|
||||
g j
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
f
|
||||
e
|
||||
d
|
||||
a b c
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
l h i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | ghough | secondary | yes | |
|
||||
| bc | ghough | secondary | yes | through\|through |
|
||||
| bd | ghough | secondary | yes | none\|through |
|
||||
| def | ghough | secondary | yes | |
|
||||
| gd | market | primary | yes | |
|
||||
| dc | market | primary | yes | |
|
||||
| ch | market | primary | yes | |
|
||||
| iej | market | primary | yes | |
|
||||
| bl | haight | residential | yes | left\|none |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,l | ghough,haight,haight | depart,turn right,arrive | ,none:false straight:false straight:false straight:true, |
|
||||
| a,h | ghough,market,market | depart,turn slight right,arrive | ,none:false straight:false straight:true straight:true, |
|
||||
| a,j | ghough,market,market | depart,turn left,arrive | ,none:true straight:false straight:false straight:false, |
|
||||
| a,f | ghough,ghough,ghough | depart,continue slight left,arrive | ,none:true straight:true straight:false straight:false, |
|
||||
|
||||
Scenario: Check sliproad handler loop's exit condition, Issue #2896
|
||||
# http://www.openstreetmap.org/way/198481519
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 7.6125350 | 126.5708309 |
|
||||
| b | 7.6125156 | 126.5707219 |
|
||||
| c | 7.6125363 | 126.5708337 |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| cbac | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | c | , | depart,arrive |
|
||||
@@ -8,13 +8,11 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Anticipate Lane Change for subsequent multi-lane intersections
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c – d – z
|
||||
| |
|
||||
y e
|
||||
"""
|
||||
| a | | b | | x | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | | z |
|
||||
| | | | | | | |
|
||||
| | | y | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward |
|
||||
@@ -34,13 +32,11 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Anticipate Lane Change for quick same direction turns, staying on the same street
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c
|
||||
|
|
||||
e – d – y
|
||||
"""
|
||||
| a | | b | x |
|
||||
| | | | |
|
||||
| | | c | |
|
||||
| | | | |
|
||||
| e | | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | turn:lanes:backward | name |
|
||||
@@ -59,13 +55,11 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Anticipate Lane Change for quick same direction turns, changing between streets
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c
|
||||
|
|
||||
e – d – y
|
||||
"""
|
||||
| a | | b | x |
|
||||
| | | | |
|
||||
| | | c | |
|
||||
| | | | |
|
||||
| e | | d | y |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | turn:lanes:backward | name |
|
||||
@@ -85,13 +79,9 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Anticipate Lane Change for quick turns during a merge
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
\
|
||||
x – b – c – y
|
||||
|
|
||||
d
|
||||
"""
|
||||
| a | | | | |
|
||||
| x | b | | c | y |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | highway | oneway |
|
||||
@@ -110,12 +100,9 @@ Feature: Turn Lane Guidance
|
||||
Scenario: Schoenefelder Kreuz
|
||||
# https://www.openstreetmap.org/way/264306388#map=16/52.3202/13.5568
|
||||
Given the node map
|
||||
"""
|
||||
a b – x
|
||||
\ / i
|
||||
c – d
|
||||
\ j
|
||||
"""
|
||||
| a | b | x | | | i |
|
||||
| | | c | d | | |
|
||||
| | | | | | j |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | lanes | highway | oneway | name |
|
||||
@@ -136,11 +123,8 @@ Feature: Turn Lane Guidance
|
||||
Scenario: Kreuz Oranienburg
|
||||
# https://www.openstreetmap.org/way/4484007#map=18/52.70439/13.20269
|
||||
Given the node map
|
||||
"""
|
||||
i a
|
||||
' . . '
|
||||
j – – c – b – – x
|
||||
"""
|
||||
| i | | | | | a |
|
||||
| j | | c | b | | x |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | lanes | highway | oneway | name |
|
||||
@@ -151,21 +135,19 @@ Feature: Turn Lane Guidance
|
||||
| cj | | 1 | motorway_link | yes | xbcj |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,i | ab,ci,ci | depart,turn slight right,arrive | ,none:false slight right:true, |
|
||||
| a,j | ab,xbcj | depart,arrive | , |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,i | ab,xbcj,ci,ci | depart,merge slight left,turn slight right,arrive | ,,none:false slight right:true, |
|
||||
| a,j | ab,xbcj,xbcj | depart,merge slight left,arrive | ,, |
|
||||
|
||||
|
||||
@anticipate
|
||||
Scenario: Lane anticipation for fan-in
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c – d – z
|
||||
| |
|
||||
y e
|
||||
"""
|
||||
| a | | b | | x | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | | z |
|
||||
| | | | | | | |
|
||||
| | | y | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
@@ -184,13 +166,11 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Lane anticipation for fan-out
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c – d – z
|
||||
| |
|
||||
y e
|
||||
"""
|
||||
| a | | b | | x | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | | z |
|
||||
| | | | | | | |
|
||||
| | | y | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
@@ -209,13 +189,11 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Lane anticipation for fan-in followed by fan-out
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c – d – z
|
||||
| |
|
||||
y e
|
||||
"""
|
||||
| a | | b | | x | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | | z |
|
||||
| | | | | | | |
|
||||
| | | y | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
@@ -234,13 +212,11 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Lane anticipation for fan-out followed by fan-in
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c – d – z
|
||||
| |
|
||||
y e
|
||||
"""
|
||||
| a | | b | | x | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | | z |
|
||||
| | | | | | | |
|
||||
| | | y | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
@@ -259,15 +235,13 @@ Feature: Turn Lane Guidance
|
||||
@anticipate
|
||||
Scenario: Lane anticipation for multiple hops with same number of lanes
|
||||
Given the node map
|
||||
"""
|
||||
a – b – x
|
||||
|
|
||||
c – d – z
|
||||
| |
|
||||
y e – f
|
||||
|
|
||||
w
|
||||
"""
|
||||
| a | | b | | x | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | | z |
|
||||
| | | | | | | |
|
||||
| | | y | | e | | f |
|
||||
| | | | | | | |
|
||||
| | | | | w | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
@@ -283,216 +257,34 @@ Feature: Turn Lane Guidance
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | abx,bcy,cdz,dew,ef,ef | depart,turn right,turn left,turn right,turn left,arrive | ,straight:false right:true right:false right:false,left:true left:false straight:false,straight:false right:true right:false,left:true straight:false, |
|
||||
| a,f | abx,bcy,cdz,dew,ef,ef | depart,turn right,turn left,turn right,turn left,arrive | ,straight:false right:false right:true right:false,left:false left:true straight:false,straight:false right:true right:false,left:true straight:false, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for through, through with lanes
|
||||
Given the node map
|
||||
"""
|
||||
f g
|
||||
/ /
|
||||
a – b – c – d – e
|
||||
\ \
|
||||
h i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | | main |
|
||||
| bc | left\|through\|through\|through\|right | main |
|
||||
| cd | left\|through\|right | main |
|
||||
| de | | main |
|
||||
| cf | | off |
|
||||
| ch | | off |
|
||||
| dg | | off |
|
||||
| di | | off |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | main,main,main | depart,use lane straight,arrive | ,left:false straight:false straight:true straight:false right:false, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for through and collapse multiple use lanes
|
||||
Given the node map
|
||||
"""
|
||||
e f g
|
||||
/ / /
|
||||
a – b – c – d
|
||||
\ \ \
|
||||
h i j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | left\|through\|through\|right | main |
|
||||
| bc | left\|through\|through\|right | main |
|
||||
| cd | left\|through\|through\|through\|right | main |
|
||||
| be | | off |
|
||||
| bh | | off |
|
||||
| cf | | off |
|
||||
| ci | | off |
|
||||
| dg | | off |
|
||||
| dj | | off |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,c | main,main | depart,arrive | , |
|
||||
| a,d | main,main | depart,arrive | , |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for through followed by left/right
|
||||
Given the node map
|
||||
"""
|
||||
f g d
|
||||
/ / /
|
||||
a – b – c – x
|
||||
\ \ \
|
||||
h i e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | left\|through\|through\|through\|through\|right | main |
|
||||
| bc | left\|through\|through\|right | main |
|
||||
| cx | left\|right | main |
|
||||
| xd | | left |
|
||||
| xe | | right |
|
||||
| bf | | off |
|
||||
| bh | | off |
|
||||
| cg | | off |
|
||||
| ci | | off |
|
||||
|
||||
When I route I should get
|
||||
| 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,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, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for through with turn before / after
|
||||
Given the node map
|
||||
"""
|
||||
c g l
|
||||
b – d – e – h - i
|
||||
a f j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | oneway |
|
||||
| ab | right\|right\|right\|right | ab | yes |
|
||||
| cb | left\|left\|left\|left | cb | yes |
|
||||
| bd | | bdehi | |
|
||||
| de | left\|left\|through\|through\|through\|through\|right\|right | bdehi | |
|
||||
| ef | | ef | |
|
||||
| eg | | eg | |
|
||||
| eh | | bdehi | |
|
||||
| hi | left\|left\|right\|right | bdehi | |
|
||||
| ij | | ij | |
|
||||
| il | | il | |
|
||||
|
||||
When I route I should get
|
||||
| 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,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,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 |
|
||||
| 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,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,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 |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for turns with through before and after
|
||||
Given a grid size of 10 meters
|
||||
Given the node map
|
||||
"""
|
||||
a – b – q s h – i
|
||||
\ / /
|
||||
e – f – g
|
||||
/ \ \
|
||||
c – d – r t j – k
|
||||
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name | highway | oneway |
|
||||
| ab | through\|right\|right\|right | top | primary | yes |
|
||||
| be | | top | primary | yes |
|
||||
| bq | | off | primary | yes |
|
||||
| ef | left\|through\|through\|through\|through\|right | main | primary | yes |
|
||||
| fg | left\|left\|right\|right | main | primary | yes |
|
||||
| fs | | off | primary | yes |
|
||||
| ft | | off | primary | yes |
|
||||
| gh | | top | primary | yes |
|
||||
| hi | | top | primary | yes |
|
||||
| cd | left\|left\|left\|through | bot | primary | yes |
|
||||
| de | | bot | primary | yes |
|
||||
| dr | | off | primary | yes |
|
||||
| gj | | bot | primary | yes |
|
||||
| jk | | bot | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| 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,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, |
|
||||
| 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,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, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for turn between throughs
|
||||
Given the node map
|
||||
"""
|
||||
q
|
||||
|
|
||||
a – b – c – s
|
||||
| |
|
||||
r d – t
|
||||
|
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | left\|through\|through\|through\|through\|through\|right | main |
|
||||
| bq | | off |
|
||||
| br | | off |
|
||||
| bc | through\|through\|right\|right\|right | main |
|
||||
| cs | | off |
|
||||
| cd | left\|through\|through | main |
|
||||
| de | | main |
|
||||
| dt | | off |
|
||||
|
||||
When I route I should get
|
||||
| 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, |
|
||||
|
||||
@anticipate @todo @2661
|
||||
@anticipate @todo @bug @2661
|
||||
Scenario: Anticipate with lanes in roundabout: roundabouts as the unit of anticipation
|
||||
Given the node map
|
||||
"""
|
||||
/e\
|
||||
a – b d – f
|
||||
\c/
|
||||
|
|
||||
/g\
|
||||
k – h j – l
|
||||
\i/
|
||||
"""
|
||||
| | | e | | |
|
||||
| a | b | | d | f |
|
||||
| | | c | | |
|
||||
| | | | | |
|
||||
| | | g | | |
|
||||
| k | h | | j | l |
|
||||
| | | i | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction | # |
|
||||
| nodes | turn:lanes:forward | highway | junction | # |
|
||||
| ab | slight_right\|slight_right\|slight_right | primary | | |
|
||||
| bc | slight_left\|slight_right\|slight_right | primary | roundabout | top |
|
||||
| cd | | primary | roundabout | top |
|
||||
| de | | primary | roundabout | top |
|
||||
| eb | | primary | roundabout | top |
|
||||
| df | | primary | | |
|
||||
| cg | slight_right\|slight_right | primary | | |
|
||||
| gh | slight_left\|slight_right | primary | roundabout | bot |
|
||||
| hi | | primary | roundabout | bot |
|
||||
| ij | slight_left\|slight_right | primary | roundabout | bot |
|
||||
| jg | | primary | roundabout | bot |
|
||||
| hk | | primary | | |
|
||||
| jl | | primary | | |
|
||||
| cd | | primary | roundabout | top |
|
||||
| de | | primary | roundabout | top |
|
||||
| eb | | primary | roundabout | top |
|
||||
| df | | primary | | |
|
||||
| cg | slight_right\|slight_right | primary | | |
|
||||
| gh | slight_left\|slight_right | primary | roundabout | bot |
|
||||
| hi | | primary | roundabout | bot |
|
||||
| ij | slight_left\|slight_right | primary | roundabout | bot |
|
||||
| jg | | primary | roundabout | bot |
|
||||
| hk | | primary | | |
|
||||
| jl | | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| # | waypoints | route | turns | lanes |
|
||||
@@ -504,38 +296,33 @@ Feature: Turn Lane Guidance
|
||||
@anticipate @todo
|
||||
Scenario: Roundabout with lanes only tagged on exit
|
||||
Given the node map
|
||||
"""
|
||||
/e\
|
||||
a – b d – f
|
||||
\c/
|
||||
"""
|
||||
| | | e | | |
|
||||
| a | b | | d | f |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction |
|
||||
| ab | | primary | |
|
||||
| bc | | primary | roundabout |
|
||||
| nodes | turn:lanes:forward | highway | junction |
|
||||
| ab | | primary | |
|
||||
| bc | | primary | roundabout |
|
||||
| cd | slight_left\|slight_left\|slight_right | primary | roundabout |
|
||||
| de | | primary | roundabout |
|
||||
| eb | | primary | roundabout |
|
||||
| df | | primary | |
|
||||
| de | | primary | roundabout |
|
||||
| eb | | primary | roundabout |
|
||||
| df | | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-1,use lane slight right,arrive | ,,slight left:false slight left:false slight right:true, |
|
||||
|
||||
@anticipate
|
||||
Scenario: No Lanes for Roundabouts, see #2626
|
||||
Scenario: Anticipate with lanes in roundabout where we stay on the roundabout for multiple exits
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
|
||||
/b\
|
||||
c g – h
|
||||
/| |
|
||||
| d f
|
||||
|/ \e/ \
|
||||
x \ y
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| | c | | g | h |
|
||||
| | | | | |
|
||||
| | d | | f | |
|
||||
| | | e | | |
|
||||
| x | | | | y |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction |
|
||||
@@ -544,7 +331,7 @@ Feature: Turn Lane Guidance
|
||||
| cd | | primary | roundabout |
|
||||
| de | | primary | roundabout |
|
||||
| ef | | primary | roundabout |
|
||||
| fg | through\|slight_right | primary | roundabout |
|
||||
| fg | slight_right | primary | roundabout |
|
||||
| gb | | primary | roundabout |
|
||||
| gh | | primary | |
|
||||
| cx | | primary | |
|
||||
@@ -553,17 +340,15 @@ Feature: Turn Lane Guidance
|
||||
| fy | | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-5,arrive | ,, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-5,arrive | ,slight right:false slight right:true, |
|
||||
|
||||
@anticipate
|
||||
Scenario: No Lanes for Roundabouts, see #2626
|
||||
Scenario: Departing or arriving inside a roundabout does not yet anticipate lanes
|
||||
Given the node map
|
||||
"""
|
||||
/a\
|
||||
x – b d – y
|
||||
\c/
|
||||
"""
|
||||
| | | a | | |
|
||||
| x | b | | d | y |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction | name |
|
||||
@@ -575,90 +360,51 @@ Feature: Turn Lane Guidance
|
||||
| da | | primary | roundabout | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,, |
|
||||
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
||||
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,slight right:false slight right:true, |
|
||||
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,slight right:true slight right:true, |
|
||||
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,slight right:true slight right:true, |
|
||||
|
||||
@anticipate
|
||||
Scenario: No Lanes for Roundabouts, see #2626
|
||||
Given the profile file "car" extended with
|
||||
"""
|
||||
properties.left_hand_driving = true
|
||||
"""
|
||||
And the node map
|
||||
"""
|
||||
a
|
||||
|
|
||||
/b\
|
||||
h – c g
|
||||
| |\
|
||||
d f |
|
||||
/ \e/ \|
|
||||
x / y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction |
|
||||
| ab | slight_left\|slight_left | primary | |
|
||||
| bg | | primary | roundabout |
|
||||
| gf | | primary | roundabout |
|
||||
| fe | | primary | roundabout |
|
||||
| ed | | primary | roundabout |
|
||||
| dc | slight_left | primary | roundabout |
|
||||
| cb | | primary | roundabout |
|
||||
| ch | | primary | |
|
||||
| ex | | primary | |
|
||||
| dx | | primary | |
|
||||
| gy | | primary | |
|
||||
| fy | | primary | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | ab,ch,ch | depart,roundabout-exit-5,arrive | ,, |
|
||||
|
||||
@anticipate
|
||||
Scenario: No Lanes for Roundabouts, see #2626
|
||||
Scenario: Departing or arriving inside a roundabout does not yet anticipate lanes (BIG version)
|
||||
Given the node map
|
||||
"""
|
||||
/a\
|
||||
x – b d – y
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
c
|
||||
"""
|
||||
| | | a | | |
|
||||
| x | b | | d | y |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction | name |
|
||||
@@ -670,79 +416,50 @@ Feature: Turn Lane Guidance
|
||||
| da | | primary | roundabout | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,, |
|
||||
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
||||
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,, |
|
||||
|
||||
@anticipate @todo @2032
|
||||
Scenario: No Lanes for Roundabouts, see #2626
|
||||
Given the node map
|
||||
"""
|
||||
a – b –x
|
||||
|
|
||||
/c\
|
||||
d f – g – z
|
||||
\e/ |
|
||||
| h
|
||||
y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | junction | name |
|
||||
| ab | through\|right\|right\|right\|right | primary | | abx |
|
||||
| bx | | primary | | abx |
|
||||
| bc | right\|right\|right\|right | primary | | bc |
|
||||
| cd | | primary | roundabout | cdefc |
|
||||
| de | slight_left\|slight_left\|slight_left\|slight_right | primary | roundabout | cdefc |
|
||||
| ef | left\|slight_right\|slight_right | primary | roundabout | cdefc |
|
||||
| fc | | primary | roundabout | cdefc |
|
||||
| ey | | primary | | ey |
|
||||
| fg | through\|right | primary | | fg |
|
||||
| gz | | primary | | gz |
|
||||
| gh | | primary | | gh |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | abx,bc,fg,gh,gh | depart,turn right,cdefc-exit-2,turn right,arrive | ,straight:false right:false right:false right:false right:true,,straight:false right:true, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,y | xb,dy,dy | depart,roundabout-exit-1,arrive | ,slight right:false slight right:true, |
|
||||
| x,c | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,slight right:true slight right:true, |
|
||||
| x,a | xb,roundabout,roundabout | depart,roundabout-exit-undefined,arrive | ,slight right:true slight right:true, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate none tags
|
||||
Scenario: Anticipate Lanes for turns before and / or after roundabout
|
||||
Given the node map
|
||||
"""
|
||||
c g l
|
||||
b – d – e – h - i
|
||||
a f j
|
||||
"""
|
||||
| a | b | | | x |
|
||||
| | c | | | |
|
||||
| d | | f | g | z |
|
||||
| | e | | h | |
|
||||
| | | | | |
|
||||
| | y | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | name |
|
||||
| ab | none\|none\|right\|right | primary | abc |
|
||||
| bc | | primary | abc |
|
||||
| bd | | primary | bdeh |
|
||||
| de | left\|none\|none\|right | primary | bdeh |
|
||||
| eh | | primary | bdeh |
|
||||
| ef | | primary | feg |
|
||||
| eg | | primary | feg |
|
||||
| nodes | turn:lanes:forward | highway | junction | name |
|
||||
| ab | through\|right\|right\|right\|right | primary | | abx |
|
||||
| bx | | primary | | abx |
|
||||
| bc | right\|right\|right\|right | primary | | bc |
|
||||
| cd | | primary | roundabout | cdefc |
|
||||
| de | slight_left\|slight_left&slight_left\|slight_right | primary | roundabout | cdefc |
|
||||
| ef | left\|slight_right\|slight_right | primary | roundabout | cdefc |
|
||||
| fc | | primary | roundabout | cdefc |
|
||||
| ey | | primary | | ey |
|
||||
| fg | through\|right | primary | | fg |
|
||||
| gz | | primary | | gz |
|
||||
| gh | | primary | | gh |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | abc,bdeh,feg,feg | depart,turn right,turn left,arrive | ,none:false none:false right:true right:false,left:true none:false none:false right:false, |
|
||||
| a,f | abc,bdeh,feg,feg | depart,turn right,turn right,arrive | ,none:false none:false right:false right:true,left:false none:false none:false right:true, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | abx,bc,fg,gh,gh | depart,turn right,cdefc-exit-2,turn right,arrive | ,straight:false right:false right:false right:false right:true,right:false right:false right:false right:true,straight:false right:true, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Triple Right keeping Left
|
||||
@anticipate @bug @todo
|
||||
Scenario: Tripple Right keeping Left
|
||||
Given the node map
|
||||
"""
|
||||
a – b – i
|
||||
|
|
||||
f – e – g |
|
||||
| |
|
||||
| |
|
||||
j – d – – c
|
||||
|
|
||||
h
|
||||
"""
|
||||
| a | | | | b | | i |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| f | | e | | | | g |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | j | d | | c | | |
|
||||
| | | | | h | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | name |
|
||||
@@ -753,23 +470,21 @@ Feature: Turn Lane Guidance
|
||||
| feg | | tertiary | fourth |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | start,first,second,third,fourth,fourth | depart,turn right,turn right,turn right,turn left,arrive | ,none:false none:false right:true right:false,none:false none:false right:true right:false,none:false none:false right:true right:false,left:true right:false right:false, |
|
||||
| a,g | start,first,second,third,fourth,fourth | depart,turn right,turn right,turn right,turn right,arrive | ,none:false none:false right:true right:true,none:false none:false right:true right:true,none:false none:false right:true right:true,left:false right:true right:true, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | start,first,second,third,fourth,fourth | depart,turn right,turn right,turn right,end of road left,arrive | ,none:false none:true right:false right:false,none:false none:true right:false right:false,none:false none:true right:false right:false,left:true right:false right:false, |
|
||||
| a,g | start,first,second,third,fourth,fourth | depart,turn right,turn right,turn right,end of road right,arrive | ,none:false none:false right:true right:true,none:false none:false right:true right:true,none:false none:false right:true right:true,left:false right:true right:true, |
|
||||
|
||||
@anticipate
|
||||
@anticipate @bug @todo
|
||||
Scenario: Tripple Left keeping Right
|
||||
Given the node map
|
||||
"""
|
||||
i – b – a
|
||||
|
|
||||
| g – e – f
|
||||
| |
|
||||
| |
|
||||
c – – d – j
|
||||
|
|
||||
h
|
||||
"""
|
||||
| i | | b | | | | a |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| g | | | | e | | f |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | c | | d | j | |
|
||||
| | | h | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | highway | name |
|
||||
@@ -780,6 +495,6 @@ Feature: Turn Lane Guidance
|
||||
| feg | | tertiary | fourth |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | start,first,second,third,fourth,fourth | depart,turn left,turn left,turn left,turn right,arrive | ,left:false left:true none:false none:false,left:false left:true none:false none:false,left:false left:true none:false none:false,left:false left:false right:true, |
|
||||
| a,g | start,first,second,third,fourth,fourth | depart,turn left,turn left,turn left,turn left,arrive | ,left:true left:true none:false none:false,left:true left:true none:false none:false,left:true left:true none:false none:false,left:true left:true right:false, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | start,first,second,third,fourth,fourth | depart,turn left,turn left,turn left,end of road right,arrive | ,left:false left:false none:true none:false,left:false left:false none:true none:false,left:false left:false none:true none:false,left:false left:false right:true, |
|
||||
| a,g | start,first,second,third,fourth,fourth | depart,turn left,turn left,turn left,end of road left,arrive | ,left:true left:true none:false none:false,left:true left:true none:false none:false,left:true left:true none:false none:false,left:true left:true right:false, |
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
@routing @bicycle @mode
|
||||
Feature: Bike - Mode flag
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
Scenario: Bike Sliproad
|
||||
Given the node map
|
||||
"""
|
||||
i
|
||||
a b - c-d
|
||||
` |
|
||||
g-e-h
|
||||
|
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| c | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway:bicycle |
|
||||
| abcd | cycleway | street | |
|
||||
| eb | path | | yes |
|
||||
| icef | tertiary | road | |
|
||||
| geh | secondary | street | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,f | street,,road,road | depart,turn right,turn right,arrive |
|
||||
@@ -6,9 +6,7 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
|
||||
Scenario: Simple Bridge
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | name |
|
||||
@@ -22,11 +20,9 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
|
||||
Scenario: Bridge with Immediate Turn
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
e
|
||||
"""
|
||||
| | | | d |
|
||||
| a | | b | c |
|
||||
| | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | name |
|
||||
@@ -35,19 +31,17 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
| dce | primary | | Nebenstraße |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,arrive |
|
||||
| a | e | Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,arrive |
|
||||
| e | a | Nebenstraße,Hauptstraßenbrücke,Hauptstraße | depart,turn left,arrive |
|
||||
| d | a | Nebenstraße,Hauptstraßenbrücke,Hauptstraße | depart,turn right,arrive |
|
||||
| from | to | route | turns |
|
||||
| a | d | Hauptstraße,Nebenstraße,Nebenstraße | depart,end of road left,arrive |
|
||||
| a | e | Hauptstraße,Nebenstraße,Nebenstraße | depart,end of road right,arrive |
|
||||
| e | a | Nebenstraße,Hauptstraßenbrücke,Hauptstraße | depart,turn left,arrive |
|
||||
| d | a | Nebenstraße,Hauptstraßenbrücke,Hauptstraße | depart,turn right,arrive |
|
||||
|
||||
Scenario: Bridge with Immediate Turn Front and Back
|
||||
Given the node map
|
||||
"""
|
||||
f d
|
||||
a b c
|
||||
g e
|
||||
"""
|
||||
| f | | | d |
|
||||
| a | | b | c |
|
||||
| g | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | name |
|
||||
@@ -57,21 +51,19 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
| gaf | primary | | Anderestraße |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| f | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,turn left,arrive |
|
||||
| f | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,turn right,arrive |
|
||||
| g | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,turn left,arrive |
|
||||
| g | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,turn right,arrive |
|
||||
| e | f | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn left,turn right,arrive |
|
||||
| e | g | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn left,turn left,arrive |
|
||||
| d | f | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn right,turn right,arrive |
|
||||
| d | g | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn right,turn left,arrive |
|
||||
| from | to | route | turns |
|
||||
| f | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,end of road left,arrive |
|
||||
| f | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,end of road right,arrive |
|
||||
| g | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,end of road left,arrive |
|
||||
| g | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,end of road right,arrive |
|
||||
| e | f | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn left,end of road right,arrive |
|
||||
| e | g | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn left,end of road left,arrive |
|
||||
| d | f | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn right,end of road right,arrive |
|
||||
| d | g | Nebenstraße,Hauptstraßenbrücke,Anderestraße,Anderestraße | depart,turn right,end of road left,arrive |
|
||||
|
||||
Scenario: Simple Tunnel
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | tunnel | name |
|
||||
@@ -85,11 +77,9 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
|
||||
Scenario: Tunnel with Immediate Turn
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
e
|
||||
"""
|
||||
| | | | d |
|
||||
| a | | b | c |
|
||||
| | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | tunnel | name |
|
||||
@@ -98,19 +88,17 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
| dce | primary | | Nebenstraße |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,arrive |
|
||||
| a | e | Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,arrive |
|
||||
| e | a | Nebenstraße,Hauptstraßentunnel,Hauptstraße | depart,turn left,arrive |
|
||||
| d | a | Nebenstraße,Hauptstraßentunnel,Hauptstraße | depart,turn right,arrive |
|
||||
| from | to | route | turns |
|
||||
| a | d | Hauptstraße,Nebenstraße,Nebenstraße | depart,end of road left,arrive |
|
||||
| a | e | Hauptstraße,Nebenstraße,Nebenstraße | depart,end of road right,arrive |
|
||||
| e | a | Nebenstraße,Hauptstraßentunnel,Hauptstraße | depart,turn left,arrive |
|
||||
| d | a | Nebenstraße,Hauptstraßentunnel,Hauptstraße | depart,turn right,arrive |
|
||||
|
||||
Scenario: Tunnel with Immediate Turn Front and Back
|
||||
Given the node map
|
||||
"""
|
||||
f d
|
||||
a b c
|
||||
g e
|
||||
"""
|
||||
| f | | | d |
|
||||
| a | | b | c |
|
||||
| g | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | name |
|
||||
@@ -120,13 +108,13 @@ Feature: Car - Guidance - Bridges and Tunnels
|
||||
| gaf | primary | | Anderestraße |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| f | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,turn left,arrive |
|
||||
| f | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,turn right,arrive |
|
||||
| g | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,turn left,arrive |
|
||||
| g | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,turn right,arrive |
|
||||
| e | f | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn left,turn right,arrive |
|
||||
| e | g | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn left,turn left,arrive |
|
||||
| d | f | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn right,turn right,arrive |
|
||||
| d | g | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn right,turn left,arrive |
|
||||
| from | to | route | turns |
|
||||
| f | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,end of road left,arrive |
|
||||
| f | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn left,end of road right,arrive |
|
||||
| g | d | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,end of road left,arrive |
|
||||
| g | e | Anderestraße,Hauptstraße,Nebenstraße,Nebenstraße | depart,turn right,end of road right,arrive |
|
||||
| e | f | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn left,end of road right,arrive |
|
||||
| e | g | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn left,end of road left,arrive |
|
||||
| d | f | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn right,end of road right,arrive |
|
||||
| d | g | Nebenstraße,Hauptstraßentunnel,Anderestraße,Anderestraße | depart,turn right,end of road left,arrive |
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
@routing @guidance
|
||||
Feature: Features related to bugs
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
@2852
|
||||
Scenario: Loop
|
||||
Given the node map
|
||||
"""
|
||||
a 1 g b
|
||||
|
||||
|
||||
e f
|
||||
|
||||
2
|
||||
d h c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| agb | top | yes |
|
||||
| bfc | right | yes |
|
||||
| chd | bottom | yes |
|
||||
| dea | left | yes |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| g | traffic_signals |
|
||||
| f | traffic_signals |
|
||||
| h | traffic_signals |
|
||||
| e | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| 1,2 | top,right,right | depart,new name right,arrive |
|
||||
|
||||
@3156
|
||||
Scenario: Incorrect lanes tag
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | lanes |
|
||||
| ab | 1; 2 |
|
||||
|
||||
And the data has been saved to disk
|
||||
When I try to run "osrm-extract {osm_file} --profile {profile_file}"
|
||||
Then it should exit successfully
|
||||
@@ -1,57 +0,0 @@
|
||||
@routing @guidance @collapsing
|
||||
Feature: Collapse
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
@reverse
|
||||
Scenario: Collapse U-Turn Triangle Intersection
|
||||
Given the node map
|
||||
"""
|
||||
g f e d
|
||||
|
||||
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | primary | road | yes |
|
||||
| defg | primary | road | yes |
|
||||
| fb | primary_link | | yes |
|
||||
| be | primary_link | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,road,road | depart,continue uturn,arrive |
|
||||
| d,c | road,road,road | depart,continue uturn,arrive |
|
||||
|
||||
@reverse @traffic-signals
|
||||
Scenario: Collapse U-Turn Triangle Intersection
|
||||
Given the node map
|
||||
"""
|
||||
g f j e d
|
||||
|
||||
h i
|
||||
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | primary | road | yes |
|
||||
| dejfg | primary | road | yes |
|
||||
| fhb | primary_link | | |
|
||||
| bie | primary_link | | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| j | traffic_signals |
|
||||
| h | traffic_signals |
|
||||
| i | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,road,road | depart,continue uturn,arrive |
|
||||
| d,c | road,road,road | depart,continue uturn,arrive |
|
||||
+135
-510
@@ -7,14 +7,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Single Street
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
|
||||
d c b a
|
||||
e f g h
|
||||
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | |
|
||||
| d | | c | b | | a |
|
||||
| e | | f | g | | h |
|
||||
| | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -52,14 +50,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Correct Street
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
|
||||
d c b a
|
||||
e f g h
|
||||
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | |
|
||||
| d | | c | b | | a |
|
||||
| e | | f | g | | h |
|
||||
| | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -97,14 +93,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
|
||||
d c b a
|
||||
e f g h
|
||||
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | |
|
||||
| d | | c | b | | a |
|
||||
| e | | f | g | | h |
|
||||
| | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -142,28 +136,14 @@ Feature: Collapse
|
||||
|
||||
Scenario: Partly Segregated Intersection, Two Segregated Roads
|
||||
Given the node map
|
||||
"""
|
||||
n m
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
g h
|
||||
|
||||
|
||||
c b a
|
||||
d e f
|
||||
|
||||
|
||||
j i
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
k l
|
||||
"""
|
||||
| | g | | h | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| c | | b | | a |
|
||||
| d | | e | | f |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | j | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -172,8 +152,8 @@ Feature: Collapse
|
||||
| de | primary | first | yes |
|
||||
| ef | primary | first | yes |
|
||||
| be | primary | first | no |
|
||||
| ngbhm | primary | second | yes |
|
||||
| liejk | primary | second | yes |
|
||||
| gbh | primary | second | yes |
|
||||
| iej | primary | second | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -196,24 +176,14 @@ Feature: Collapse
|
||||
|
||||
Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second
|
||||
Given the node map
|
||||
"""
|
||||
n m
|
||||
|
||||
|
||||
|
||||
g h
|
||||
|
||||
|
||||
c b a
|
||||
d e f
|
||||
|
||||
|
||||
j i
|
||||
|
||||
|
||||
|
||||
k l
|
||||
"""
|
||||
| | g | | h | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| c | | b | | a |
|
||||
| d | | e | | f |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| | j | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -222,8 +192,8 @@ Feature: Collapse
|
||||
| de | primary | first | yes |
|
||||
| ef | primary | first | yes |
|
||||
| be | primary | second | no |
|
||||
| ngbhm | primary | second | yes |
|
||||
| liejk | primary | second | yes |
|
||||
| gbh | primary | second | yes |
|
||||
| iej | primary | second | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -246,14 +216,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
a
|
||||
c b h
|
||||
d f g
|
||||
e
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | a |
|
||||
| | | c | b | | h |
|
||||
| d | | f | g | | |
|
||||
| e | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -291,14 +259,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles (2)
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
|
||||
c b
|
||||
d f g a
|
||||
e h
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | |
|
||||
| | | c | b | | |
|
||||
| d | | f | g | | a |
|
||||
| e | | | | | h |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -336,14 +302,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Entering a segregated road
|
||||
Given the node map
|
||||
"""
|
||||
a f g
|
||||
|
||||
b e
|
||||
|
||||
|
||||
c d
|
||||
"""
|
||||
| | a | f | | |
|
||||
| | | | | g |
|
||||
| | b | e | | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| c | d | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -361,21 +325,20 @@ Feature: Collapse
|
||||
| g,f | second,first,first | depart,turn right,arrive |
|
||||
| g,c | second,first,first | depart,end of road left,arrive |
|
||||
|
||||
|
||||
Scenario: Do not collapse turning roads
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
c d
|
||||
a b f
|
||||
"""
|
||||
| | | e | | |
|
||||
| | | c | | d |
|
||||
| a | | b | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| ab | primary | first | yes |
|
||||
| bc | primary | first | yes |
|
||||
| cd | primary | first | yes |
|
||||
| ce | primary | second | yes |
|
||||
| bf | primary | third | yes |
|
||||
| nodes | highway | name |
|
||||
| ab | primary | first |
|
||||
| bc | primary | first |
|
||||
| cd | primary | first |
|
||||
| ce | primary | second |
|
||||
| bf | primary | third |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -385,9 +348,7 @@ Feature: Collapse
|
||||
|
||||
Scenario: Bridge on unnamed road
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
| a | b | | | | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -401,11 +362,9 @@ Feature: Collapse
|
||||
|
||||
Scenario: Crossing Bridge into Segregated Turn
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
i h g e
|
||||
a b c d
|
||||
"""
|
||||
| | | | | | f |
|
||||
| i | h | | | g | e |
|
||||
| a | b | | | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | name |
|
||||
@@ -424,15 +383,13 @@ Feature: Collapse
|
||||
|
||||
Scenario: Pankenbruecke
|
||||
Given the node map
|
||||
"""
|
||||
j h i
|
||||
b c d e f g
|
||||
k a
|
||||
"""
|
||||
| h | | | | | | i | | | | | | |
|
||||
| | | b | c | d | e | f | | | | | | g |
|
||||
| a | | | | | | | | | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| kabhj | primary | inroad | yes |
|
||||
| abh | primary | inroad | yes |
|
||||
| bc | primary | inroad | no |
|
||||
| cd | primary | bridge | no |
|
||||
| defg | primary | outroad | no |
|
||||
@@ -445,13 +402,11 @@ Feature: Collapse
|
||||
|
||||
Scenario: Close Turns - Don't Collapse
|
||||
Given the node map
|
||||
"""
|
||||
g d
|
||||
|
||||
e b c f
|
||||
|
||||
a h
|
||||
"""
|
||||
| | g | d | |
|
||||
| | | | |
|
||||
| e | b | c | f |
|
||||
| | | | |
|
||||
| | a | h | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -469,10 +424,8 @@ Feature: Collapse
|
||||
|
||||
Scenario: No Name During Turns
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -486,10 +439,8 @@ Feature: Collapse
|
||||
|
||||
Scenario: No Name During Turns, Random Oneway
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -503,11 +454,9 @@ Feature: Collapse
|
||||
|
||||
Scenario: Pulled Back Turn
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
e
|
||||
"""
|
||||
| | | d |
|
||||
| a | b | c |
|
||||
| | e | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -522,10 +471,8 @@ Feature: Collapse
|
||||
|
||||
Scenario: No Name During Turns, keep important turns
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
c d
|
||||
"""
|
||||
| a | b | e |
|
||||
| | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -540,51 +487,17 @@ Feature: Collapse
|
||||
|
||||
Scenario: Segregated Intersection into Slight Turn
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
a
|
||||
|
||||
g
|
||||
b f
|
||||
c
|
||||
|
||||
|
||||
e
|
||||
d
|
||||
j i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abcd | primary | road | yes |
|
||||
| efgh | primary | road | yes |
|
||||
| icf | secondary | in | yes |
|
||||
| gbj | secondary | out | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| i,h | in,road,road | depart,turn left,arrive |
|
||||
| a,d | road,road | depart,arrive |
|
||||
| a,j | road,out,out | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Segregated Intersection into Very Slight Turn
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
a
|
||||
|
||||
|
||||
g
|
||||
b
|
||||
f
|
||||
c
|
||||
|
||||
|
||||
|
||||
e
|
||||
d
|
||||
j i
|
||||
"""
|
||||
| h | | | | | | |
|
||||
| a | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | g | | | | |
|
||||
| | | b | f | | | |
|
||||
| | | | c | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | e |
|
||||
| | | | | | | d |
|
||||
| | | j | i | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -601,11 +514,9 @@ Feature: Collapse
|
||||
|
||||
Scenario: Don't collapse everything to u-turn / too wide
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
|
||||
d c f
|
||||
"""
|
||||
| a | | b | | e |
|
||||
| | | | | |
|
||||
| d | | c | | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -620,14 +531,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Forking before a turn
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
c
|
||||
a b d e
|
||||
|
||||
f
|
||||
"""
|
||||
| | | | g | |
|
||||
| | | | | |
|
||||
| | | | c | |
|
||||
| a | | b | d | e |
|
||||
| | | | | |
|
||||
| | | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
@@ -635,14 +544,12 @@ Feature: Collapse
|
||||
| bd | road | yes | primary |
|
||||
| bc | road | yes | primary |
|
||||
| de | road | yes | primary |
|
||||
| fd | cross | no | secondary |
|
||||
| dc | cross | no | secondary |
|
||||
| cg | cross | no | secondary |
|
||||
| fdcg | cross | no | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
| restriction | bd | fdcg | d | no_left_turn |
|
||||
| restriction | bc | fdcg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -651,14 +558,12 @@ Feature: Collapse
|
||||
|
||||
Scenario: Forking before a turn (narrow)
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
c
|
||||
a b d e
|
||||
|
||||
f
|
||||
"""
|
||||
| | | | g | |
|
||||
| | | | | |
|
||||
| | | | c | |
|
||||
| a | b | | d | e |
|
||||
| | | | | |
|
||||
| | | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
@@ -666,30 +571,26 @@ Feature: Collapse
|
||||
| bd | road | yes | primary |
|
||||
| bc | road | yes | primary |
|
||||
| de | road | yes | primary |
|
||||
| fd | cross | no | secondary |
|
||||
| dc | cross | no | secondary |
|
||||
| cg | cross | no | secondary |
|
||||
| fdcg | cross | no | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
| restriction | bd | fdcg | d | no_left_turn |
|
||||
| restriction | bc | fdcg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive |
|
||||
| a,e | road,road | depart,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive |
|
||||
| a,e | road,road | depart,arrive |
|
||||
|
||||
Scenario: Forking before a turn (forky)
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
c
|
||||
a b
|
||||
d
|
||||
f e
|
||||
"""
|
||||
| | | | g | | |
|
||||
| | | | | | |
|
||||
| | | | c | | |
|
||||
| a | b | | | | |
|
||||
| | | | | d | |
|
||||
| | | | | f | e |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
@@ -697,14 +598,12 @@ Feature: Collapse
|
||||
| bd | road | yes | primary |
|
||||
| bc | road | yes | primary |
|
||||
| de | road | yes | primary |
|
||||
| fd | cross | no | secondary |
|
||||
| dc | cross | no | secondary |
|
||||
| cg | cross | no | secondary |
|
||||
| fdcg | cross | no | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
| restriction | bd | fdcg | d | no_left_turn |
|
||||
| restriction | bc | fdcg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -715,11 +614,9 @@ Feature: Collapse
|
||||
|
||||
Scenario: On-Off on Highway
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
a b c d
|
||||
e
|
||||
"""
|
||||
| f | | | |
|
||||
| a | b | c | d |
|
||||
| | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
@@ -733,275 +630,3 @@ Feature: Collapse
|
||||
| f,d | on,Hwy,Hwy | depart,merge slight right,arrive |
|
||||
| f,e | on,Hwy,off,off | depart,merge slight right,off ramp right,arrive |
|
||||
| a,e | Hwy,off,off | depart,off ramp right,arrive |
|
||||
|
||||
@negative @straight
|
||||
Scenario: Don't collapse going straight if actual turn
|
||||
Given the node map
|
||||
"""
|
||||
c e
|
||||
d f
|
||||
|
||||
b
|
||||
|
||||
|
||||
a
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway |
|
||||
| abc | main | primary |
|
||||
| bde | straight | residential |
|
||||
| df | right | residential |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | main,main | depart,arrive |
|
||||
| a,e | main,straight,straight | depart,turn straight,arrive |
|
||||
| a,f | main,straight,right,right | depart,turn straight,turn right,arrive |
|
||||
|
||||
Scenario: Entering a segregated road
|
||||
Given the node map
|
||||
"""
|
||||
a f
|
||||
g
|
||||
b e
|
||||
|
||||
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | primary | first | yes |
|
||||
| def | primary | first | yes |
|
||||
| be | primary | first | no |
|
||||
| ge | primary | second | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
|
||||
Scenario: Entering a segregated road slight turn
|
||||
Given the node map
|
||||
"""
|
||||
a f
|
||||
g
|
||||
b e
|
||||
|
||||
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | primary | first | yes |
|
||||
| def | primary | first | yes |
|
||||
| be | primary | first | no |
|
||||
| ge | primary | second | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
|
||||
Scenario: Do not collapse UseLane step when lanes change
|
||||
Given the node map
|
||||
"""
|
||||
f g
|
||||
|
||||
a b c d e
|
||||
|
||||
h i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | | main |
|
||||
| bc | left\|through\|through\|through\|right | main |
|
||||
| cd | left\|through\|right | main |
|
||||
| de | | main |
|
||||
| cf | | off |
|
||||
| ch | | off |
|
||||
| dg | | off |
|
||||
| di | | off |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | main,main,main | depart,use lane straight,arrive |
|
||||
|
||||
Scenario: But _do_ collapse UseLane step when lanes stay the same
|
||||
Given the node map
|
||||
"""
|
||||
f g
|
||||
|
||||
a b c d e
|
||||
|
||||
h i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | | main |
|
||||
| bc | left\|through\|through\|through\|right | main |
|
||||
| cd | left\|through\|through\|through\|right | main |
|
||||
| de | | main |
|
||||
| cf | | off |
|
||||
| ch | | off |
|
||||
| dg | | off |
|
||||
| di | | off |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | main,main | depart,arrive |
|
||||
|
||||
Scenario: Don't collapse different travel modes
|
||||
Given the node map
|
||||
"""
|
||||
g h
|
||||
a b c e f
|
||||
d
|
||||
i j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | name |
|
||||
| ab | primary | | road |
|
||||
| bc | primary | ferry | |
|
||||
| cd | primary | | road |
|
||||
| de | | ferry | |
|
||||
| ef | primary | | road |
|
||||
| bg | service | | turn |
|
||||
| ci | service | | turn |
|
||||
| dj | service | | turn |
|
||||
| eh | service | | turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,f | road,,road,,road,road |
|
||||
|
||||
Scenario: U-Turn onto a Ferry
|
||||
Given the node map
|
||||
"""
|
||||
i
|
||||
j e d c h
|
||||
|
||||
|
||||
k g a b f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | name | oneway |
|
||||
| abf | primary | | road | yes |
|
||||
| hcd | primary | | road | yes |
|
||||
| bc | primary | | | yes |
|
||||
| di | service | | serv | yes |
|
||||
| ed | | ferry | ferry | |
|
||||
| ga | | ferry | ferry | |
|
||||
| kg | primary | | on | yes |
|
||||
| ej | primary | | off | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive |
|
||||
|
||||
# http://www.openstreetmap.org/#map=19/37.78090/-122.41251
|
||||
Scenario: U-Turn onto unnamed-road
|
||||
Given the node map
|
||||
"""
|
||||
d . _ h
|
||||
' b . _ |
|
||||
| ' e g
|
||||
| f '
|
||||
| 1 '
|
||||
a '
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | turn:lanes | name | oneway |
|
||||
| ab | secondary | | up | yes |
|
||||
| gfa | secondary | | | yes |
|
||||
| dbe | tertiary | | turn | no |
|
||||
| he | secondary | through\|right | down | yes |
|
||||
| ef | secondary | | down | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/52.48778/13.30024
|
||||
Scenario: Hohenzollerdammbrücke
|
||||
Given the node map
|
||||
"""
|
||||
q s
|
||||
p o
|
||||
.. . .
|
||||
. . . .
|
||||
j - i - - - h - - - g - f
|
||||
> k < > l <
|
||||
a - b - - - c - - - d - e
|
||||
. . . .
|
||||
.. ..
|
||||
m n
|
||||
t r
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| ab | secondary | hohe | yes |
|
||||
| bc | secondary | hohebruecke | yes |
|
||||
| cd | secondary | hohebruecke | yes |
|
||||
| bk | secondary | hohebruecke | yes |
|
||||
| kh | secondary | hohebruecke | yes |
|
||||
| ki | secondary | hohebruecke | yes |
|
||||
| ck | secondary | hohebruecke | yes |
|
||||
| de | secondary | hohe | yes |
|
||||
| fg | secondary | hohe | yes |
|
||||
| gh | secondary | hohebruecke | yes |
|
||||
| hi | secondary | hohebruecke | yes |
|
||||
| gl | secondary | hohebruecke | yes |
|
||||
| lc | secondary | hohebruecke | yes |
|
||||
| hl | secondary | hohebruecke | yes |
|
||||
| ld | secondary | hohebruecke | yes |
|
||||
| ij | secondary | hohe | yes |
|
||||
| bm | motorway_link | a100 | yes |
|
||||
| cm | motorway_link | a100 | yes |
|
||||
| nc | motorway_link | a100 | yes |
|
||||
| nd | motorway_link | a100 | yes |
|
||||
| go | motorway_link | a100 | yes |
|
||||
| ho | motorway_link | a100 | yes |
|
||||
| ph | motorway_link | a100 | yes |
|
||||
| pi | motorway_link | a100 | yes |
|
||||
| qp | motorway_link | a100 | yes |
|
||||
| mt | motorway_link | a100 | yes |
|
||||
| rn | motorway_link | a100 | yes |
|
||||
| os | motorway_link | a100 | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | ck | kh | k | no_right_turn |
|
||||
| restriction | bk | ki | k | no_left_turn |
|
||||
| restriction | hl | lc | l | no_right_turn |
|
||||
| restriction | gl | ld | l | no_left_turn |
|
||||
| restriction | bc | cm | c | no_right_turn |
|
||||
| restriction | bc | ck | c | no_left_turn |
|
||||
| restriction | nc | cm | c | no_left_turn |
|
||||
| restriction | nc | cd | c | no_right_turn |
|
||||
| restriction | lc | ck | c | no_left_turn |
|
||||
| restriction | lc | cd | c | no_right_turn |
|
||||
| restriction | gh | ho | h | no_right_turn |
|
||||
| restriction | gh | hl | h | no_left_turn |
|
||||
| restriction | kh | hi | h | no_left_turn |
|
||||
| restriction | kh | hl | h | no_right_turn |
|
||||
| restriction | ph | ho | h | no_left_turn |
|
||||
| restriction | ph | hi | h | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | hohe,hohe | depart,arrive |
|
||||
| a,s | hohe,a100,a100 | depart,on ramp left,arrive |
|
||||
| a,t | hohe,a100,a100 | depart,on ramp right,arrive |
|
||||
| a,j | | |
|
||||
| f,j | hohe,hohe | depart,arrive |
|
||||
| a,t | hohe,a100,a100 | depart,on ramp right,arrive |
|
||||
| f,e | | |
|
||||
| q,j | a100,hohe,hohe | depart,turn right,arrive |
|
||||
| q,e | a100,a100,hohe | depart,continue left,arrive |
|
||||
|
||||
@@ -7,10 +7,8 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road turning left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
"""
|
||||
| | | c | |
|
||||
| a | | b | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -24,10 +22,8 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road turning left and straight
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
"""
|
||||
| | | c | |
|
||||
| a | | b | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -41,11 +37,9 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road turning left and straight
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
e
|
||||
"""
|
||||
| | | c | |
|
||||
| a | | b | d |
|
||||
| | | e | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -61,10 +55,8 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road turning right
|
||||
Given the node map
|
||||
"""
|
||||
a b d
|
||||
c
|
||||
"""
|
||||
| a | | b | d |
|
||||
| | | c | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -78,12 +70,10 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road turning slight left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | | c |
|
||||
| | | | | |
|
||||
| a | | b | | |
|
||||
| | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -97,12 +87,10 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road turning slight right
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b
|
||||
|
||||
c
|
||||
"""
|
||||
| | | | d | |
|
||||
| a | | b | | |
|
||||
| | | | | |
|
||||
| | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -116,13 +104,11 @@ Feature: Continue Instructions
|
||||
|
||||
Scenario: Road Loop
|
||||
Given the node map
|
||||
"""
|
||||
f e
|
||||
|
||||
a b g
|
||||
|
||||
c d
|
||||
"""
|
||||
| | | f | | e |
|
||||
| | | | | |
|
||||
| a | | b | g | |
|
||||
| | | | | |
|
||||
| | | c | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -134,5 +120,4 @@ Feature: Continue Instructions
|
||||
| a,c | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
||||
| a,f | abcdefb,abcdefb,abcdefb | depart,continue left,arrive |
|
||||
| a,d | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
|
||||
# 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 left,arrive |
|
||||
|
||||
@@ -7,85 +7,43 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c d
|
||||
h
|
||||
|
||||
1
|
||||
|
||||
f
|
||||
|
||||
g
|
||||
"""
|
||||
| | | | | e | |
|
||||
| a | b | | | c | d |
|
||||
| | | | h | | |
|
||||
| | | | | | |
|
||||
| | | | 1 | | |
|
||||
| | | | | | |
|
||||
| | | | | f | |
|
||||
| | | | | | |
|
||||
| | | | | g | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | trunk | first |
|
||||
| cd | trunk | first |
|
||||
| abcd | trunk | first |
|
||||
| bhf | trunk_link | |
|
||||
| cfg | primary | second |
|
||||
| ec | primary | second |
|
||||
| ecfg | primary | second |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cfg | c | no_right_turn |
|
||||
| restriction | abcd | ecfg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,second,second | depart,turn right,arrive |
|
||||
| a,1 | first,, | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: Turn Instead of Ramp - Max-Speed
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a-b-----c-------------------------d
|
||||
`h |
|
||||
||
|
||||
1||
|
||||
`|
|
||||
f
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | maxspeed |
|
||||
| abc | trunk | first | 70 |
|
||||
| cd | trunk | first | 2 |
|
||||
| bhf | trunk_link | | 2 |
|
||||
| cfg | primary | second | 50 |
|
||||
| ec | primary | second | 50 |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cfg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,second,second | depart,turn right,arrive |
|
||||
| a,1 | first,, | depart,turn slight right,arrive |
|
||||
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c d
|
||||
h
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
f
|
||||
|
||||
|
||||
g
|
||||
"""
|
||||
| | | | | e | |
|
||||
| a | b | | | c | d |
|
||||
| | | | h | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | f | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | g | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -94,48 +52,21 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| efg | primary | second |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,off ramp slight right,turn straight,arrive |
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c d
|
||||
h
|
||||
|
||||
|
||||
|
||||
f
|
||||
|
||||
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abcd | motorway | first |
|
||||
| bhf | motorway_link | |
|
||||
| efg | primary | second |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,off ramp slight right,turn straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,off ramp slight right,merge slight left,arrive |
|
||||
|
||||
Scenario: Inner city expressway with on road
|
||||
Given the node map
|
||||
"""
|
||||
a b c g
|
||||
f
|
||||
|
||||
|
||||
|
||||
d
|
||||
|
||||
|
||||
|
||||
e
|
||||
"""
|
||||
| a | b | | | | c | g |
|
||||
| | | | | f | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | d | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | e | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -155,16 +86,14 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
Scenario: Slipway Round U-Turn
|
||||
Given the node map
|
||||
"""
|
||||
a f
|
||||
|
||||
b e
|
||||
|
||||
|
||||
g
|
||||
|
||||
c d
|
||||
"""
|
||||
| a | | f |
|
||||
| | | |
|
||||
| b | | e |
|
||||
| | | |
|
||||
| | | |
|
||||
| | g | |
|
||||
| | | |
|
||||
| c | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -178,15 +107,13 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
Scenario: Slipway Steep U-Turn
|
||||
Given the node map
|
||||
"""
|
||||
a f
|
||||
|
||||
b e
|
||||
g
|
||||
|
||||
|
||||
c d
|
||||
"""
|
||||
| a | | f |
|
||||
| | | |
|
||||
| b | | e |
|
||||
| | g | |
|
||||
| | | |
|
||||
| | | |
|
||||
| c | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
@@ -200,23 +127,21 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
Scenario: Schwarzwaldstrasse Autobahn
|
||||
Given the node map
|
||||
"""
|
||||
. i . . . . . h . . . . g
|
||||
.j '. . '
|
||||
a . k
|
||||
' b . r c . d . e . . . . f
|
||||
. . .
|
||||
. . .
|
||||
. . .
|
||||
. . .
|
||||
l . .
|
||||
m . .
|
||||
n q
|
||||
. .
|
||||
. .
|
||||
. .
|
||||
o p
|
||||
"""
|
||||
| | | | | i | | | | | | h | | | | | g |
|
||||
| | | j | | | | | | | | | | | | | |
|
||||
| a | | | | | | | k | | | | | | | | |
|
||||
| | | | b | | r | c | | d | | e | | | | | f |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | l | | | | | | | | | | |
|
||||
| | | | | | m | | | | | | | | | | |
|
||||
| | | | | | | n | | q | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | |
|
||||
| | | | | | | o | | p | | | | | | | |
|
||||
|
||||
And the nodes
|
||||
# the traffic light at `l` is not actually in the data, but necessary for the test to check everything
|
||||
@@ -240,194 +165,5 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| qe | secondary_link | Ettlinger Allee | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | ref |
|
||||
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,L561, |
|
||||
|
||||
Scenario: Traffic Lights everywhere
|
||||
#http://map.project-osrm.org/?z=18¢er=48.995336%2C8.383813&loc=48.995467%2C8.384548&loc=48.995115%2C8.382761&hl=en&alt=0
|
||||
Given the node map
|
||||
"""
|
||||
a k l j
|
||||
d b c i
|
||||
|
||||
e g
|
||||
|
||||
1
|
||||
h
|
||||
|
||||
f
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
| e | traffic_signals |
|
||||
| g | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| aklbci | secondary | Ebertstrasse | yes |
|
||||
| kdeh | secondary_link | | yes |
|
||||
| jcghf | primary | Brauerstrasse | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,i | Ebertstrasse,Ebertstrasse | depart,arrive |
|
||||
| a,l | Ebertstrasse,Ebertstrasse | depart,arrive |
|
||||
| a,f | Ebertstrasse,Brauerstrasse,Brauerstrasse | depart,turn right,arrive |
|
||||
| a,1 | Ebertstrasse,, | depart,turn right,arrive |
|
||||
|
||||
#2839
|
||||
Scenario: Self-Loop
|
||||
Given the node map
|
||||
"""
|
||||
l k
|
||||
j
|
||||
m
|
||||
i
|
||||
|
||||
|
||||
h
|
||||
|
||||
n
|
||||
|
||||
g
|
||||
o
|
||||
|
||||
f
|
||||
p
|
||||
e
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway | lanes |
|
||||
| abc | circled | no | residential | 1 |
|
||||
| cdefghijklmnopc | circled | yes | residential | 1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | turns |
|
||||
| b,a | 90,10 270,10 | circled,circled | depart,arrive |
|
||||
|
||||
@todo
|
||||
#due to the current turn function, the left turn bcp is exactly the same cost as pcb, a right turn. The right turn should be way faster,though
|
||||
#for that reason we cannot distinguish between driving clockwise through the circle or counter-clockwise. Until this is improved, this case here
|
||||
#has to remain as todo (see #https://github.com/Project-OSRM/osrm-backend/pull/2849)
|
||||
Scenario: Self-Loop - Bidirectional
|
||||
Given the node map
|
||||
"""
|
||||
l k
|
||||
j
|
||||
m
|
||||
i
|
||||
|
||||
|
||||
h
|
||||
|
||||
n
|
||||
|
||||
g
|
||||
o
|
||||
|
||||
f
|
||||
p
|
||||
e
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway | lanes |
|
||||
| abc | circled | no | residential | 1 |
|
||||
| cdefghijklmnopc | circled | no | residential | 1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | turns |
|
||||
| b,a | 90,10 270,10 | circled,circled | depart,arrive |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/38.90597/-77.01276
|
||||
Scenario: Don't falsly classify as sliproads
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
e
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
|
||||
|
||||
f g
|
||||
|
||||
i h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | maxspeed |
|
||||
| abcd | new york | primary | yes | 35 |
|
||||
| befgh | m street | secondary | yes | 35 |
|
||||
| igcj | 1st street | tertiary | no | 20 |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| c | traffic_signals |
|
||||
| g | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | # |
|
||||
| a,d | new york,new york | depart,arrive | this is the sinatra route |
|
||||
| a,j | new york,1st street,1st street | depart,turn left,arrive | |
|
||||
| a,1 | new york,m street,1st street,1st street | depart,turn right,turn left,arrive | this can false be seen as a sliproad |
|
||||
|
||||
# Merging into degree two loop on dedicated turn detection / 2927
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
g h
|
||||
d e
|
||||
i c j
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
b
|
||||
|
||||
a
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abi | primary | road | yes |
|
||||
| bcjd | primary | loop | yes |
|
||||
| dhgf | primary | loop | yes |
|
||||
| fed | primary | loop | yes |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| g | traffic_signals |
|
||||
| c | traffic_signals |
|
||||
|
||||
# We don't actually care about routes here, this is all about endless loops in turn discovery
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,i | road,road,road | depart,fork slight left,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,o | Schwarzwaldstrasse (L561),Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive |
|
||||
|
||||
@@ -6,17 +6,15 @@ Feature: Destination Signs
|
||||
|
||||
Scenario: Car - route name assembly with destination signs
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
e f
|
||||
g h
|
||||
i j
|
||||
k l
|
||||
m n
|
||||
o p
|
||||
q r
|
||||
"""
|
||||
| a | b |
|
||||
| c | d |
|
||||
| e | f |
|
||||
| g | h |
|
||||
| i | j |
|
||||
| k | l |
|
||||
| m | n |
|
||||
| o | p |
|
||||
| q | r |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | destination | destination:ref | oneway | # |
|
||||
@@ -31,13 +29,13 @@ Feature: Destination Signs
|
||||
| qr | QR | | | A1;A2 | yes | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | destinations | ref | # |
|
||||
| a | b | AB,AB | , | E1,E1 | |
|
||||
| c | d | CD,CD | Berlin,Berlin | , | |
|
||||
| e | f | EF,EF | A1: Berlin,A1: Berlin | , | |
|
||||
| g | h | , | A1: Berlin,A1: Berlin | , | |
|
||||
| i | j | , | Berlin,Berlin | , | |
|
||||
| k | l | KL,KL | A1: Berlin,A1: Berlin | E1,E1 | |
|
||||
| m | n | MN,MN | A1, A2: Berlin, Hamburg,A1, A2: Berlin, Hamburg | , | |
|
||||
| o | p | OP,OP | , | , | guard against mis-tagging |
|
||||
| q | r | QR,QR | A1, A2,A1, A2 | , | |
|
||||
| from | to | route | destinations | # |
|
||||
| a | b | AB (E1),AB (E1) | , | |
|
||||
| c | d | CD (Berlin),CD (Berlin) | Berlin,Berlin | |
|
||||
| e | f | EF (A1: Berlin),EF (A1: Berlin) | A1: Berlin,A1: Berlin | |
|
||||
| g | h | , | A1: Berlin,A1: Berlin | |
|
||||
| i | j | , | Berlin,Berlin | |
|
||||
| k | l | KL (E1),KL (E1) | A1: Berlin,A1: Berlin | |
|
||||
| m | n | MN (A1, A2: Berlin, Hamburg),MN (A1, A2: Berlin, Hamburg) | A1, A2: Berlin, Hamburg,A1, A2: Berlin, Hamburg | |
|
||||
| o | p | OP,OP | , | guard against mis-tagging |
|
||||
| q | r | QR (A1, A2),QR (A1, A2) | A1, A2,A1, A2 | |
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
@routing @guidance
|
||||
Feature: Destination Signs
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - route name assembly with destination signs accounting for directional tags
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
e f
|
||||
g h
|
||||
i j
|
||||
k l
|
||||
m n
|
||||
o p
|
||||
q r
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | destination | destination:ref | destination:forward | destination:backward | oneway | # |
|
||||
| ab | AB | | Berlin | | | | yes | |
|
||||
| cd | CD | | | | Berlin | | yes | |
|
||||
| ef | EF | | | | Berlin | Hamburg | -1 | |
|
||||
| gh | GH | | | A1 | | | yes | |
|
||||
| ij | IJ | | Berlin | A1 | | | no | mis-tagged destination: not a oneway |
|
||||
| kl | KL | | | A1 | Berlin | Hamburg | yes | |
|
||||
| mn | MN | | Berlin | A1 | Berlin | Hamburg | yes | |
|
||||
| op | OP | | Berlin | | | Hamburg | -1 | |
|
||||
| qr | QR | | | | | Hamburg | -1 | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | destinations | ref | # |
|
||||
| a | b | AB,AB | Berlin,Berlin | , | |
|
||||
| c | d | CD,CD | Berlin,Berlin | , | |
|
||||
| f | e | EF,EF | Hamburg,Hamburg | , | |
|
||||
| g | h | GH,GH | A1,A1 | , | |
|
||||
| i | j | IJ,IJ | , | , | guard against mis-tagging |
|
||||
| k | l | KL,KL | A1: Berlin,A1: Berlin | , | |
|
||||
| m | n | MN,MN | A1: Berlin,A1: Berlin | , | |
|
||||
| p | o | OP,OP | Hamburg,Hamburg | , | |
|
||||
| r | q | QR,QR | Hamburg,Hamburg | , | |
|
||||
@@ -1,39 +0,0 @@
|
||||
@routing @guidance
|
||||
Feature: Destination Signs
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - route name assembly with destination signs accounting for directional:ref tags
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
e f
|
||||
g h
|
||||
i j
|
||||
k l
|
||||
m n
|
||||
o p
|
||||
q r
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | destination | destination:ref | destination:ref:forward | destination:ref:backward | destination:forward | destination:backward | oneway | # |
|
||||
| ab | AB | Berlin | A1 | A1 | A2 | | | yes | |
|
||||
| cd | CD | | A1 | A1 | A2 | Berlin | Hamburg | -1 | |
|
||||
| ef | EF | | | A1 | A2 | Berlin | Hamburg | yes | |
|
||||
| gh | GH | | | A1 | A2 | Berlin | Hamburg | -1 | |
|
||||
| ij | IJ | Berlin | A1 | | A2 | Berlin | Hamburg | yes | |
|
||||
| kl | KL | | A1 | | A2 | Berlin | Hamburg | -1 | |
|
||||
| mn | MN | Berlin | A1 | A1 | | Berlin | Hamburg | no | mis-tagged destination: not a oneway |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | destinations | ref | # |
|
||||
| a | b | AB,AB | A1: Berlin,A1: Berlin | , | |
|
||||
| d | c | CD,CD | A2: Hamburg,A2: Hamburg | , | |
|
||||
| e | f | EF,EF | A1: Berlin,A1: Berlin | , | |
|
||||
| h | g | GH,GH | A2: Hamburg,A2: Hamburg | , | |
|
||||
| i | j | IJ,IJ | A1: Berlin,A1: Berlin | , | |
|
||||
| l | k | KL,KL | A2: Hamburg,A2: Hamburg | , | |
|
||||
| m | n | MN,MN | , | , | guard against mis-tagging |
|
||||
@@ -7,11 +7,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with through street
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a e b
|
||||
f d
|
||||
"""
|
||||
| | | c |
|
||||
| a | e | b |
|
||||
| | f | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -26,11 +24,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with three streets
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a e b
|
||||
f d
|
||||
"""
|
||||
| | | c |
|
||||
| a | e | b |
|
||||
| | f | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -46,11 +42,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with three streets, slightly angled
|
||||
Given the node map
|
||||
"""
|
||||
a e c
|
||||
f b
|
||||
d
|
||||
"""
|
||||
| a | e | | | | c |
|
||||
| | f | | | | b |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -66,11 +60,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with three streets, slightly angled
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
f b
|
||||
a e d
|
||||
"""
|
||||
| | | | | | c |
|
||||
| | f | | | | b |
|
||||
| a | e | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -86,11 +78,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with through street, slightly angled
|
||||
Given the node map
|
||||
"""
|
||||
a e c
|
||||
f b
|
||||
d
|
||||
"""
|
||||
| a | e | | | | c |
|
||||
| | f | | | | b |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -105,11 +95,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with through street, slightly angled
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
f b
|
||||
a e d
|
||||
"""
|
||||
| | | | | | c |
|
||||
| | f | | | | b |
|
||||
| a | e | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -124,11 +112,9 @@ Feature: End Of Road Instructions
|
||||
|
||||
Scenario: End of Road with two ramps - prefer ramp over end of road
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a e b
|
||||
f d
|
||||
"""
|
||||
| | | c |
|
||||
| a | e | b |
|
||||
| | f | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -146,21 +132,19 @@ Feature: End Of Road Instructions
|
||||
@end-of-road @negative
|
||||
Scenario: Don't Handle Circles as End-Of-Road
|
||||
Given the node map
|
||||
"""
|
||||
r q
|
||||
a s
|
||||
b
|
||||
j
|
||||
|
||||
l c i k
|
||||
|
||||
h
|
||||
m
|
||||
d n
|
||||
e g
|
||||
f
|
||||
o p
|
||||
"""
|
||||
| | r | | | | q | | | | | | |
|
||||
| | | | | | a | s | | | | | |
|
||||
| | | | b | | | | | | | | |
|
||||
| | | | | | | | j | | | | |
|
||||
| | | | | | | | | | | | |
|
||||
| l | | c | | | | | i | | | | k |
|
||||
| | | | | | | | | | | | |
|
||||
| | | | | | | | h | | | | |
|
||||
| m | | | | | | | | | | | |
|
||||
| | | d | | | | | | | | | n |
|
||||
| | | | e | | | g | | | | | |
|
||||
| | | | | f | | | | | | | |
|
||||
| | | | | o | | p | | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
|
||||
+57
-128
@@ -7,11 +7,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Same Road Class
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -24,48 +22,11 @@ Feature: Fork Instructions
|
||||
| a,c | ab,bc,bc | depart,fork slight left,arrive |
|
||||
| a,d | ab,bd,bd | depart,fork slight right,arrive |
|
||||
|
||||
Scenario: Don't Fork On Single Road
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ab | primary | no |
|
||||
| cb | primary | yes |
|
||||
| bd | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd,bd | depart,new name slight right,arrive |
|
||||
|
||||
Scenario: Don't Fork On Single Road
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | name |
|
||||
| ab | primary | no | road |
|
||||
| cb | primary | yes | road |
|
||||
| bd | primary | yes | turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | road,turn,turn | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Do not fork on link type
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -80,11 +41,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork in presence of other roads
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
e d
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | e | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -100,12 +59,10 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Turning Slight Left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | | | c |
|
||||
| | | | | | |
|
||||
| a | | b | | | |
|
||||
| | | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -120,12 +77,10 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Turning Slight Right
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
|
||||
d
|
||||
"""
|
||||
| | | | | c | |
|
||||
| a | | b | | | |
|
||||
| | | | | | |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -140,11 +95,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Do not fork on service
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -158,11 +111,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Both Turning Slight Right
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
d
|
||||
"""
|
||||
| a | | b | | | |
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -177,11 +128,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Both Turning Slight Left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
d
|
||||
a b
|
||||
"""
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
| a | | b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -196,11 +145,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Both Turning Slight Right - Unnamed
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
d
|
||||
"""
|
||||
| a | | b | | | |
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -215,11 +162,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Both Turning Slight Left - Unnamed
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
d
|
||||
a b
|
||||
"""
|
||||
| | | | | | c |
|
||||
| | | | | | d |
|
||||
| a | | b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -234,11 +179,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Both Turning Very Slightly Right - Unnamed
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
d
|
||||
"""
|
||||
| a | | b | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | c | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -253,11 +196,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork Both Turning Very Slightly Right - Unnamed Ramps
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
d
|
||||
"""
|
||||
| a | | b | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | c | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -272,11 +213,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Non-Fork on complex intersection - left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
e d
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
| | e | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -291,11 +230,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Non-Fork on complex intersection - right
|
||||
Given the node map
|
||||
"""
|
||||
e c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | e | | | c |
|
||||
| a | | b | | |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -310,11 +247,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Tripple fork
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
e
|
||||
"""
|
||||
| | | | | | | | | c |
|
||||
| a | | b | | d | | | | |
|
||||
| | | | | | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -331,11 +266,9 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Tripple fork -- middle obvious
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
e
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | d |
|
||||
| | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -351,10 +284,8 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Don't Fork when leaving Road
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | | b | | c |
|
||||
| | | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -368,10 +299,8 @@ Feature: Fork Instructions
|
||||
|
||||
Scenario: Fork on motorway links - don't fork on through
|
||||
Given the node map
|
||||
"""
|
||||
i a
|
||||
j c b x
|
||||
"""
|
||||
| i | | | | | a |
|
||||
| j | | c | b | | x |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway |
|
||||
@@ -382,6 +311,6 @@ Feature: Fork Instructions
|
||||
| ab | on | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,j | on,xbcj | depart,arrive |
|
||||
| a,i | on,off,off | depart,turn slight right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,j | on,xbcj,xbcj | depart,merge slight left,arrive |
|
||||
| a,i | on,xbcj,off,off | depart,merge slight left,turn slight right,arrive |
|
||||
|
||||
@@ -7,10 +7,8 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Passing Three Way South
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | | b | | c |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -24,10 +22,8 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Passing Three Way North
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| | | d | | |
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -41,10 +37,8 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Passing Oneway Street In
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| | | d | | |
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
@@ -58,10 +52,8 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Passing Oneway Street Out
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| | | d | | |
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
@@ -75,11 +67,9 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Passing Two Intersections
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c d
|
||||
f
|
||||
"""
|
||||
| | | e | | | | |
|
||||
| a | | b | | c | | d |
|
||||
| | | | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -95,11 +85,9 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Passing Two Intersections, Collapsing
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c d
|
||||
f
|
||||
"""
|
||||
| | | e | | | | |
|
||||
| a | | b | | c | | d |
|
||||
| | | | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -116,19 +104,17 @@ Feature: Intersections Data
|
||||
|
||||
Scenario: Roundabouts
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
|
||||
a
|
||||
1 4
|
||||
|
||||
f b d h
|
||||
|
||||
2 3
|
||||
c
|
||||
|
||||
g
|
||||
"""
|
||||
| | | | | e | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | a | | | | |
|
||||
| | | | 1 | | 4 | | | |
|
||||
| | | | | | | | | |
|
||||
| f | | b | | | | d | | h |
|
||||
| | | | | | | | | |
|
||||
| | | | 2 | | 3 | | | |
|
||||
| | | | | c | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | g | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
|
||||
@@ -3,16 +3,13 @@ Feature: Merging
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
And a grid size of 10 meters
|
||||
Given a grid size of 10 meters
|
||||
|
||||
@merge
|
||||
Scenario: Merge on Four Way Intersection
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
e
|
||||
"""
|
||||
| d | | |
|
||||
| a | b | c |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -21,17 +18,14 @@ Feature: Merging
|
||||
| eb | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,turn straight,arrive |
|
||||
| e,c | eb,abc,abc | depart,turn straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight right,arrive |
|
||||
| e,c | eb,abc,abc | depart,merge slight left,arrive |
|
||||
|
||||
@merge
|
||||
Scenario: Merge on Three Way Intersection Right
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| d | | |
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -39,34 +33,13 @@ Feature: Merging
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,turn straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight right,arrive |
|
||||
|
||||
@merge @negative
|
||||
Scenario: Don't Merge on Short-Three Way Intersection Right
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,turn slight left,arrive |
|
||||
|
||||
|
||||
@merge
|
||||
Scenario: Merge on Three Way Intersection Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | b | c |
|
||||
| d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -74,31 +47,23 @@ Feature: Merging
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,turn straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| d,c | db,abc,abc | depart,merge slight left,arrive |
|
||||
|
||||
@merge
|
||||
Scenario: Merge onto a turning road
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
d
|
||||
|
||||
|
||||
|
||||
|
||||
c
|
||||
b
|
||||
a f
|
||||
"""
|
||||
| | | | | | | e |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | d | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| | | | | c | | |
|
||||
| | | | b | | | |
|
||||
| a | | | | | | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -106,23 +71,6 @@ Feature: Merging
|
||||
| fd | residential | in |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| f,e | depart,turn straight,arrive | in,road,road |
|
||||
| f,a | depart,turn sharp left,arrive | in,road,road |
|
||||
|
||||
@merge
|
||||
Scenario: Merge onto a motorway
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| abc | A100 | motorway | yes |
|
||||
| db | | motorway_link | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | ,A100,A100 | depart,merge slight right,arrive |
|
||||
| waypoints | turns | route |
|
||||
| f,e | depart,merge slight left,arrive | in,road,road |
|
||||
| f,a | depart,turn sharp left,arrive | in,road,road |
|
||||
|
||||
@@ -7,10 +7,8 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Ramp Exit Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e
|
||||
f g
|
||||
"""
|
||||
| a | b | c | d | e |
|
||||
| | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -24,11 +22,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Ramp Exit Right Curved Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
f d
|
||||
g e
|
||||
"""
|
||||
| a | b | c | | |
|
||||
| | | f | d | |
|
||||
| | | | g | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -42,11 +38,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Ramp Exit Right Curved Left
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
d g
|
||||
a b c f
|
||||
"""
|
||||
| | | | | e |
|
||||
| | | | d | g |
|
||||
| a | b | c | f | |
|
||||
|
||||
|
||||
And the ways
|
||||
@@ -62,10 +56,8 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Ramp Exit Left
|
||||
Given the node map
|
||||
"""
|
||||
f g
|
||||
a b c d e
|
||||
"""
|
||||
| | | | f | g |
|
||||
| a | b | c | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -79,11 +71,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Ramp Exit Left Curved Left
|
||||
Given the node map
|
||||
"""
|
||||
g e
|
||||
f d
|
||||
a b c
|
||||
"""
|
||||
| | | | g | e |
|
||||
| | | f | d | |
|
||||
| a | b | c | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -97,11 +87,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Ramp Exit Left Curved Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c f
|
||||
d g
|
||||
e
|
||||
"""
|
||||
| a | b | c | f | |
|
||||
| | | | d | g |
|
||||
| | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -115,10 +103,8 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: On Ramp Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e
|
||||
f g
|
||||
"""
|
||||
| a | b | c | d | e |
|
||||
| f | g | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -132,10 +118,8 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: On Ramp Left
|
||||
Given the node map
|
||||
"""
|
||||
f g
|
||||
a b c d e
|
||||
"""
|
||||
| f | g | | | |
|
||||
| a | b | c | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -149,11 +133,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Highway Fork
|
||||
Given the node map
|
||||
"""
|
||||
d e
|
||||
a b c
|
||||
f g
|
||||
"""
|
||||
| | | | | d | e |
|
||||
| a | b | c | | | |
|
||||
| | | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -167,11 +149,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Fork After Ramp
|
||||
Given the node map
|
||||
"""
|
||||
d e
|
||||
a b c
|
||||
f g
|
||||
"""
|
||||
| | | | | d | e |
|
||||
| a | b | c | | | |
|
||||
| | | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -186,10 +166,8 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: On And Off Ramp Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e
|
||||
f g h i
|
||||
"""
|
||||
| a | b | | c | | d | e |
|
||||
| f | g | | | | h | i |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -206,10 +184,8 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: On And Off Ramp Left
|
||||
Given the node map
|
||||
"""
|
||||
f g h i
|
||||
a b c d e
|
||||
"""
|
||||
| f | g | | | | h | i |
|
||||
| a | b | | c | | d | e |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
@@ -226,11 +202,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Merging Motorways
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| e | | |
|
||||
| a | b | c |
|
||||
| d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -245,11 +219,9 @@ Feature: Motorway Guidance
|
||||
|
||||
Scenario: Handle 90 degree off ramps correctly
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
x b c y
|
||||
d
|
||||
"""
|
||||
| a | | | | |
|
||||
| x | b | | c | y |
|
||||
| | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
|
||||
@@ -7,9 +7,7 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed name Change
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -23,10 +21,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed Name Change with unannounced Turn Right
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
| a | | b | | |
|
||||
| | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -39,10 +35,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed Name Change with unannounced Turn Left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
"""
|
||||
| | | | | c |
|
||||
| a | | b | | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -55,10 +49,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Disturbed Name Change with Turn
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
| a | | b | | |
|
||||
| | d | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -72,10 +64,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
"""
|
||||
| | | c |
|
||||
| a | | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -88,10 +78,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Sharp Left
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
"""
|
||||
| c | | |
|
||||
| a | | b |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -104,10 +92,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Right
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
| a | | b |
|
||||
| | | c |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -120,10 +106,8 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Undisturbed Name Change with announced Turn Sharp Right
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
| a | | b |
|
||||
| c | | |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -137,16 +121,14 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Disturbed Name Change with minor road class
|
||||
Given the node map
|
||||
"""
|
||||
a b d
|
||||
c
|
||||
"""
|
||||
| a | | b | | d |
|
||||
| | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ab | residential | yes |
|
||||
| bc | residential | yes |
|
||||
| bd | service | yes |
|
||||
| nodes | highway |
|
||||
| ab | residential |
|
||||
| bc | residential |
|
||||
| bd | service |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -154,9 +136,7 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Empty road names - Announce Change From, suppress Change To
|
||||
Given the node map
|
||||
"""
|
||||
a b 1 c d
|
||||
"""
|
||||
| a | | b | 1 | c | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -171,9 +151,7 @@ Feature: New-Name Instructions
|
||||
|
||||
Scenario: Empty road names - Loose name shortly
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e
|
||||
"""
|
||||
| a | | b | | c | | d | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -186,228 +164,3 @@ Feature: New-Name Instructions
|
||||
| waypoints | route | turns |
|
||||
| a,e | name,with-name,with-name | depart,new name straight,arrive |
|
||||
| b,e | with-name,with-name | depart,arrive |
|
||||
|
||||
Scenario: Both Name and Ref Empty
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | |
|
||||
| bc | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | , | depart,arrive |
|
||||
|
||||
Scenario: Same Name, Ref Extended
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | A | B1 |
|
||||
| bc | C | B1;B2 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | A,C,C | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Same Name, Ref Removed
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | A | B1;B2 |
|
||||
| bc | C | B1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | A,C,C | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Name Removed, Ref Extended
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | A | B1 |
|
||||
| bc | | B1;B2 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | A, | depart,arrive |
|
||||
|
||||
Scenario: Name Added, Ref Removed
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | B1 |
|
||||
| bc | A | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ,A,A | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Prefix Change
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | North Central Expressway | US 75 | motorway |
|
||||
| bc | Central Expressway | US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | North Central Expressway,Central Expressway,Central Expressway | depart,new name straight,arrive |
|
||||
|
||||
Scenario: Prefix Change
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ba | North Central Expressway | US 75 | motorway |
|
||||
| cb | Central Expressway | US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| c,a | Central Expressway,North Central Expressway,North Central Expressway | depart,new name straight,arrive |
|
||||
|
||||
Scenario: No Name, Same Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | Central Expressway | US 75 | motorway |
|
||||
| bc | | US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | Central Expressway, | depart,arrive |
|
||||
|
||||
Scenario: No Name, Same Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | | US 75 | motorway |
|
||||
| bc | Central Expressway | US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ,Central Expressway | depart,arrive |
|
||||
|
||||
Scenario: No Name, Same Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | | US 75;US 69 | motorway |
|
||||
| bc | | US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | , | depart,arrive |
|
||||
|
||||
Scenario: No Name, Same Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | | US 69;US 75 | motorway |
|
||||
| bc | | US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | , | depart,arrive |
|
||||
|
||||
Scenario: No Name, Same Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | | US 75 | motorway |
|
||||
| bc | | US 75;US 69 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | , | depart,arrive |
|
||||
|
||||
Scenario: No Name, Same Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | | US 75 | motorway |
|
||||
| bc | | US 69;US 75 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | , | depart,arrive |
|
||||
|
||||
Scenario: Spaces in refs for containment check, #3086
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | Keystone | US 64;US 412;OK 151 Detour | motorway |
|
||||
| bc | Keystone | US 64; US 412 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | Keystone,Keystone | depart,arrive |
|
||||
|
||||
Scenario: More spaces in refs for containment check, #3086
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref | highway |
|
||||
| ab | Keystone | US 64; US 412 ; OK 151 Detour | motorway |
|
||||
| bc | Keystone | US 64 ; US 412 | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | Keystone,Keystone | depart,arrive |
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
@routing @guidance @mode-change
|
||||
Feature: Notification on turn onto mode change
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 400 meters
|
||||
|
||||
Scenario: Turn onto a Ferry
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
b d
|
||||
a e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | name |
|
||||
| abf | primary | | |
|
||||
| bd | | ferry | ferry |
|
||||
| de | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | modes |
|
||||
| a,e | ,ferry,, | depart,turn right,notification right,arrive | driving,ferry,driving,driving |
|
||||
|
||||
Scenario: Turn onto a Ferry
|
||||
Given the node map
|
||||
"""
|
||||
h g
|
||||
a c e
|
||||
b f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | name |
|
||||
| ac | primary | | |
|
||||
| bah | primary | | |
|
||||
| ec | | ferry | ferry |
|
||||
| gef | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | modes |
|
||||
| g,h | ,ferry,,, | depart,turn right,notification straight,turn right,arrive | driving,ferry,driving,driving,driving |
|
||||
| b,g | ,,ferry,, | depart,turn right,notification straight,turn left,arrive | driving,driving,ferry,driving,driving |
|
||||
|
||||
Scenario: Straight onto a Ferry
|
||||
Given the node map
|
||||
"""
|
||||
|
||||
c d i
|
||||
a
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | name |
|
||||
| ac | primary | | |
|
||||
| dc | | ferry | ferry |
|
||||
| df | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | modes |
|
||||
| a,f | ,ferry,, | depart,notification right,notification right,arrive | driving,ferry,driving,driving |
|
||||
@@ -1,192 +0,0 @@
|
||||
@routing @guidance @perceived-angles
|
||||
Feature: Simple Turns
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
Scenario: Turning into splitting road
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
|
||||
|
||||
c d
|
||||
|
||||
e
|
||||
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| ab | road | primary | no |
|
||||
| bc | road | primary | yes |
|
||||
| fdb | road | primary | yes |
|
||||
| de | turn | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| e,a | depart,turn slight right,arrive | turn,road,road |
|
||||
|
||||
Scenario: Turning into splitting road
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
g-b
|
||||
/\
|
||||
/ \
|
||||
c d
|
||||
|\
|
||||
| e
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway |
|
||||
| ab | road | primary | no |
|
||||
| bc | road | primary | yes |
|
||||
| fdb | road | primary | yes |
|
||||
| de | turn | primary | no |
|
||||
| bg | left | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| e,a | depart,turn slight right,arrive | turn,road,road |
|
||||
| e,g | depart,turn slight right,turn left,arrive | turn,road,left,left |
|
||||
| f,g | depart,turn left,arrive | road,left,left |
|
||||
| f,c | depart,continue uturn,arrive | road,road,road |
|
||||
|
||||
Scenario: Middle Island
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
b
|
||||
c h
|
||||
|
||||
|
||||
|
||||
|
||||
d g
|
||||
e
|
||||
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| ef | road | no |
|
||||
| bcde | road | yes |
|
||||
| eghb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | road,road |
|
||||
| c,f | depart,arrive | road,road |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| g,a | depart,arrive | road,road |
|
||||
|
||||
Scenario: Middle Island Over Bridge
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
b
|
||||
c h
|
||||
|
||||
|
||||
1 2
|
||||
|
||||
d g
|
||||
e
|
||||
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| ef | road | no |
|
||||
| bc | road | yes |
|
||||
| cd | bridge | yes |
|
||||
| de | road | yes |
|
||||
| eg | road | yes |
|
||||
| gh | bridge | yes |
|
||||
| hb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,arrive | road,road |
|
||||
| c,f | depart,new name straight,arrive | bridge,road,road |
|
||||
| 1,f | depart,new name straight,arrive | bridge,road,road |
|
||||
| f,a | depart,arrive | road,road |
|
||||
| g,a | depart,new name straight,arrive | bridge,road,road |
|
||||
| 2,a | depart,new name straight,arrive | bridge,road,road |
|
||||
|
||||
@negative
|
||||
Scenario: Don't Collapse Places:
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
g
|
||||
|
||||
|
||||
|
||||
|
||||
a b e f
|
||||
|
||||
|
||||
|
||||
|
||||
c
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | place | no |
|
||||
| cd | bottom | no |
|
||||
| ef | place | no |
|
||||
| gh | top | no |
|
||||
| bcegb | place | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,d | depart,turn right,arrive | place,bottom,bottom |
|
||||
| a,f | depart,continue left,continue right,arrive | place,place,place,place |
|
||||
| d,f | depart,turn right,continue right,arrive | bottom,place,place,place |
|
||||
| d,h | depart,turn right,continue left,turn right,arrive | bottom,place,place,top,top |
|
||||
|
||||
@bug @not-sorted @3179
|
||||
Scenario: Adjusting road angles to not be sorted
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
|
||||
|
|
||||
|
|
||||
_e - - - - - - - - - f
|
||||
/
|
||||
a - - - - -b <
|
||||
i \ _
|
||||
h c - - - - - - - - - d
|
||||
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | road | no |
|
||||
| febcd | road | yes |
|
||||
| ge | in | yes |
|
||||
| eh | right | yes |
|
||||
| ei | left | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| g,a | in,road,road |
|
||||
@@ -8,11 +8,9 @@ Feature: General Post-Processing related features
|
||||
# this testcase used to crash geometry generation (at that time handled during intersection generation)
|
||||
Scenario: Regression test #2424
|
||||
Given the node map
|
||||
"""
|
||||
e i
|
||||
a b c d h k m
|
||||
f l
|
||||
"""
|
||||
| | | e | | | | | | i | | | | |
|
||||
| a | | b | | c | | d | | h | | k | | m |
|
||||
| | | | | f | | | | | | l | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
|
||||
@@ -7,10 +7,8 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Ramp On Through Street Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -23,10 +21,8 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Ramp On Through Street Left
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| | d | |
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -39,11 +35,9 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Ramp On Through Street Left and Right
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| | e | |
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -58,10 +52,8 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Ramp On Three Way Intersection Right
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | b | c |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -75,11 +67,9 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Ramp On Three Way Intersection Right
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -93,16 +83,14 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Ramp Off Though Street
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abc | tertiary | yes |
|
||||
| bd | motorway_link | yes |
|
||||
| nodes | highway |
|
||||
| abc | tertiary |
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
@@ -111,10 +99,8 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Straight Ramp Off Turning Though Street
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
"""
|
||||
| | | c |
|
||||
| a | b | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -122,17 +108,15 @@ Feature: Ramp Guidance
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,on ramp straight,arrive |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,on ramp straight,arrive |
|
||||
| a,c | abc,abc,abc | depart,continue left,arrive |
|
||||
|
||||
Scenario: Fork Ramp Off Turning Though Street
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -140,17 +124,15 @@ Feature: Ramp Guidance
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,on ramp right,arrive |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,on ramp right,arrive |
|
||||
| a,c | abc,abc,abc | depart,continue left,arrive |
|
||||
|
||||
Scenario: Fork Ramp
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | c |
|
||||
| a | b | |
|
||||
| | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -165,11 +147,9 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Fork Slight Ramp
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | c |
|
||||
| a | b | | |
|
||||
| | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -184,11 +164,9 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Fork Slight Ramp on Through Street
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | c |
|
||||
| a | b | | |
|
||||
| | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -196,17 +174,15 @@ Feature: Ramp Guidance
|
||||
| bd | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,on ramp slight right,arrive |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,d | abc,bd,bd | depart,on ramp slight right,arrive |
|
||||
| a,c | abc,abc,abc | depart,continue slight left,arrive |
|
||||
|
||||
Scenario: Fork Slight Ramp on Obvious Through Street
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | | | c |
|
||||
| a | b | | |
|
||||
| | | | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -220,11 +196,9 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Two Ramps Joining into common Motorway
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
c d
|
||||
b
|
||||
"""
|
||||
| a | | | |
|
||||
| | | c | d |
|
||||
| b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -239,11 +213,9 @@ Feature: Ramp Guidance
|
||||
|
||||
Scenario: Two Ramps Joining into common Motorway Unnamed
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
c d
|
||||
b
|
||||
"""
|
||||
| a | | | |
|
||||
| | | c | d |
|
||||
| b | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -255,24 +227,3 @@ Feature: Ramp Guidance
|
||||
| waypoints | route | turns |
|
||||
| a,d | , | depart,arrive |
|
||||
| b,d | , | depart,arrive |
|
||||
|
||||
Scenario: Ferry Onto A Ramp
|
||||
Given the node map
|
||||
"""
|
||||
d - e - g
|
||||
|
|
||||
a - b ~ ~ ~ ~ ~ ~ ~ c
|
||||
` f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | name | ref |
|
||||
| ab | primary | | boarding | |
|
||||
| bc | | ferry | boaty mc boatface | m2 |
|
||||
| cf | | ferry | boaty mc boatface | |
|
||||
| cd | | ferry | boaty mc boatface's cousin | |
|
||||
| de | motorway_link | | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,e | boarding,boaty mc boatface,boaty mc boatface's cousin,, |
|
||||
|
||||
@@ -7,13 +7,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
h g c d
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -40,13 +38,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -73,13 +69,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -107,13 +101,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -141,13 +133,11 @@ Feature: Rotary
|
||||
#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
|
||||
"""
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
|
||||
@@ -7,13 +7,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
h g c d
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -40,13 +38,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -73,13 +69,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -107,13 +101,11 @@ Feature: Rotary
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -141,13 +133,11 @@ Feature: Rotary
|
||||
#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
|
||||
"""
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
@@ -178,12 +168,10 @@ Feature: Rotary
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
c d f
|
||||
e
|
||||
"""
|
||||
| a | | |
|
||||
| b | | |
|
||||
| c | d | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -199,12 +187,10 @@ Feature: Rotary
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d
|
||||
b c f
|
||||
e
|
||||
"""
|
||||
| a | | |
|
||||
| d | | |
|
||||
| b | c | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -220,12 +206,10 @@ Feature: Rotary
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
c
|
||||
d b f
|
||||
e
|
||||
"""
|
||||
| a | | |
|
||||
| c | | |
|
||||
| d | b | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -241,12 +225,10 @@ Feature: Rotary
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
d c e
|
||||
b
|
||||
a
|
||||
"""
|
||||
| f | | |
|
||||
| d | c | e |
|
||||
| | b | |
|
||||
| | a | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -262,12 +244,10 @@ Feature: Rotary
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
d c e
|
||||
b
|
||||
a
|
||||
"""
|
||||
| f | | |
|
||||
| d | c | e |
|
||||
| b | | |
|
||||
| a | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
|
||||
@@ -5,15 +5,44 @@ Feature: Basic Roundabout
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -40,13 +69,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -74,13 +101,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -107,13 +132,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Mixed Entry and Exit
|
||||
Given the node map
|
||||
"""
|
||||
c a
|
||||
j b f
|
||||
k e
|
||||
l h d
|
||||
g i
|
||||
"""
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
@routing @guidance
|
||||
Feature: Basic Roundabout
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
h g c d
|
||||
e
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout 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 |
|
||||
@@ -7,13 +7,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
h g c d
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -40,12 +38,10 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Enter and Exit - Rotated
|
||||
Given the node map
|
||||
"""
|
||||
a d
|
||||
b c
|
||||
g e
|
||||
h f
|
||||
"""
|
||||
| a | | | d |
|
||||
| | b | c | |
|
||||
| | g | e | |
|
||||
| h | | | f |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -72,13 +68,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -105,13 +99,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -139,13 +131,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -172,13 +162,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Mixed Entry and Exit - Not an Intersection
|
||||
Given the node map
|
||||
"""
|
||||
c a
|
||||
j b f
|
||||
k e
|
||||
l h d
|
||||
g i
|
||||
"""
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
@@ -209,13 +197,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Segregated roads - Not an intersection
|
||||
Given the node map
|
||||
"""
|
||||
a c
|
||||
l b d
|
||||
k e
|
||||
j h f
|
||||
i g
|
||||
"""
|
||||
| | a | | c | |
|
||||
| l | | b | | d |
|
||||
| | k | | e | |
|
||||
| j | | h | | f |
|
||||
| | i | | g | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
@@ -246,10 +232,8 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Collinear in X
|
||||
Given the node map
|
||||
"""
|
||||
a b c d f
|
||||
e
|
||||
"""
|
||||
| a | b | c | d | f |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -259,40 +243,16 @@ Feature: Basic Roundabout
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout turn right exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout turn straight exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
e c
|
||||
d
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout turn right exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout turn straight exit-2,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
c d f
|
||||
e
|
||||
"""
|
||||
| a | | |
|
||||
| b | | |
|
||||
| c | d | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -308,12 +268,10 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d
|
||||
b c f
|
||||
e
|
||||
"""
|
||||
| a | | |
|
||||
| d | | |
|
||||
| b | c | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -329,12 +287,10 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
c
|
||||
d b f
|
||||
e
|
||||
"""
|
||||
| a | | |
|
||||
| c | | |
|
||||
| d | b | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -350,13 +306,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Enter and Exit -- too complex
|
||||
Given the node map
|
||||
"""
|
||||
j a
|
||||
i b
|
||||
g c d
|
||||
h e
|
||||
f
|
||||
"""
|
||||
| j | | a | | |
|
||||
| | i | b | | |
|
||||
| | g | | c | d |
|
||||
| h | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -384,13 +338,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Enter and Exit -- Non-Distinct
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
g c d
|
||||
e
|
||||
h f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| | g | | c | d |
|
||||
| | | e | | |
|
||||
| h | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -417,13 +369,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Enter and Exit -- Bearing
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
h g c d
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -435,137 +385,7 @@ Feature: Basic Roundabout
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | bearing |
|
||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive | 0->180,180->225,90->0 |
|
||||
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive | 0->180,180->225,180->0 |
|
||||
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive | 0->180,180->225,270->0 |
|
||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive | 0->180,180->224,90->0 |
|
||||
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive | 0->180,180->224,180->0 |
|
||||
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive | 0->180,180->224,270->0 |
|
||||
|
||||
Scenario: Enter and Exit - Bearings
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
i b l
|
||||
h g c d
|
||||
j e k
|
||||
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bigjekclb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | bearing |
|
||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-3,arrive | 0->180,180->270,90->0 |
|
||||
| a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive | 0->180,180->270,180->0 |
|
||||
| a,h | ab,gh,gh | depart,roundabout turn right exit-1,arrive | 0->180,180->270,270->0 |
|
||||
|
||||
Scenario: Large radius Roundabout Intersection and ways modelled out: East Mission St, North 7th St
|
||||
# http://www.openstreetmap.org/way/348812150
|
||||
# Note: grid size is 3 meter, this roundabout is more like 5-10 meters in radius
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
b n
|
||||
|
||||
c m
|
||||
|
||||
e d k l
|
||||
|
||||
f j
|
||||
|
||||
g i
|
||||
|
||||
h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | highway | name |
|
||||
| ab | | tertiary | North 7th St |
|
||||
| ed | | tertiary | East Mission St |
|
||||
| hg | | tertiary | North 7th St |
|
||||
| lk | | tertiary | East Mission St |
|
||||
| bcdfgijkmnb | roundabout | tertiary | Roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | North 7th St,East Mission St,East Mission St | depart,roundabout turn right exit-1,arrive |
|
||||
| a,h | North 7th St,North 7th St,North 7th St | depart,roundabout turn straight exit-2,arrive |
|
||||
| a,l | North 7th St,East Mission St,East Mission St | depart,roundabout turn left exit-3,arrive |
|
||||
| h,l | North 7th St,East Mission St,East Mission St | depart,roundabout turn right exit-1,arrive |
|
||||
| h,a | North 7th St,North 7th St,North 7th St | depart,roundabout turn straight exit-2,arrive |
|
||||
| h,e | North 7th St,East Mission St,East Mission St | depart,roundabout turn left exit-3,arrive |
|
||||
| e,h | East Mission St,North 7th St,North 7th St | depart,roundabout turn right exit-1,arrive |
|
||||
| e,l | East Mission St,East Mission St,East Mission St | depart,roundabout turn straight exit-2,arrive |
|
||||
| e,a | East Mission St,North 7th St,North 7th St | depart,roundabout turn left exit-3,arrive |
|
||||
| l,a | East Mission St,North 7th St,North 7th St | depart,roundabout turn right exit-1,arrive |
|
||||
| l,e | East Mission St,East Mission St,East Mission St | depart,roundabout turn straight exit-2,arrive |
|
||||
| l,h | East Mission St,North 7th St,North 7th St | depart,roundabout turn left exit-3,arrive |
|
||||
|
||||
Scenario: Enter and Exit - Traffic Signals
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
i b l
|
||||
h g c d
|
||||
j e k
|
||||
f
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| i | traffic_signals |
|
||||
| j | traffic_signals |
|
||||
| k | traffic_signals |
|
||||
| l | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bigjekclb | 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 |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/41.03275/-2.18990
|
||||
#at some point we probably want to recognise these situations and don't mention the roundabout at all here
|
||||
Scenario: Enter And Exit Throughabout
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
|
||||
c b d e f
|
||||
|
||||
a g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | junction | oneway |
|
||||
| dghd | tertiary_link | | roundabout | |
|
||||
| cbdef | trunk | through | | no |
|
||||
| ab | residential | in | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,f | depart,turn right,roundabout turn straight exit-1,arrive | in,through,through,through |
|
||||
|
||||
@@ -5,15 +5,44 @@ Feature: Basic Roundabout
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Enter and Exit
|
||||
Given the node map
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| h | g | | c | d |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bgecb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -38,32 +67,13 @@ Feature: Basic Roundabout
|
||||
| h,c | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
| h,e | gh,bcegb,bcegb | depart,roundabout-exit-undefined,arrive |
|
||||
|
||||
#2927
|
||||
Scenario: Only Roundabout
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b d
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abcda,abcda | depart,arrive |
|
||||
|
||||
Scenario: Only Exit
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -91,13 +101,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Drive Around
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
d c g h
|
||||
e
|
||||
f
|
||||
"""
|
||||
| | | a | | |
|
||||
| | | b | | |
|
||||
| d | c | | g | h |
|
||||
| | | e | | |
|
||||
| | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
@@ -124,13 +132,11 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Mixed Entry and Exit
|
||||
Given the node map
|
||||
"""
|
||||
c a
|
||||
j b f
|
||||
k e
|
||||
l h d
|
||||
g i
|
||||
"""
|
||||
| | c | | a | |
|
||||
| j | | b | | f |
|
||||
| | k | | e | |
|
||||
| l | | h | | d |
|
||||
| | g | | i | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
@@ -161,15 +167,13 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Mixed Entry and Exit - segregated roads
|
||||
Given the node map
|
||||
"""
|
||||
a c
|
||||
|
||||
l b d
|
||||
k e
|
||||
j h f
|
||||
|
||||
i g
|
||||
"""
|
||||
| | | a | | c | | |
|
||||
| | | | | | | |
|
||||
| l | | | b | | | d |
|
||||
| | | k | | e | | |
|
||||
| j | | | h | | | f |
|
||||
| | | | | | | |
|
||||
| | | i | | g | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
@@ -200,15 +204,13 @@ Feature: Basic Roundabout
|
||||
|
||||
Scenario: Mixed Entry and Exit - segregated roads, different names
|
||||
Given the node map
|
||||
"""
|
||||
a c
|
||||
|
||||
l b d
|
||||
k e
|
||||
j h f
|
||||
|
||||
i g
|
||||
"""
|
||||
| | | a | | c | | |
|
||||
| | | | | | | |
|
||||
| l | | | b | | | d |
|
||||
| | | k | | e | | |
|
||||
| j | | | h | | | f |
|
||||
| | | | | | | |
|
||||
| | | i | | g | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
@@ -241,26 +243,142 @@ Feature: Basic Roundabout
|
||||
| j,f | jk,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| j,c | jk,bc,bc | depart,roundabout-exit-3,arrive |
|
||||
|
||||
Scenario: Collinear in X
|
||||
Given the node map
|
||||
| a | b | c | d | f |
|
||||
| | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in Y
|
||||
Given the node map
|
||||
| | a |
|
||||
| | b |
|
||||
| e | c |
|
||||
| | d |
|
||||
| | f |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| b | | |
|
||||
| c | d | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| bcdb | roundabout |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ab,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ab,df,df | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| d | | |
|
||||
| b | c | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ad | |
|
||||
| bcdb | roundabout |
|
||||
| be | |
|
||||
| cf | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ad,be,be | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ad,cf,cf | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Collinear in X,Y
|
||||
Given the node map
|
||||
| a | | |
|
||||
| c | | |
|
||||
| d | b | f |
|
||||
| e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ac | |
|
||||
| bcdb | roundabout |
|
||||
| de | |
|
||||
| bf | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | ac,de,de | depart,roundabout-exit-1,arrive |
|
||||
| a,f | ac,bf,bf | depart,roundabout-exit-2,arrive |
|
||||
|
||||
Scenario: Enter and Exit - Bearings
|
||||
Given the node map
|
||||
| | | | a | | | |
|
||||
| | | | | | | |
|
||||
| | | i | b | l | | |
|
||||
| h | | g | | c | | d |
|
||||
| | | j | e | k | | |
|
||||
| | | | | | | |
|
||||
| | | | f | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bigjekclb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | bearing |
|
||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive | 0->180,180->270,90->0 |
|
||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive | 0->180,180->270,180->0 |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive | 0->180,180->270,270->0 |
|
||||
|
||||
Scenario: Motorway Roundabout
|
||||
#See 39.933742 -75.082345
|
||||
Given the node map
|
||||
"""
|
||||
l a i
|
||||
|
||||
|
||||
b
|
||||
c
|
||||
|
||||
h
|
||||
n
|
||||
|
||||
d j
|
||||
|
||||
m g
|
||||
|
||||
|
||||
e f
|
||||
"""
|
||||
| | | | | l | | | | a | | i |
|
||||
| | | | | | | | | | | |
|
||||
| | | | | | | | | | | |
|
||||
| | | | | | | b | | | | |
|
||||
| | | | c | | | | | | | |
|
||||
| | | | | | | | | | | |
|
||||
| | | | | | | | | h | | |
|
||||
| n | | | | | | | | | | |
|
||||
| | | | | | | | | | | |
|
||||
| | | d | | | | | | | | j |
|
||||
| | | | | | | | | | | |
|
||||
| | | | | m | | | g | | | |
|
||||
| | | | | | | | | | | |
|
||||
| | | | | | | | | | | |
|
||||
| | | e | | f | | | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction | name | highway | oneway | ref |
|
||||
@@ -277,29 +395,22 @@ Feature: Basic Roundabout
|
||||
| dmg | roundabout | | trunk_link | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | ref |
|
||||
| a,e | crescent,crescent,crescent | depart,roundabout-exit-3,arrive | US 130,US 130,US 130 |
|
||||
| j,l | ,, | depart,roundabout-exit-2,arrive | NJ 38,NJ 38,NJ 38 |
|
||||
| waypoints | route | turns |
|
||||
| a,e | crescent (US 130),crescent (US 130),crescent (US 130) | depart,roundabout-exit-3,arrive |
|
||||
| j,l | NJ 38,NJ 38,NJ 38 | depart,roundabout-exit-2,arrive |
|
||||
|
||||
@todo
|
||||
# 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
|
||||
# a throughabout instruction)
|
||||
# see https://github.com/Project-OSRM/osrm-backend/issues/3142
|
||||
Scenario: Double Roundabout with through-lane
|
||||
#http://map.project-osrm.org/?z=18¢er=38.911752%2C-77.048667&loc=38.912003%2C-77.050831&loc=38.909277%2C-77.042516&hl=en&alt=0
|
||||
Given the node map
|
||||
"""
|
||||
o n
|
||||
.e. _j_.
|
||||
/ '. / \
|
||||
/ q__ / |
|
||||
a---b | >s---f-------g i---k
|
||||
. r'' | .' . .p'|
|
||||
. | t . .'
|
||||
'c---d 'h'
|
||||
l m
|
||||
"""
|
||||
| | | | | o | | | | | | | | | | | | n | | | | |
|
||||
| | | | | e | | | | | | | | | | | | j | | | | |
|
||||
| | | | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | q | | | | | | | | | | | | | | |
|
||||
| a | | b | | | | | | s | | f | | | | g | | | | i | | k |
|
||||
| | | | | | | r | | | | | | | | | | | p | | | |
|
||||
| | | | | | | | | | | t | | | | | | | | | | |
|
||||
| | | | | c | | d | | | | | | | | | | h | | | | |
|
||||
| | | | | l | | | | | | | | | | | | m | | | | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
@@ -309,13 +420,9 @@ Feature: Basic Roundabout
|
||||
| nodes | junction | name | oneway |
|
||||
| bcdrqeb | roundabout | sheridan circle | yes |
|
||||
| ghi | roundabout | dupont circle | yes |
|
||||
| ij | roundabout | dupont circle | yes |
|
||||
| jg | roundabout | dupont circle | yes |
|
||||
| ijg | roundabout | dupont circle | yes |
|
||||
| ab | | massachusetts | no |
|
||||
| gp | | massachusetts | no |
|
||||
| pi | | massachusetts | no |
|
||||
| sfg | | massachusetts | no |
|
||||
| ik | | massachusetts | no |
|
||||
| sfgpik | | massachusetts | no |
|
||||
| cl | | 23rd street | no |
|
||||
| oe | | r street | no |
|
||||
| jn | | new hampshire | no |
|
||||
@@ -325,146 +432,47 @@ Feature: Basic Roundabout
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | pi | ij | i | no_left_turn |
|
||||
| restriction | sfgpik | ijg | i | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,k | massachusetts,massachusetts,massachusetts,massachusetts | depart,sheridan circle-exit-2,rotary-exit-1,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,k | massachusetts,massachusetts,massachusetts,massachusetts | depart,sheridan circle-exit-2,dupont circle-exit-1,arrive |
|
||||
|
||||
#2856 - http://www.openstreetmap.org/#map=19/47.23318/-1.56563
|
||||
Scenario: Linked Roundabouts
|
||||
Scenario: Enter and Exit - Traffic Signals
|
||||
Given the node map
|
||||
"""
|
||||
x
|
||||
u r
|
||||
| | | a | | |
|
||||
| | i | b | l | |
|
||||
| h | g | | c | d |
|
||||
| | j | e | k | |
|
||||
| | | f | | |
|
||||
|
||||
t
|
||||
s
|
||||
v i h g
|
||||
q
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| i | traffic_signals |
|
||||
| j | traffic_signals |
|
||||
| k | traffic_signals |
|
||||
| l | traffic_signals |
|
||||
|
||||
j f
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| ab | |
|
||||
| cd | |
|
||||
| ef | |
|
||||
| gh | |
|
||||
| bigjekclb | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout-exit-3,arrive |
|
||||
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
|
||||
| a,h | ab,gh,gh | depart,roundabout-exit-1,arrive |
|
||||
| d,f | cd,ef,ef | depart,roundabout-exit-3,arrive |
|
||||
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
|
||||
| d,a | cd,ab,ab | depart,roundabout-exit-1,arrive |
|
||||
| f,h | ef,gh,gh | depart,roundabout-exit-3,arrive |
|
||||
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,roundabout-exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,roundabout-exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout-exit-1,arrive |
|
||||
|
||||
a e
|
||||
|
||||
|
||||
b c d p
|
||||
|
||||
m n
|
||||
l
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
k
|
||||
|
||||
|
||||
|
||||
w o
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | name | highway | oneway |
|
||||
| abija | roundabout | egg | primary | yes |
|
||||
| defgd | roundabout | egg | primary | yes |
|
||||
| bcd | roundabout | egg | primary | yes |
|
||||
| ghi | | egg | primary | yes |
|
||||
| amklb | | ll | primary | yes |
|
||||
| wk | | ll | primary | no |
|
||||
| dnope | | lr | secondary | yes |
|
||||
| fqrsg | | tr | primary | yes |
|
||||
| rx | | tr | primary | no |
|
||||
| ituvj | | tl | primary | yes |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| c | give_way |
|
||||
| h | give_way |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
# since we cannot handle these invalid roundabout tags yet, we cannout output roundabout taggings. This will hopefully change some day
|
||||
#| w,x | ll,egg,egg,tr,tr | depart,roundabout-exit-1,roundabout-exit-2,arrive |
|
||||
| w,x | ll,egg,egg,tr,tr | depart,turn right,continue left,turn straight,arrive |
|
||||
|
||||
Scenario: Use Lane in Roundabout
|
||||
Given the node map
|
||||
"""
|
||||
. i . . . .. .
|
||||
.' '.
|
||||
a - b. f - g
|
||||
. |
|
||||
'. 1 /
|
||||
'. /
|
||||
j - - - c . . e
|
||||
' d '
|
||||
' h
|
||||
"""
|
||||
|
||||
#using roundabout as name, we can ignore whether we see a roundabout or a rotary here. Cucumber output will be the same
|
||||
And the ways
|
||||
| nodes | junction | name | oneway | turn:lanes:forward |
|
||||
| ba | | left-out | yes | |
|
||||
| jc | | left-in | yes | |
|
||||
| dh | | right-bot-out | yes | |
|
||||
| fg | | right-top-out | yes | |
|
||||
| bc | roundabout | roundabout | yes | left;through\|through |
|
||||
| cdefib | roundabout | roundabout | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| 1,h | roundabout,right-bot-out,right-bot-out | depart,roundabout-exit-1,arrive |
|
||||
|
||||
@3254
|
||||
Scenario: Driving up to and through a roundabout
|
||||
Given the node map
|
||||
"""
|
||||
g a
|
||||
| / \
|
||||
e-f- - - - b d - - - h
|
||||
| \ /
|
||||
i c
|
||||
|
|
||||
k
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | name | highway |
|
||||
| abcda | roundabout | roundabout | residential |
|
||||
| gfi | | side | residential |
|
||||
| efb | | left | residential |
|
||||
| dh | | right | residential |
|
||||
| ck | | bottom | residential |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| e,h | left,right,right | depart,roundabout-exit-2,arrive |
|
||||
|
||||
@3254
|
||||
Scenario: Driving up to and through a roundabout
|
||||
Given the node map
|
||||
"""
|
||||
g a
|
||||
| / \
|
||||
e-f - b d - - - h
|
||||
| \ /
|
||||
i c
|
||||
|
|
||||
k
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | name | highway |
|
||||
| abcda | roundabout | roundabout | residential |
|
||||
| gfi | | side | residential |
|
||||
| efb | | left | residential |
|
||||
| dh | | right | residential |
|
||||
| ck | | bottom | residential |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| e,h | left,right,right | depart,roundabout-exit-2,arrive |
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
@routing @guidance @staggered-intersections
|
||||
Feature: Staggered Intersections
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 1 meters
|
||||
# Note the one meter grid size: staggered intersections make zig-zags of a couple of meters only
|
||||
|
||||
# https://www.openstreetmap.org/#map=19/39.26022/-84.25144
|
||||
Scenario: Staggered Intersection: Oak St, Cedar Dr
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
h
|
||||
i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | residential | Oak St |
|
||||
| efg | residential | Oak St |
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Oak St | depart,arrive |
|
||||
| g,a | Oak St,Oak St | depart,arrive |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if long segment in between
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c
|
||||
|
||||
|
||||
d
|
||||
|
||||
|
||||
e f g
|
||||
h
|
||||
i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | residential | Oak St |
|
||||
| efg | residential | Oak St |
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
| g,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if not left-right or right-left
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c
|
||||
d
|
||||
g f e
|
||||
h
|
||||
i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | residential | Oak St |
|
||||
| efg | residential | Oak St |
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Oak St,Oak St | depart,continue uturn,arrive |
|
||||
| g,a | Oak St,Oak St,Oak St | depart,continue uturn,arrive |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if the names are not the same
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
h
|
||||
i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | residential | Oak St |
|
||||
| efg | residential | Elm St |
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Cedar Dr,Elm St,Elm St | depart,turn right,turn left,arrive |
|
||||
| g,a | Elm St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
@@ -3,13 +3,11 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 2000 meters
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Suffix To Suffix
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -22,9 +20,7 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
|
||||
Scenario: Suffix To Suffix Ref
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
@@ -32,14 +28,12 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
| bc | 42 S | 101 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | ref |
|
||||
| a,c | 42 N,42 S | depart,arrive | ,101 |
|
||||
| waypoints | route | turns |
|
||||
| a,c | 42 N,42 S (101) | depart,arrive |
|
||||
|
||||
Scenario: Prefix Change
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -50,26 +44,9 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
| waypoints | route | turns |
|
||||
| a,c | West 42,East 42 | depart,arrive |
|
||||
|
||||
Scenario: Prefix Change ref
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | West 42 |
|
||||
| bc | 42 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | West 42,42 | depart,arrive |
|
||||
|
||||
Scenario: Prefix Change and Reference
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
@@ -77,15 +54,13 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
| bc | East 42 | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | ref |
|
||||
| a,c | West 42,East 42 | depart,arrive | 101, |
|
||||
| waypoints | route | turns |
|
||||
| a,c | West 42 (101),East 42 | depart,arrive |
|
||||
|
||||
Scenario: Suffix To Suffix - Turn
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | | b | | c |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -94,15 +69,13 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
| bd | 42 E |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | 42 N,42 S | depart,arrive |
|
||||
| a,d | 42 N,42 E,42 E | depart,continue right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,c | 42 N,42 S | depart,arrive |
|
||||
| a,d | 42 N,42 E,42 E | depart,turn right,arrive |
|
||||
|
||||
Scenario: Suffix To No Suffix
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
@@ -115,9 +88,7 @@ Feature: Suppress New Names on dedicated Suffices
|
||||
|
||||
Scenario: No Suffix To Suffix
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
| a | | b | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
|
||||
@@ -7,10 +7,8 @@ Feature: Suppressed Turns
|
||||
|
||||
Scenario: Do not announce passing a exit ramp
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e
|
||||
f g
|
||||
"""
|
||||
| a | b | c | d | e |
|
||||
| | | | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -23,9 +21,7 @@ Feature: Suppressed Turns
|
||||
|
||||
Scenario: Do not announce reference changes
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e f
|
||||
"""
|
||||
| a | b | c | d | e | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | ref |
|
||||
@@ -36,16 +32,14 @@ Feature: Suppressed Turns
|
||||
| ef | motorway | highway | A1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | ref |
|
||||
| a,f | highway,highway | depart,arrive | A1,A1 |
|
||||
| waypoints | route | turns |
|
||||
| a,f | highway (A1),highway (A1) | depart,arrive |
|
||||
|
||||
|
||||
Scenario: Don't Announce Turn on following major road class -- service
|
||||
Given the node map
|
||||
"""
|
||||
a b d
|
||||
c
|
||||
"""
|
||||
| a | b | d |
|
||||
| | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -58,10 +52,8 @@ Feature: Suppressed Turns
|
||||
|
||||
Scenario: Don't Announce Turn on following major road class -- residential
|
||||
Given the node map
|
||||
"""
|
||||
a b d
|
||||
c
|
||||
"""
|
||||
| a | b | d |
|
||||
| | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
|
||||
@@ -8,40 +8,38 @@ Feature: General Post-Processing related features
|
||||
# this testcase used to crash geometry generation (at that time handled during intersection generation)
|
||||
Scenario: Regression Test 2754
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
f g h i j
|
||||
"""
|
||||
| a | b | c | d | e | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | f | g | h | i | j |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,13 +5,11 @@ Feature: Turn Lane Guidance
|
||||
Given the profile "car"
|
||||
Given a grid size of 20 meters
|
||||
|
||||
@simple
|
||||
@bug
|
||||
Scenario: Basic Turn Lane 3-way Turn with empty lanes
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | | b | | c |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes | turn:lanes:forward | turn:lanes:backward | name |
|
||||
@@ -26,32 +24,11 @@ Feature: Turn Lane Guidance
|
||||
| c,a | straight,in,in | depart,new name straight,arrive | ,left:false straight:true none:true none:true, |
|
||||
| c,d | straight,right,right | depart,turn left,arrive | ,left:true straight:false none:false none:false, |
|
||||
|
||||
Scenario: Basic Turn Lane 3-way Turn with designated lane
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes | turn:lanes:forward | name | vehicle:lanes:forward |
|
||||
| ab | | through\|through\|right | in | yes\|no\|yes |
|
||||
| bc | | | straight | |
|
||||
| bd | | | right | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,c | in,straight,straight | depart,new name straight,arrive | ,straight:true right:false, |
|
||||
| a,d | in,right,right | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@simple
|
||||
Scenario: Basic Turn Lane 4-Way Turn
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes | turn:lanes:forward | turn:lanes:backward | name |
|
||||
@@ -69,14 +46,11 @@ Feature: Turn Lane Guidance
|
||||
| d,e | right,left,left | depart,new name straight,arrive | ,left:false none:true, |
|
||||
| d,c | right,straight,straight | depart,turn right,arrive | ,left:false none:true, |
|
||||
|
||||
@simple @none
|
||||
Scenario: Basic Turn Lane 4-Way Turn using none
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| | | e | | |
|
||||
| a | | b | | c |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes | turn:lanes:forward | turn:lanes:backward | name |
|
||||
@@ -91,14 +65,11 @@ Feature: Turn Lane Guidance
|
||||
| a,d | in,right,right | depart,turn right,arrive | ,none:false right:true, |
|
||||
| a,e | in,left,left | depart,turn left,arrive | ,none:true right:false, |
|
||||
|
||||
@simple @reverse
|
||||
Scenario: Basic Turn Lane 4-Way With U-Turn Lane
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
a 1 b c
|
||||
d
|
||||
"""
|
||||
| | | e | | |
|
||||
| a | 1 | b | | c |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes | turn:lanes:forward | name |
|
||||
@@ -116,14 +87,11 @@ Feature: Turn Lane Guidance
|
||||
|
||||
|
||||
#this next test requires decision on how to announce lanes for going straight if there is no turn
|
||||
@simple @psv @none
|
||||
Scenario: Turn with Bus-Lane
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
|
||||
d
|
||||
"""
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | lanes:psv:forward |
|
||||
@@ -136,55 +104,12 @@ Feature: Turn Lane Guidance
|
||||
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
| a,c | road,road | depart,arrive | , |
|
||||
|
||||
Scenario: Turn with Bus-Lane Left
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
|
||||
a b c f
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | lanes:psv:forward | oneway |
|
||||
| ab | road | left\|through\| | 1 | yes |
|
||||
| bc | road | | | yes |
|
||||
| bd | turn | | | yes |
|
||||
| cf | turn | | | yes |
|
||||
| ce | side | | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,d | road,turn,turn | depart,turn left,arrive | ,left:true straight:false, |
|
||||
| a,c | road,road | depart,arrive | , |
|
||||
|
||||
# This tests whether empty/invalid PSV tags cause osrm-extract to crash
|
||||
Scenario: Turn with Bus-Lane
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | lanes:psv:forward | lanes:psv:backward |
|
||||
| ab | road | through\|right\| | 1 | foo |
|
||||
| bc | road | | | |
|
||||
| bd | turn | | | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,d | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@simple @psv
|
||||
@PROFILE @LANES
|
||||
Scenario: Turn with Bus-Lane but without lanes
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
|
||||
d
|
||||
"""
|
||||
| a | | b | | c |
|
||||
| | | | | |
|
||||
| | | d | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | lanes:psv |
|
||||
@@ -198,17 +123,15 @@ Feature: Turn Lane Guidance
|
||||
| a,c | road,road | depart,arrive |
|
||||
|
||||
#turn lanes are often drawn at the incoming road, even though the actual turn requires crossing the intersection first
|
||||
@todo @collapse @partition-lanes
|
||||
@todo @bug
|
||||
Scenario: Turn Lanes at Segregated Road
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
|
||||
h g f e
|
||||
a b c d
|
||||
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | |
|
||||
| h | | g | f | | e |
|
||||
| a | | b | c | | d |
|
||||
| | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
@@ -245,17 +168,14 @@ Feature: Turn Lane Guidance
|
||||
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, |
|
||||
|
||||
#copy of former case to prevent further regression
|
||||
@collapse @partition-lanes
|
||||
Scenario: Turn Lanes at Segregated Road
|
||||
Given the node map
|
||||
"""
|
||||
i l
|
||||
|
||||
h g f e
|
||||
a b c d
|
||||
|
||||
j k
|
||||
"""
|
||||
| | | i | l | | |
|
||||
| | | | | | |
|
||||
| h | | g | f | | e |
|
||||
| a | | b | c | | d |
|
||||
| | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
@@ -281,15 +201,12 @@ Feature: Turn Lane Guidance
|
||||
| i,j | cross,cross | depart,arrive | , |
|
||||
| i,l | cross,cross,cross | depart,continue uturn,arrive | ,left:true straight:false, |
|
||||
|
||||
@partition-lanes
|
||||
Scenario: Turn Lanes at Segregated Road
|
||||
Given the node map
|
||||
"""
|
||||
g f
|
||||
a b c d
|
||||
|
||||
j k
|
||||
"""
|
||||
| | | g | f | | |
|
||||
| a | | b | c | | d |
|
||||
| | | | | | |
|
||||
| | | j | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
@@ -306,14 +223,11 @@ Feature: Turn Lane Guidance
|
||||
| a,j | road,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
#this can happen due to traffic lights / lanes not drawn up to the intersection itself
|
||||
@2654 @previous-lanes
|
||||
Scenario: Turn Lanes Given earlier than actual turn
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
|
||||
e
|
||||
"""
|
||||
| a | | b | c | | d |
|
||||
| | | | | | |
|
||||
| | | | e | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward |
|
||||
@@ -327,13 +241,10 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,turn,turn | depart,turn right,arrive | ,none:false right:true, |
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
|
||||
@2654 @previous-lanes
|
||||
Scenario: Turn Lanes Given earlier than actual turn
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e f g h i
|
||||
j k
|
||||
"""
|
||||
| a | | b | c | d | | e | | f | g | h | | i |
|
||||
| | | j | | | | | | | | k | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | turn:lanes:backward |
|
||||
@@ -352,13 +263,10 @@ Feature: Turn Lane Guidance
|
||||
| i,j | road,first-turn,first-turn | depart,turn left,arrive | ,left:true none:false, |
|
||||
| i,a | road,road | depart,arrive | , |
|
||||
|
||||
@previous-lanes
|
||||
Scenario: Passing a one-way street
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
a b c d
|
||||
"""
|
||||
| e | | | f | |
|
||||
| a | | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
@@ -371,14 +279,11 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true straight:false, |
|
||||
|
||||
@partition-lanes
|
||||
Scenario: Passing a one-way street, partly pulled back lanes
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
a b c d
|
||||
g
|
||||
"""
|
||||
| e | | | f | |
|
||||
| a | | b | c | d |
|
||||
| | | g | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
@@ -391,17 +296,13 @@ Feature: Turn Lane Guidance
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true straight;right:false, |
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
| a,g | road,right,right | depart,turn right,arrive | ,left:false straight;right:true, |
|
||||
|
||||
@partition-lanes @previous-lanes
|
||||
Scenario: Passing a one-way street, partly pulled back lanes, no through
|
||||
Given the node map
|
||||
"""
|
||||
e f
|
||||
a b c
|
||||
g
|
||||
"""
|
||||
| e | | | f |
|
||||
| a | | b | c |
|
||||
| | | g | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
@@ -416,15 +317,13 @@ Feature: Turn Lane Guidance
|
||||
| a,f | road,turn,turn | depart,turn left,arrive | ,left:true right:false, |
|
||||
| a,g | road,right,right | depart,turn right,arrive | ,left:false right:true, |
|
||||
|
||||
@todo @partition-lanes @previous-lanes
|
||||
@todo @bug
|
||||
Scenario: Narrowing Turn Lanes
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
a b c d e
|
||||
f
|
||||
"""
|
||||
| | | | | g | |
|
||||
| | | | | | |
|
||||
| a | | b | c | d | e |
|
||||
| | | | f | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward |
|
||||
@@ -441,13 +340,10 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,through,through | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | road,right,right | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
|
||||
@previous-lanes
|
||||
Scenario: Turn at a traffic light
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
e
|
||||
"""
|
||||
| a | b | c | d |
|
||||
| | | e | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
@@ -465,22 +361,20 @@ Feature: Turn Lane Guidance
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
| a,e | road,turn,turn | depart,turn right,arrive | ,straight:false right:true, |
|
||||
|
||||
@todo @roundabout
|
||||
@bug @todo
|
||||
Scenario: Theodor Heuss Platz
|
||||
Given the node map
|
||||
"""
|
||||
i o l
|
||||
b a m
|
||||
c
|
||||
h
|
||||
|
||||
j
|
||||
g
|
||||
|
||||
d
|
||||
e f
|
||||
k n
|
||||
"""
|
||||
| | | | i | o | | | l | |
|
||||
| | | b | | | | a | | m |
|
||||
| | c | | | | | | | |
|
||||
| | | | | | | | h | |
|
||||
| | | | | | | | | |
|
||||
| j | | | | | | | | |
|
||||
| | | | | | | | g | |
|
||||
| | | | | | | | | |
|
||||
| | d | | | | | | | |
|
||||
| | | e | | | | f | | |
|
||||
| | | | | k | | | | n |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
@@ -504,49 +398,40 @@ Feature: Turn Lane Guidance
|
||||
| i,l | top,top-right-out,top-right-out | depart,roundabout-exit-4,arrive | ,slight left:true slight left;slight right:true slight right:false slight right:false, |
|
||||
| i,o | top,top,top | depart,roundabout-exit-5,arrive | ,, |
|
||||
|
||||
@sliproads
|
||||
Scenario: Turn Lanes Breaking up
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
c
|
||||
a b d e
|
||||
|
||||
f
|
||||
"""
|
||||
| | | | g | |
|
||||
| | | | | |
|
||||
| | | | c | |
|
||||
| a | b | | d | e |
|
||||
| | | | | |
|
||||
| | | | f | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
| ab | road | left\|left\|through\|through\|right | yes | primary |
|
||||
| bd | road | through\|through\|right | yes | primary |
|
||||
| bc | road | left\|left | yes | primary |
|
||||
| de | road | | yes | primary |
|
||||
| fd | cross | | | secondary |
|
||||
| dc | cross | | | secondary |
|
||||
| cg | cross | | | secondary |
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
| ab | road | left\|left\|through\|through | yes | primary |
|
||||
| bd | road | through\|through | yes | primary |
|
||||
| bc | road | left\|left | yes | primary |
|
||||
| de | road | | yes | primary |
|
||||
| fdcg | cross | | | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
| restriction | bd | fdcg | d | no_left_turn |
|
||||
| restriction | bc | fdcg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive | ,left:true left:true straight:false straight:false right:false, |
|
||||
| a,e | road,road | depart,arrive | , |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive | ,left:true left:true straight:false straight:false, |
|
||||
| a,e | road,road | depart,arrive | , |
|
||||
|
||||
#NEEDS TO BE INVESTIGATED. Turn restriction shouldn't be here. See #2867
|
||||
@reverse @previous-lanes
|
||||
Scenario: U-Turn Road at Intersection
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
f e j
|
||||
a b
|
||||
c d i
|
||||
g
|
||||
"""
|
||||
| | | | | | h | |
|
||||
| | | | | f | e | j |
|
||||
| a | b | | | | | |
|
||||
| | | | | c | d | i |
|
||||
| | | | | | g | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
@@ -555,36 +440,25 @@ Feature: Turn Lane Guidance
|
||||
| bc | road | \|through\|right | yes | primary |
|
||||
| cd | road | \|through\|right | yes | primary |
|
||||
| fc | road | | no | tertiary |
|
||||
| je | road | | yes | primary |
|
||||
| ef | road | | yes | primary |
|
||||
| fb | road | | yes | primary |
|
||||
| eh | cross | | no | primary |
|
||||
| de | cross | | no | primary |
|
||||
| gd | cross | | no | primary |
|
||||
| jefb | road | | yes | primary |
|
||||
| gdeh | cross | | no | primary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| 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 |
|
||||
| a | g | 180,180 180,180 | road,cross,cross | depart,turn right,arrive | ,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 | i | 180,180 180,180 | road,road | depart,arrive | , |
|
||||
| b | a | 90,2 270,2 | road,road,road | depart,continue uturn,arrive | ,none:true straight:false right:false, |
|
||||
|
||||
@reverse
|
||||
Scenario: Segregated Intersection Merges With Lanes
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
|
||||
e d
|
||||
c g
|
||||
a b
|
||||
|
||||
h
|
||||
"""
|
||||
| | | | | | | f |
|
||||
| | | | | | | |
|
||||
| e | | | d | | | |
|
||||
| | | | | | c | g |
|
||||
| a | | | b | | | |
|
||||
| | | | | | | |
|
||||
| | | | | | h | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway |
|
||||
@@ -600,18 +474,16 @@ Feature: Turn Lane Guidance
|
||||
| a,e | road,road,road | depart,turn uturn,arrive | ,left:true left:false left:false straight:false straight:false, |
|
||||
| a,g | road,straight,straight | depart,new name straight,arrive | ,left:false left:false left:false straight:true straight:true, |
|
||||
|
||||
@todo @roundabout
|
||||
@bug @todo
|
||||
Scenario: Passing Through a Roundabout
|
||||
Given the node map
|
||||
"""
|
||||
h g
|
||||
a f k
|
||||
i
|
||||
|
||||
b e
|
||||
c d
|
||||
j
|
||||
"""
|
||||
| | | h | | g | | |
|
||||
| | a | | | | f | k |
|
||||
| i | | | | | | |
|
||||
| | | | | | | |
|
||||
| | b | | | | e | |
|
||||
| | | c | | d | | |
|
||||
| | | | | j | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway | junction |
|
||||
@@ -629,13 +501,10 @@ Feature: Turn Lane Guidance
|
||||
| i,j | left,bottom,bottom | depart,round-exit-1,arrive | ,0, |
|
||||
| i,k | left,right,right | depart,round-exit-2,arrive | ,1, |
|
||||
|
||||
@previous-lanes
|
||||
Scenario: Crossing Traffic Light
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
e
|
||||
"""
|
||||
| a | | b | | c | | d |
|
||||
| | | | | | | e |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
@@ -652,13 +521,10 @@ Feature: Turn Lane Guidance
|
||||
| a,d | road,road | depart,arrive | , |
|
||||
| a,e | road,cross,cross | depart,turn slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
||||
|
||||
@ramp
|
||||
Scenario: Highway Ramp
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
e
|
||||
"""
|
||||
| a | | b | | c | | d |
|
||||
| | | | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | highway |
|
||||
@@ -671,15 +537,13 @@ Feature: Turn Lane Guidance
|
||||
| a,d | hwy,hwy | depart,arrive | , |
|
||||
| a,e | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false straight;slight right:true slight right:true, |
|
||||
|
||||
@todo
|
||||
@bug @todo
|
||||
Scenario: Turning Off Ramp
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d c b
|
||||
e f g
|
||||
h
|
||||
"""
|
||||
| | a | |
|
||||
| d | c | b |
|
||||
| e | f | g |
|
||||
| | h | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | highway | oneway |
|
||||
@@ -695,15 +559,12 @@ Feature: Turn Lane Guidance
|
||||
| a,g | off,road,road | depart,turn_left,arrive | ,left:true right:false, |
|
||||
| a,h | | | |
|
||||
|
||||
@ramp
|
||||
Scenario: Off Ramp In a Turn
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
||||
b c
|
||||
d
|
||||
"""
|
||||
| a | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | |
|
||||
| | | | | | b | | | | | | c |
|
||||
| | | | | | | | | | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | highway | oneway |
|
||||
@@ -716,15 +577,12 @@ Feature: Turn Lane Guidance
|
||||
| a,c | hwy,hwy | depart,arrive | , |
|
||||
| a,d | hwy,ramp,ramp | depart,off ramp slight right,arrive | ,straight:false straight:false slight right:true, |
|
||||
|
||||
@reverse
|
||||
Scenario: Reverse Lane in Segregated Road
|
||||
Given the node map
|
||||
"""
|
||||
h g f
|
||||
e
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| h | | | | | g | | | | | | f |
|
||||
| | | | | | | | e | | | | |
|
||||
| | | | | | | | d | | | | |
|
||||
| a | | | | | b | | | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | highway | oneway |
|
||||
@@ -737,15 +595,12 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false straight:false,|
|
||||
|
||||
@reverse
|
||||
Scenario: Reverse Lane in Segregated Road with none
|
||||
Given the node map
|
||||
"""
|
||||
h g f
|
||||
e
|
||||
d
|
||||
a b c
|
||||
"""
|
||||
| h | | | | | g | | | | | | f |
|
||||
| | | | | | | | e | | | | |
|
||||
| | | | | | | | d | | | | |
|
||||
| a | | | | | b | | | | | | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | highway | oneway |
|
||||
@@ -758,16 +613,13 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false, |
|
||||
|
||||
@reverse
|
||||
Scenario: Reverse Lane in Segregated Road with none, Service Turn Prior
|
||||
Given the node map
|
||||
"""
|
||||
h g f
|
||||
e
|
||||
d
|
||||
a j b c
|
||||
i
|
||||
"""
|
||||
| h | | | | | g | | | | | | f |
|
||||
| | | | | | | | e | | | | |
|
||||
| | | | | | | | d | | | | |
|
||||
| a | | j | | | b | | | | | | c |
|
||||
| | | i | | | | | | | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | highway | oneway |
|
||||
@@ -781,14 +633,11 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,h | road,road,road | depart,continue uturn,arrive | ,uturn:true straight:false none:false, |
|
||||
|
||||
@simple
|
||||
Scenario: Don't collapse everything to u-turn / too wide
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
|
||||
d c f
|
||||
"""
|
||||
| a | | b | | e |
|
||||
| | | | | |
|
||||
| d | | c | | f |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | turn:lanes:forward |
|
||||
@@ -803,13 +652,10 @@ Feature: Turn Lane Guidance
|
||||
| a,d | depart,continue right,turn 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,, |
|
||||
|
||||
@simple
|
||||
Scenario: Merge Lanes Onto Freeway
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
"""
|
||||
| a | | | b | c |
|
||||
| | d | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | turn:lanes:forward |
|
||||
@@ -820,13 +666,10 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | turns | route | lanes |
|
||||
| d,c | depart,merge slight left,arrive | ramp,Hwy,Hwy | ,slight right:true slight right:true, |
|
||||
|
||||
@2654 @simple
|
||||
Scenario: Fork on motorway links - don't fork on through but use lane
|
||||
Given the node map
|
||||
"""
|
||||
i a
|
||||
j c b x
|
||||
"""
|
||||
| i | | | | | a |
|
||||
| j | | c | b | | x |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | turn:lanes:forward |
|
||||
@@ -837,20 +680,18 @@ Feature: Turn Lane Guidance
|
||||
| ab | on | motorway_link | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,j | on,xbcj | depart,arrive | , |
|
||||
| a,i | on,off,off | depart,turn slight right,arrive | ,none:false slight right:true, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,j | on,xbcj,xbcj | depart,merge slight left,arrive | ,, |
|
||||
| a,i | on,xbcj,off,off | depart,merge slight left,turn slight right,arrive | ,,none:false slight right:true, |
|
||||
|
||||
#http://www.openstreetmap.org/#map=17/52.47414/13.35712
|
||||
@todo @ramp @2645
|
||||
Scenario: Kreuz Schoeneberg - Continue on ramp, don't merge
|
||||
Given the node map
|
||||
"""
|
||||
i j
|
||||
k
|
||||
h g l f e
|
||||
d c b a
|
||||
"""
|
||||
| i | | | | | j | | | | | | | | | | | |
|
||||
| | | | | k | | | | | | | | | | | | |
|
||||
| h | g | | l | | | f | | | | | | | | | | e |
|
||||
| d | | | | | | | | c | | | | | b | | | a |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway | lanes | turn:lanes |
|
||||
@@ -878,15 +719,13 @@ Feature: Turn Lane Guidance
|
||||
@collapse @use-lane
|
||||
Scenario: Collapse Multiple Use Lanes
|
||||
Given the node map
|
||||
"""
|
||||
x a b c d
|
||||
e f
|
||||
"""
|
||||
| x | a | | b | | | c | | | d |
|
||||
| | | | e | | | f | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | turn:lanes:forward |
|
||||
| ab | road | primary | through;right |
|
||||
| bc | road | primary | through;right |
|
||||
| ab | road | primary | through,right |
|
||||
| bc | road | primary | through,right |
|
||||
| cd | road | primary | |
|
||||
| xa | road | primary | |
|
||||
| be | turn | primary | |
|
||||
@@ -896,60 +735,12 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| x,d | road,road | depart,arrive | , |
|
||||
|
||||
@partition-lanes
|
||||
Scenario: Partitioned turn, Slight Curve - maxspeed
|
||||
Given the node map
|
||||
"""
|
||||
f e
|
||||
| |
|
||||
| |
|
||||
| c
|
||||
a - b ' |
|
||||
g d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward | maxspeed |
|
||||
| ab | road | primary | yes | left\|right | 1 |
|
||||
| bc | cross | primary | yes | | 1 |
|
||||
| fbg | cross | primary | yes | | 1 |
|
||||
| dce | cross | primary | yes | | 1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
|
||||
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
|
||||
|
||||
Scenario: Partitioned turn, Slight Curve
|
||||
Given the node map
|
||||
"""
|
||||
f e
|
||||
| |
|
||||
| |
|
||||
| c
|
||||
a - b ' |
|
||||
g d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| ab | road | primary | yes | left\|right |
|
||||
| bc | cross | primary | yes | |
|
||||
| fbg | cross | primary | yes | |
|
||||
| dce | cross | primary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
|
||||
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
|
||||
|
||||
Scenario: Lane Parsing Issue #2694
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b
|
||||
d
|
||||
"""
|
||||
| | c |
|
||||
| a | b |
|
||||
| | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | turn:lanes:forward |
|
||||
@@ -962,17 +753,15 @@ Feature: Turn Lane Guidance
|
||||
| a,c | ab,bc,bc | depart,turn left,arrive | ,left:true right:false, |
|
||||
|
||||
# http://www.openstreetmap.org/#map=19/47.97685/7.82933&layers=D
|
||||
@todo
|
||||
@bug @todo
|
||||
Scenario: Lane Parsing Issue #2706: None Assignments I
|
||||
Given the node map
|
||||
"""
|
||||
f j
|
||||
|
||||
a b c d e
|
||||
|
||||
i
|
||||
g h
|
||||
"""
|
||||
| | f | | | j | |
|
||||
| | | | | | |
|
||||
| a | b | c | | d | e |
|
||||
| | | | | | |
|
||||
| | | | | i | |
|
||||
| | g | | | h | |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
@@ -1004,15 +793,13 @@ Feature: Turn Lane Guidance
|
||||
# Note: at the moment we don't care about routes, we care about the extract process triggering assertions
|
||||
|
||||
# https://www.openstreetmap.org/#map=19/47.99257/7.83276&layers=D
|
||||
@todo
|
||||
@bug @todo
|
||||
Scenario: Lane Parsing Issue #2706: None Assignments II
|
||||
Given the node map
|
||||
"""
|
||||
k l
|
||||
j a b f
|
||||
i c d e
|
||||
h g
|
||||
"""
|
||||
| | k | l | |
|
||||
| j | a | b | f |
|
||||
| i | c | d | e |
|
||||
| | h | g | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway | turn:lanes |
|
||||
@@ -1041,15 +828,13 @@ Feature: Turn Lane Guidance
|
||||
| i,e ||||
|
||||
# Note: at the moment we don't care about routes, we care about the extract process triggering assertions
|
||||
|
||||
@todo
|
||||
@bug @todo
|
||||
Scenario: Lane Parsing Issue #2706: None Assignments III - Minimal reproduction recipe
|
||||
Given the node map
|
||||
"""
|
||||
l
|
||||
a b
|
||||
d
|
||||
|
||||
"""
|
||||
| | | l | |
|
||||
| | a | b | |
|
||||
| | | d | |
|
||||
| | | | |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway | turn:lanes |
|
||||
@@ -1061,79 +846,3 @@ Feature: Turn Lane Guidance
|
||||
| waypoints | route | turns | lanes |
|
||||
| d,a ||||
|
||||
# Note: at the moment we don't care about routes, we care about the extract process triggering assertions
|
||||
|
||||
@reverse @2730 @todo
|
||||
Scenario: Reverse on the right
|
||||
Given the node map
|
||||
"""
|
||||
a c
|
||||
b d
|
||||
f e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | turn:lanes:forward | oneway |
|
||||
| ab | primary | in | left\|through\|right;reverse | yes |
|
||||
| bc | primary | left | | no |
|
||||
| bd | primary | through | | no |
|
||||
| be | primary | right | | no |
|
||||
| bf | primary | in | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,c | in,left,left | depart,turn left,arrive | ,left:true straight:false right;uturn:false, |
|
||||
| a,d | in,through,through | depart,new name straight,arrive | ,left:false straight:true right;uturn:false, |
|
||||
| a,e | in,right,right | depart,turn right,arrive | ,left:false straight:false right;uturn:true, |
|
||||
|
||||
@todo @2654
|
||||
#https://github.com/Project-OSRM/osrm-backend/issues/2645
|
||||
#http://www.openstreetmap.org/export#map=19/52.56054/13.32152
|
||||
Scenario: Kurt-Schuhmacher-Damm
|
||||
Given the node map
|
||||
"""
|
||||
g f
|
||||
|
||||
j h e
|
||||
|
||||
a b c
|
||||
i d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes |
|
||||
| ab | | motorway_link | yes | left\|none\|right |
|
||||
| bc | | primary_link | yes | |
|
||||
| cd | ksd | secondary | yes | |
|
||||
| cef | ksd | primary | yes | |
|
||||
| hj | | motorway_link | yes | |
|
||||
| eh | | secondary_link | yes | |
|
||||
| gh | ksd | primary | yes | |
|
||||
| hbi | ksd | secondary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | ,ksd,ksd | depart,turn left,arrive | ,left:true none:true right:false, |
|
||||
| a,i | ,ksd,ksd | depart,turn right,arrive | ,left:false none:true right:true, |
|
||||
|
||||
Scenario: Reverse Not Allowed
|
||||
Given the node map
|
||||
"""
|
||||
n o
|
||||
f - - e\- - g-j-m
|
||||
d | |
|
||||
a - 1 b/- - c-i-l
|
||||
h k
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | highway | oneway | turn:lanes:forward |
|
||||
| abc | road | secondary | yes | left\|through\|right |
|
||||
| cil | road | secondary | yes | |
|
||||
| mjgef | road | secondary | yes | |
|
||||
| bde | road | secondary_link | yes | |
|
||||
| ngch | turn | secondary | yes | |
|
||||
| kijo | turn | secondary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | turns |
|
||||
| 1,a | 90,2 180,180 | | |
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
@routing @guidance
|
||||
Feature: Turn Location Feature
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Simple feature to test turn locations
|
||||
Given the node map
|
||||
"""
|
||||
c
|
||||
a b d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| cb | primary |
|
||||
| db | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive | a,b,c |
|
||||
+186
-682
File diff suppressed because it is too large
Load Diff
@@ -1,31 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const crypto = require('crypto');
|
||||
const d3 = require('d3-queue');
|
||||
|
||||
module.exports = {
|
||||
hashOfFiles: (paths, cb) => {
|
||||
let queue = d3.queue();
|
||||
for (let i = 0; i < paths.length; ++i) {
|
||||
queue.defer(fs.readFile, paths[i]);
|
||||
}
|
||||
queue.awaitAll((err, results) => {
|
||||
if (err) return cb(err);
|
||||
let checksum = crypto.createHash('md5');
|
||||
for (let i = 0; i < results.length; ++i) {
|
||||
checksum.update(results[i]);
|
||||
}
|
||||
cb(null, checksum.digest('hex'));
|
||||
});
|
||||
},
|
||||
|
||||
hashOfFile: (path, cb) => {
|
||||
fs.readFile(path, (err, result) => {
|
||||
if (err) return cb(err);
|
||||
let checksum = crypto.createHash('md5');
|
||||
checksum.update(result);
|
||||
cb(null, checksum.digest('hex'));
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,169 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const util = require('util');
|
||||
const Timeout = require('node-timeout');
|
||||
const tryConnect = require('../lib/try_connect');
|
||||
const errorReason = require('./utils').errorReason;
|
||||
|
||||
class OSRMBaseLoader{
|
||||
constructor (scope) {
|
||||
this.scope = scope;
|
||||
this.child = null;
|
||||
}
|
||||
|
||||
launch (callback) {
|
||||
var limit = Timeout(this.scope.TIMEOUT, { err: new Error('*** Launching osrm-routed timed out.') });
|
||||
|
||||
var runLaunch = (cb) => {
|
||||
this.osrmUp(() => { this.waitForConnection(cb); });
|
||||
};
|
||||
|
||||
runLaunch(limit((e) => { if (e) callback(e); else callback(); }));
|
||||
}
|
||||
|
||||
shutdown (callback) {
|
||||
if (!this.osrmIsRunning()) return callback();
|
||||
|
||||
var limit = Timeout(this.scope.TIMEOUT, { err: new Error('*** Shutting down osrm-routed timed out.')});
|
||||
|
||||
this.osrmDown(limit(callback));
|
||||
}
|
||||
|
||||
osrmIsRunning () {
|
||||
return this.child && !this.child.killed;
|
||||
}
|
||||
|
||||
osrmDown (callback) {
|
||||
if (this.osrmIsRunning()) {
|
||||
this.child.on('exit', (code, signal) => {callback();});
|
||||
this.child.kill();
|
||||
} else callback();
|
||||
}
|
||||
|
||||
waitForConnection (callback) {
|
||||
var retryCount = 0;
|
||||
let retry = (err) => {
|
||||
if (err) {
|
||||
if (retryCount < 10) {
|
||||
retryCount++;
|
||||
setTimeout(() => { tryConnect(this.scope.OSRM_PORT, retry); }, 10);
|
||||
} else {
|
||||
callback(new Error("Could not connect to osrm-routed after ten retries."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
tryConnect(this.scope.OSRM_PORT, retry);
|
||||
}
|
||||
};
|
||||
|
||||
class OSRMDirectLoader extends OSRMBaseLoader {
|
||||
constructor (scope) {
|
||||
super(scope);
|
||||
}
|
||||
|
||||
load (inputFile, callback) {
|
||||
this.inputFile = inputFile;
|
||||
this.shutdown(() => {
|
||||
this.launch(callback);
|
||||
});
|
||||
}
|
||||
|
||||
osrmUp (callback) {
|
||||
if (this.osrmIsRunning()) return callback(new Error("osrm-routed already running!"));
|
||||
|
||||
this.child = this.scope.runBin('osrm-routed', util.format("%s -p %d", this.inputFile, this.scope.OSRM_PORT), this.scope.environment, (err) => {
|
||||
if (err) {
|
||||
throw new Error(util.format('osrm-routed %s: %s', errorReason(err), err.cmd));
|
||||
}
|
||||
});
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
class OSRMDatastoreLoader extends OSRMBaseLoader {
|
||||
constructor (scope) {
|
||||
super(scope);
|
||||
}
|
||||
|
||||
load (inputFile, callback) {
|
||||
this.inputFile = inputFile;
|
||||
|
||||
this.loadData((err) => {
|
||||
if (err) return callback(err);
|
||||
if (!this.osrmIsRunning()) this.launch(callback);
|
||||
else {
|
||||
this.scope.setupOutputLog(this.child, fs.createWriteStream(this.scope.scenarioLogFile, {'flags': 'a'}));
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
loadData (callback) {
|
||||
this.scope.runBin('osrm-datastore', this.inputFile, this.scope.environment, (err) => {
|
||||
if (err) return callback(new Error('*** osrm-datastore exited with ' + err.code + ': ' + err));
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
osrmUp (callback) {
|
||||
if (this.osrmIsRunning()) return callback();
|
||||
|
||||
this.child = this.scope.runBin('osrm-routed', util.format('--shared-memory=1 -p %d', this.scope.OSRM_PORT), this.scope.environment, (err) => {
|
||||
if (err) {
|
||||
throw new Error(util.format('osrm-routed %s: %s', errorReason(err), err.cmd));
|
||||
}
|
||||
});
|
||||
|
||||
// we call the callback here, becuase we don't want to wait for the child process to finish
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
class OSRMLoader {
|
||||
constructor (scope) {
|
||||
this.scope = scope;
|
||||
this.sharedLoader = new OSRMDatastoreLoader(this.scope);
|
||||
this.directLoader = new OSRMDirectLoader(this.scope);
|
||||
this.method = scope.DEFAULT_LOAD_METHOD;
|
||||
}
|
||||
|
||||
load (inputFile, callback) {
|
||||
if (this.method === 'datastore') {
|
||||
this.directLoader.shutdown((err) => {
|
||||
if (err) return callback(err);
|
||||
this.loader = this.sharedLoader;
|
||||
this.sharedLoader.load(inputFile, callback);
|
||||
});
|
||||
} else if (this.method === 'directly') {
|
||||
this.sharedLoader.shutdown((err) => {
|
||||
if (err) return callback(err);
|
||||
this.loader = this.directLoader;
|
||||
this.directLoader.load(inputFile, callback);
|
||||
});
|
||||
} else {
|
||||
callback(new Error('*** Unknown load method ' + method));
|
||||
}
|
||||
}
|
||||
|
||||
setLoadMethod (method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
shutdown (callback) {
|
||||
if (!this.loader) return callback();
|
||||
|
||||
this.loader.shutdown(callback);
|
||||
}
|
||||
|
||||
up () {
|
||||
return this.loader ? this.loader.osrmIsRunning() : false;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = OSRMLoader;
|
||||
@@ -1,54 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var util = require('util');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var chalk = require('chalk');
|
||||
|
||||
var unescapeStr = (str) => str.replace(/\\\|/g, '\|').replace(/\\\\/g, '\\');
|
||||
|
||||
module.exports = function (expected, actual) {
|
||||
let headers = expected.raw()[0];
|
||||
let expected_keys = expected.hashes();
|
||||
let diff = [];
|
||||
let hasErrors = false;
|
||||
|
||||
var good = 0, bad = 0;
|
||||
|
||||
expected_keys.forEach((row, i) => {
|
||||
var rowError = false;
|
||||
|
||||
for (var j in row) {
|
||||
if (unescapeStr(row[j]) != actual[i][j]) {
|
||||
rowError = true;
|
||||
hasErrors = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (rowError) {
|
||||
bad++;
|
||||
diff.push(Object.assign({}, row, {c_status: 'undefined'}));
|
||||
diff.push(Object.assign({}, actual[i], {c_status: 'comment'}));
|
||||
} else {
|
||||
good++;
|
||||
diff.push(row);
|
||||
}
|
||||
});
|
||||
|
||||
if (!hasErrors) return null;
|
||||
|
||||
var s = ['Tables were not identical:'];
|
||||
s.push(headers.map(key => ' ' + key).join(' | '));
|
||||
diff.forEach((row) => {
|
||||
var rowString = '| ';
|
||||
headers.forEach((header) => {
|
||||
if (!row.c_status) rowString += chalk.green(' ' + row[header] + ' | ');
|
||||
else if (row.c_status === 'undefined') rowString += chalk.yellow('(-) ' + row[header] + ' | ');
|
||||
else rowString += chalk.red('(+) ' + row[header] + ' | ');
|
||||
});
|
||||
s.push(rowString);
|
||||
});
|
||||
|
||||
return s.join('\n') + '\nTODO this is a temp workaround waiting for https://github.com/cucumber/cucumber-js/issues/534';
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const net = require('net');
|
||||
const Timeout = require('node-timeout');
|
||||
|
||||
module.exports = function tryConnect(port, callback) {
|
||||
net.connect({ port: port, host: '127.0.0.1' })
|
||||
.on('connect', () => { callback(); })
|
||||
.on('error', () => {
|
||||
callback(new Error('Could not connect.'));
|
||||
});
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user