Merge branch 'master' of github.com:Project-OSRM/osrm-backend into prometheus
This commit is contained in:
commit
e51f87abc4
85
.github/workflows/osrm-backend-docker.yml
vendored
Normal file
85
.github/workflows/osrm-backend-docker.yml
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
name: build and publish container image
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
|
||||
- name: Docker meta - debug
|
||||
id: metadebug
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
flavor: |
|
||||
latest=true
|
||||
suffix=-debug,onlatest=true
|
||||
|
||||
- name: Docker meta - assertions
|
||||
id: metaassertions
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
flavor: |
|
||||
latest=true
|
||||
suffix=-assertions,onlatest=true
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Log in to GitHub Docker Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Build container image - debug
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
file: ./docker/Dockerfile
|
||||
tags: ${{ steps.metadebug.outputs.tags }}
|
||||
build-args: |
|
||||
DOCKER_TAG=${{ join(steps.metadebug.outputs.tags ) }}
|
||||
|
||||
|
||||
- name: Build container image - assertions
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
file: ./docker/Dockerfile
|
||||
tags: ${{ steps.metaassertions.outputs.tags }}
|
||||
build-args: |
|
||||
DOCKER_TAG=${{ join(steps.metaassertions.outputs.tags ) }}
|
||||
|
||||
# build and publish "normal" image as last to get it listed on top
|
||||
- name: Build container image - normal
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
file: ./docker/Dockerfile
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
build-args: |
|
||||
DOCKER_TAG=${{ join(steps.meta.outputs.tags ) }}
|
||||
|
||||
|
||||
|
||||
589
.github/workflows/osrm-backend.yml
vendored
Normal file
589
.github/workflows/osrm-backend.yml
vendored
Normal file
@ -0,0 +1,589 @@
|
||||
name: osrm-backend CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v[1-9]+.[0-9]+.[0-9]+
|
||||
- v[1-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+
|
||||
- v[1-9]+.[0-9]+-[0-9a-zA-Z]+
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
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
|
||||
CCACHE_VERSION: 3.3.1
|
||||
CMAKE_VERSION: 3.7.2
|
||||
ENABLE_NODE_BINDINGS: "ON"
|
||||
|
||||
jobs:
|
||||
format-taginfo-docs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Enable Node.js cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Prepare environment
|
||||
run: |
|
||||
npm ci --ignore-scripts
|
||||
export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
|
||||
${MASON} install clang-format 10.0.0
|
||||
echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
|
||||
- name: Run checks
|
||||
run: |
|
||||
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||
./scripts/format.sh && ./scripts/error_on_dirty.sh
|
||||
node ./scripts/validate_changelog.js
|
||||
# See issue 4043
|
||||
#- npm run docs && ./scripts/error_on_dirty.sh
|
||||
|
||||
build-test-publish:
|
||||
needs: format-taginfo-docs
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: gcc-9-debug-cov
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: gcc-9
|
||||
CUCUMBER_TIMEOUT: 20000
|
||||
CXXCOMPILER: g++-9
|
||||
ENABLE_COVERAGE: ON
|
||||
|
||||
- name: gcc-9-debug-asan
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Debug
|
||||
CCOMPILER: gcc-9
|
||||
CUCUMBER_TIMEOUT: 20000
|
||||
CXXCOMPILER: g++-9
|
||||
ENABLE_SANITIZER: ON
|
||||
TARGET_ARCH: x86_64-asan
|
||||
|
||||
- name: clang-5.0-debug
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Debug
|
||||
CLANG_VERSION: 5.0.0
|
||||
CUCUMBER_TIMEOUT: 60000
|
||||
|
||||
- name: mason-linux-debug-asan
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_MASON: ON
|
||||
ENABLE_SANITIZER: ON
|
||||
|
||||
- name: mason-linux-release
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_MASON: ON
|
||||
|
||||
- name: gcc-11-release
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: gcc-11
|
||||
CXXCOMPILER: g++-11
|
||||
|
||||
- name: gcc-10-release
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: gcc-10
|
||||
CXXCOMPILER: g++-10
|
||||
|
||||
- name: gcc-9-release
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: gcc-9
|
||||
CXXCOMPILER: g++-9
|
||||
CXXFLAGS: -Wno-cast-function-type
|
||||
|
||||
- name: gcc-9-release-i686
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: gcc-9
|
||||
CFLAGS: "-m32 -msse2 -mfpmath=sse"
|
||||
CXXCOMPILER: g++-9
|
||||
CXXFLAGS: "-m32 -msse2 -mfpmath=sse"
|
||||
TARGET_ARCH: i686
|
||||
|
||||
- name: gcc-8-release
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: gcc-8
|
||||
CXXCOMPILER: g++-8
|
||||
CXXFLAGS: -Wno-cast-function-type
|
||||
|
||||
- name: gcc-7-release
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: gcc-7
|
||||
CXXCOMPILER: g++-7
|
||||
|
||||
- name: mason-osx-release-node-12
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: macos-10.15
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang
|
||||
CXXCOMPILER: clang++
|
||||
CUCUMBER_TIMEOUT: 60000
|
||||
ENABLE_ASSERTIONS: ON
|
||||
ENABLE_MASON: ON
|
||||
|
||||
- name: mason-osx-release-node-14
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 14
|
||||
runs-on: macos-10.15
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang
|
||||
CXXCOMPILER: clang++
|
||||
CUCUMBER_TIMEOUT: 60000
|
||||
ENABLE_ASSERTIONS: ON
|
||||
ENABLE_MASON: ON
|
||||
|
||||
- name: mason-osx-release-node-16
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 16
|
||||
runs-on: macos-10.15
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang
|
||||
CXXCOMPILER: clang++
|
||||
CUCUMBER_TIMEOUT: 60000
|
||||
ENABLE_ASSERTIONS: ON
|
||||
ENABLE_MASON: ON
|
||||
|
||||
- name: gcc-7-release-shared
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TOOLS: ON
|
||||
BUILD_TYPE: Release
|
||||
BUILD_SHARED_LIBS: ON
|
||||
CCOMPILER: gcc-7
|
||||
CXXCOMPILER: g++-7
|
||||
|
||||
- name: node-12-mason-linux-release
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: node-12-mason-linux-debug
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 12
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Debug
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: node-14-mason-linux-release
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 14
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: node-14-mason-linux-debug
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 14
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Debug
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
|
||||
- name: node-16-mason-linux-release
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 16
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: node-16-mason-linux-debug
|
||||
build_node_package: true
|
||||
continue-on-error: false
|
||||
node: 16
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Debug
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: mason-osx-release-node-latest
|
||||
build_node_package: true
|
||||
continue-on-error: true
|
||||
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
|
||||
node: 16
|
||||
runs-on: macos-10.15
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang
|
||||
CXXCOMPILER: clang++
|
||||
CUCUMBER_TIMEOUT: 60000
|
||||
ENABLE_ASSERTIONS: ON
|
||||
ENABLE_MASON: ON
|
||||
|
||||
- name: node-latest-mason-linux-release
|
||||
build_node_package: true
|
||||
continue-on-error: true
|
||||
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
|
||||
node: 16
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: node-latest-mason-linux-debug
|
||||
build_node_package: true
|
||||
continue-on-error: true
|
||||
# TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257
|
||||
node: 16
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Debug
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: mason-osx-release-node-lts
|
||||
build_node_package: true
|
||||
continue-on-error: true
|
||||
node: "lts/*"
|
||||
runs-on: macos-10.15
|
||||
BUILD_TYPE: Release
|
||||
CCOMPILER: clang
|
||||
CXXCOMPILER: clang++
|
||||
CUCUMBER_TIMEOUT: 60000
|
||||
ENABLE_ASSERTIONS: ON
|
||||
ENABLE_MASON: ON
|
||||
|
||||
- name: node-lts-mason-linux-release
|
||||
build_node_package: true
|
||||
continue-on-error: true
|
||||
node: "lts/*"
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Release
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
- name: node-lts-mason-linux-debug
|
||||
build_node_package: true
|
||||
continue-on-error: true
|
||||
node: "lts/*"
|
||||
runs-on: ubuntu-20.04
|
||||
BUILD_TYPE: Debug
|
||||
CLANG_VERSION: 5.0.0
|
||||
ENABLE_GLIBC_WORKAROUND: ON
|
||||
ENABLE_MASON: ON
|
||||
NODE_PACKAGE_TESTS_ONLY: ON
|
||||
|
||||
|
||||
name: ${{ matrix.name}}
|
||||
continue-on-error: ${{ matrix.continue-on-error }}
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
env:
|
||||
BUILD_TOOLS: ${{ matrix.BUILD_TOOLS }}
|
||||
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
|
||||
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
|
||||
CCOMPILER: ${{ matrix.CCOMPILER }}
|
||||
CFLAGS: ${{ matrix.CFLAGS }}
|
||||
CLANG_VERSION: ${{ matrix.CLANG_VERSION }}
|
||||
CUCUMBER_TIMEOUT: ${{ matrix.CUCUMBER_TIMEOUT }}
|
||||
CXXCOMPILER: ${{ matrix.CXXCOMPILER }}
|
||||
CXXFLAGS: ${{ matrix.CXXFLAGS }}
|
||||
ENABLE_ASSERTIONS: ${{ matrix.ENABLE_ASSERTIONS }}
|
||||
ENABLE_COVERAGE: ${{ matrix.ENABLE_COVERAGE }}
|
||||
ENABLE_GLIBC_WORKAROUND: ${{ matrix.ENABLE_GLIBC_WORKAROUND }}
|
||||
ENABLE_MASON: ${{ matrix.ENABLE_MASON }}
|
||||
ENABLE_SANITIZER: ${{ matrix.ENABLE_SANITIZER }}
|
||||
NODE_PACKAGE_TESTS_ONLY: ${{ matrix.NODE_PACKAGE_TESTS_ONLY }}
|
||||
TARGET_ARCH: ${{ matrix.TARGET_ARCH }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Enable Node.js cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Enable compiler cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-${{ matrix.name }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache-${{ matrix.name }}-
|
||||
- name: Enable test cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{github.workspace}}/test/cache
|
||||
key: test-${{ matrix.name }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
test-${{ matrix.name }}-
|
||||
|
||||
- name: Prepare environment
|
||||
run: |
|
||||
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
|
||||
echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
|
||||
|
||||
echo "OSRM_INSTALL_DIR=${GITHUB_WORKSPACE}/install-osrm" >> $GITHUB_ENV
|
||||
echo "OSRM_BUILD_DIR=${GITHUB_WORKSPACE}/build-osrm" >> $GITHUB_ENV
|
||||
|
||||
if [[ "$ENABLE_SANITIZER" == 'ON' ]]; then
|
||||
# We can only set this after checkout once we know the workspace directory
|
||||
echo "LSAN_OPTIONS=print_suppressions=0:suppressions=${GITHUB_WORKSPACE}/scripts/ci/leaksanitizer.conf" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
if [[ "${RUNNER_OS}" == "Linux" ]]; then
|
||||
echo "JOBS=$((`nproc` + 1))" >> $GITHUB_ENV
|
||||
export MASON_OS=linux
|
||||
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||
echo "JOBS=$((`sysctl -n hw.ncpu` + 1))" >> $GITHUB_ENV
|
||||
sudo mdutil -i off /
|
||||
export MASON_OS=osx
|
||||
fi
|
||||
|
||||
echo "MASON=${GITHUB_WORKSPACE}/scripts/mason.sh" >> $GITHUB_ENV
|
||||
echo "CMAKE_URL=https://mason-binaries.s3.amazonaws.com/${MASON_OS}-x86_64/cmake/${CMAKE_VERSION}.tar.gz" >> $GITHUB_ENV
|
||||
echo "CMAKE_DIR=mason_packages/${MASON_OS}-x86_64/cmake/${CMAKE_VERSION}}" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: Install dev dependencies
|
||||
run: |
|
||||
# CMake
|
||||
mkdir -p ${CMAKE_DIR}
|
||||
wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR}
|
||||
echo "${CMAKE_DIR}/bin" >> $GITHUB_PATH
|
||||
|
||||
# TBB
|
||||
${MASON} install tbb 2017_U7
|
||||
echo "LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_U7)/lib/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
|
||||
|
||||
# ccache
|
||||
${MASON} install ccache ${CCACHE_VERSION}
|
||||
echo "$(${MASON} prefix ccache ${CCACHE_VERSION})/bin" >> $GITHUB_PATH
|
||||
|
||||
# clang
|
||||
if [[ -n ${CLANG_VERSION} ]]; then
|
||||
echo "CCOMPILER=clang" >> $GITHUB_ENV
|
||||
echo "CXXCOMPILER=clang++" >> $GITHUB_ENV
|
||||
${MASON} install clang++ ${CLANG_VERSION}
|
||||
echo "$(${MASON} prefix clang++ ${CLANG_VERSION})/bin" >> $GITHUB_PATH
|
||||
# we only enable lto for release builds
|
||||
# and therefore don't need to us ld.gold or llvm tools for linking
|
||||
# for debug builds
|
||||
if [[ ${BUILD_TYPE} == 'Release' ]]; then
|
||||
${MASON} install binutils 2.27
|
||||
echo "$(${MASON} prefix binutils 2.27)/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
# Linux dev packages
|
||||
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_MASON}" != "ON" ]; then
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libtbb-dev libboost-all-dev
|
||||
if [[ -z "${CLANG_VERSION}" ]]; then
|
||||
sudo apt-get install -y ${CXXCOMPILER}
|
||||
fi
|
||||
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
|
||||
sudo apt-get install -y lcov
|
||||
fi
|
||||
elif [[ $TARGET_ARCH == "i686" ]]; then
|
||||
source ./scripts/ci/before_install.${TARGET_ARCH}.sh
|
||||
fi
|
||||
|
||||
- name: Prepare build
|
||||
run: |
|
||||
mkdir ${OSRM_BUILD_DIR}
|
||||
ccache --max-size=256M
|
||||
npm ci --ignore-scripts
|
||||
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
|
||||
lcov --directory . --zerocounters # clean cached files
|
||||
fi
|
||||
echo "CC=${CCOMPILER}" >> $GITHUB_ENV
|
||||
echo "CXX=${CXXCOMPILER}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and install OSRM
|
||||
run: |
|
||||
echo "Using ${JOBS} jobs"
|
||||
pushd ${OSRM_BUILD_DIR}
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF}} \
|
||||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \
|
||||
-DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
||||
-DBUILD_TOOLS=${BUILD_TOOLS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=${ENABLE_GLIBC_WORKAROUND:-OFF}
|
||||
make --jobs=${JOBS}
|
||||
|
||||
if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then
|
||||
make tests --jobs=${JOBS}
|
||||
make benchmarks --jobs=${JOBS}
|
||||
ccache -s
|
||||
sudo make install
|
||||
if [[ "${RUNNER_OS}" == "Linux" ]]; then
|
||||
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig" >> $GITHUB_ENV
|
||||
fi
|
||||
popd
|
||||
- name: Build example
|
||||
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }}
|
||||
run: |
|
||||
mkdir example/build && pushd example/build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
make --jobs=${JOBS}
|
||||
popd
|
||||
|
||||
- name: Run all tests
|
||||
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }}
|
||||
run: |
|
||||
make -C test/data benchmark
|
||||
|
||||
# macOS SIP strips the linker path. Reset this inside the running shell
|
||||
export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}
|
||||
./example/build/osrm-example test/data/mld/monaco.osrm
|
||||
|
||||
# All tests assume to be run from the build directory
|
||||
pushd ${OSRM_BUILD_DIR}
|
||||
./unit_tests/library-tests
|
||||
./unit_tests/extractor-tests
|
||||
./unit_tests/contractor-tests
|
||||
./unit_tests/engine-tests
|
||||
./unit_tests/util-tests
|
||||
./unit_tests/server-tests
|
||||
./unit_tests/partitioner-tests
|
||||
./unit_tests/customizer-tests
|
||||
if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then
|
||||
npm run nodejs-tests
|
||||
fi
|
||||
popd
|
||||
npm test
|
||||
- name: Run Node package tests only
|
||||
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
|
||||
run: |
|
||||
npm run nodejs-tests
|
||||
|
||||
- name: Generate code coverage
|
||||
if: ${{ matrix.ENABLE_COVERAGE == 'ON' }}
|
||||
run: |
|
||||
lcov --directory . --capture --output-file coverage.info # capture coverage info
|
||||
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
|
||||
lcov --list coverage.info #debug info
|
||||
# Uploading report to CodeCov
|
||||
- name: Upload code coverage
|
||||
if: ${{ matrix.ENABLE_COVERAGE == 'ON' }}
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
files: coverage.info
|
||||
name: codecov-osrm-backend
|
||||
fail_ci_if_error: true
|
||||
verbose: true
|
||||
|
||||
- name: Build Node package
|
||||
if: ${{ matrix.build_node_package && env.PUBLISH == 'On' }}
|
||||
run: ./scripts/ci/node_package.sh
|
||||
- name: Publish Node package
|
||||
if: ${{ matrix.build_node_package && env.PUBLISH == 'On' }}
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: true
|
||||
artifacts: build/stage/**/*.tar.gz
|
||||
omitBody: true
|
||||
omitBodyDuringUpdate: true
|
||||
omitName: true
|
||||
omitNameDuringUpdate: true
|
||||
replacesArtifacts: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
ci-complete:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: build-test-publish
|
||||
steps:
|
||||
- run: echo "CI complete"
|
||||
519
.travis.yml
519
.travis.yml
@ -1,519 +0,0 @@
|
||||
language: cpp
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
# sudo:required is needed for trusty images
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
# enable building tags
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
|
||||
cache:
|
||||
npm: true
|
||||
ccache: true
|
||||
apt: true
|
||||
directories:
|
||||
- test/cache
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "hk+32aXXF5t1ApaM2Wjqooz3dx1si907L87WRMkO47WlpJmUUU/Ye+MJk9sViH8MdhOcceocVAmdYl5/WFWOIbDWNlBya9QvXDZyIu2KIre/0QyOCTZbrsif8paBXKIO5O/R4OTvIZ8rvWZsadBdmAT9GSbDhih6FzqXAEgeIYQ="
|
||||
- secure: "VE+cFkseFwW4jK6XwkP0yW3h4DixPJ8+Eb3yKcchGZ5iIJxlZ/8i1vKHYxadgPRwSYwPSB14tF70xj2OmiT2keGzZUfphmPXinBaLEhYk+Bde+GZZkoSl5ND109I/LcyNr0nG9dDgtV6pkvFchgchpyP9JnVOOS0+crEZlAz0RE="
|
||||
- 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
|
||||
- CCACHE_VERSION=3.3.1
|
||||
- CMAKE_VERSION=3.7.2
|
||||
- MASON="$(pwd)/scripts/mason.sh"
|
||||
- ENABLE_NODE_BINDINGS=On
|
||||
- NODE="10"
|
||||
|
||||
stages:
|
||||
- core
|
||||
- optional
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
# We override the compiler names here to yield better ccache behavior, which uses this as key
|
||||
include:
|
||||
|
||||
# Debug Builds
|
||||
- stage: core
|
||||
os: linux
|
||||
compiler: "format-taginfo-docs"
|
||||
env: NODE=10
|
||||
sudo: false
|
||||
before_install:
|
||||
install:
|
||||
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
|
||||
- source $NVM_DIR/nvm.sh
|
||||
- nvm install $NODE
|
||||
- nvm use $NODE
|
||||
- npm --version
|
||||
- npm ci --ignore-scripts
|
||||
script:
|
||||
- ./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||
- ${MASON} install clang-format 3.8.1
|
||||
- PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh
|
||||
- node ./scripts/validate_changelog.js
|
||||
# See issue 4043
|
||||
#- npm run docs && ./scripts/error_on_dirty.sh
|
||||
after_success:
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-7-debug-cov"
|
||||
addons: &gcc7
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev', 'lcov']
|
||||
env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Debug' ENABLE_COVERAGE=ON CUCUMBER_TIMEOUT=20000
|
||||
before_script:
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
- lcov --directory . --zerocounters # clean cached da files
|
||||
after_success:
|
||||
# Creating report
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
- lcov --directory . --capture --output-file coverage.info # capture coverage info
|
||||
- lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
|
||||
- lcov --list coverage.info #debug info
|
||||
# Uploading report to CodeCov
|
||||
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-7-debug-asan"
|
||||
addons: &gcc7
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_SANITIZER=ON CUCUMBER_TIMEOUT=20000 LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/scripts/travis/leaksanitizer.conf"
|
||||
|
||||
- os: linux
|
||||
compiler: "clang-5.0-debug"
|
||||
addons: &clang50
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000
|
||||
|
||||
- os: linux
|
||||
compiler: "mason-linux-debug-asan"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/scripts/travis/leaksanitizer.conf"
|
||||
|
||||
# Release Builds
|
||||
- os: linux
|
||||
compiler: "mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-9-release"
|
||||
addons: &gcc9
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-9', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-9' CXXCOMPILER='g++-9' BUILD_TYPE='Release' CXXFLAGS='-Wno-cast-function-type'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-8-release"
|
||||
addons: &gcc8
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-8', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-8' CXXCOMPILER='g++-8' BUILD_TYPE='Release' CXXFLAGS='-Wno-cast-function-type'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-7-release"
|
||||
addons: &gcc7
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-7-release-i686"
|
||||
env: >
|
||||
TARGET_ARCH='i686' CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Release'
|
||||
CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-5-release"
|
||||
addons: &gcc49
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-release"
|
||||
addons: &gcc49
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
compiler: "mason-osx-release-node-10"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="10"
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
compiler: "mason-osx-release-node-8"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="8"
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
# Shared Library
|
||||
- os: linux
|
||||
compiler: "gcc-7-release-shared"
|
||||
addons: &gcc7
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
# Node build jobs. These skip running the tests.
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-8-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="8"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-8-mason-linux-debug"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="8"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-10-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="10"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-10-mason-linux-debug"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="10"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: osx
|
||||
stage: optional
|
||||
osx_image: xcode9.2
|
||||
compiler: "mason-osx-release-node-latest"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="node"
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-latest-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-latest-mason-linux-debug"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
compiler: "mason-osx-release-node-lts"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="--lts"
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-lts-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-lts-mason-linux-debug"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-4.9-dev']
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=ON
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
allow_failures:
|
||||
- compiler: "mason-osx-release-node-latest"
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="node"
|
||||
- compiler: "node-latest-mason-linux-release"
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node"
|
||||
- compiler: "node-latest-mason-linux-debug"
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node"
|
||||
- compiler: "mason-osx-release-node-lts"
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="--lts"
|
||||
- compiler: "node-lts-mason-linux-release"
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts"
|
||||
- compiler: "node-lts-mason-linux-debug"
|
||||
env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts"
|
||||
|
||||
before_install:
|
||||
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
|
||||
- source $NVM_DIR/nvm.sh
|
||||
- nvm install $NODE
|
||||
- nvm use $NODE
|
||||
- node --version
|
||||
- if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi
|
||||
- |
|
||||
if [[ -z $JOBS ]]; then
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
export JOBS=$((`nproc` + 1))
|
||||
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
export JOBS=$((`sysctl -n hw.ncpu` + 1))
|
||||
fi
|
||||
fi
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
sudo mdutil -i off /
|
||||
fi
|
||||
- export PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
|
||||
- export PUBLISH=$([[ "${TRAVIS_TAG:-}" == "v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off")
|
||||
- echo "Using ${JOBS} jobs"
|
||||
- npm ci --ignore-scripts
|
||||
# Bootstrap cmake to be able to run mason
|
||||
- CMAKE_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/cmake/${CMAKE_VERSION}.tar.gz"
|
||||
- CMAKE_DIR="mason_packages/${TRAVIS_OS_NAME}-x86_64/cmake/${CMAKE_VERSION}"
|
||||
- mkdir -p ${CMAKE_DIR}
|
||||
- travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR} || travis_terminate 1
|
||||
- export PATH=${CMAKE_DIR}/bin:${PATH}
|
||||
- ${MASON} install tbb 2017_U7 && export LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_U7)/lib/:${LD_LIBRARY_PATH}
|
||||
- ${MASON} install ccache ${CCACHE_VERSION} && export PATH=$(${MASON} prefix ccache ${CCACHE_VERSION})/bin:${PATH}
|
||||
- |
|
||||
if [[ ! -z ${CLANG_VERSION} ]]; then
|
||||
export CCOMPILER='clang'
|
||||
export CXXCOMPILER='clang++'
|
||||
${MASON} install clang++ ${CLANG_VERSION} && export PATH=$(${MASON} prefix clang++ ${CLANG_VERSION})/bin:${PATH} || travis_terminate 1
|
||||
# we only enable lto for release builds
|
||||
# and therefore don't need to us ld.gold or llvm tools for linking
|
||||
# for debug builds
|
||||
if [[ ${BUILD_TYPE} == 'Release' ]]; then
|
||||
${MASON} install binutils 2.27 && export PATH=$(${MASON} prefix binutils 2.27)/bin:${PATH} || travis_terminate 1
|
||||
fi
|
||||
fi
|
||||
- ccache --max-size=256M # limiting the cache's size to roughly the previous job's object sizes
|
||||
- export OSRM_INSTALL_DIR="$(pwd)/install-osrm"
|
||||
- export OSRM_BUILD_DIR="$(pwd)/build-osrm"
|
||||
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
|
||||
- mkdir ${OSRM_BUILD_DIR}
|
||||
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \
|
||||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \
|
||||
-DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
||||
-DBUILD_TOOLS=ON \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \
|
||||
-DENABLE_GLIBC_WORKAROUND=${ENABLE_GLIBC_WORKAROUND:-OFF}
|
||||
- echo "travis_fold:start:MAKE"
|
||||
- make --jobs=${JOBS}
|
||||
- make tests --jobs=${JOBS}
|
||||
- make benchmarks --jobs=${JOBS}
|
||||
- echo "travis_fold:end:MAKE"
|
||||
- ccache -s
|
||||
- sudo make install
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib
|
||||
fi
|
||||
- popd
|
||||
- mkdir example/build && pushd example/build
|
||||
- export PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
|
||||
script:
|
||||
- if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi
|
||||
- make -C test/data benchmark
|
||||
- ./example/build/osrm-example test/data/mld/monaco.osrm
|
||||
# All tests assume to be run from the build directory
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- ./unit_tests/library-tests
|
||||
- ./unit_tests/extractor-tests
|
||||
- ./unit_tests/contractor-tests
|
||||
- ./unit_tests/engine-tests
|
||||
- ./unit_tests/util-tests
|
||||
- ./unit_tests/server-tests
|
||||
- ./unit_tests/partitioner-tests
|
||||
- |
|
||||
if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then
|
||||
npm run nodejs-tests
|
||||
fi
|
||||
- |
|
||||
- popd
|
||||
- npm test
|
||||
163
CHANGELOG.md
163
CHANGELOG.md
@ -1,11 +1,72 @@
|
||||
# Unreleased
|
||||
- Changes from 5.23.0
|
||||
- Infrastructure
|
||||
- CHANGED: Bundled protozero updated to v1.7.0. [#5858](https://github.com/Project-OSRM/osrm-backend/pull/5858)
|
||||
|
||||
- Changes from 5.26.0
|
||||
- API:
|
||||
- FIXED: Fix inefficient osrm-routed connection handling [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
|
||||
- Build:
|
||||
- CHANGED: Use Github Actions for building container images [#6138](https://github.com/Project-OSRM/osrm-backend/pull/6138)
|
||||
- CHANGED: Upgrade Boost dependency to 1.70 [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
|
||||
- CHANGED: Upgrade Ubuntu CI builds to 20.04 [#6119](https://github.com/Project-OSRM/osrm-backend/pull/6119)
|
||||
- CHANGED: Make building osrm-routed optional [#6144](https://github.com/Project-OSRM/osrm-backend/pull/6144)
|
||||
- Features
|
||||
- ADDED: monitoring endpoint in prometheus format [#5180](https://github.com/Project-OSRM/osrm-backend/pull/5180)
|
||||
|
||||
# 5.26.0
|
||||
|
||||
- Changes from 5.25.0
|
||||
- API:
|
||||
- FIXED: Allow for special characters in the profile/method as part of the HTTP URL. [#6090](https://github.com/Project-OSRM/osrm-backend/pull/6090)
|
||||
- FIXED: Set osrm-routed to immediately close bad connections [#6112](https://github.com/Project-OSRM/osrm-backend/pull/6112)
|
||||
- Build:
|
||||
- CHANGED: Replace Travis with Github Actions for CI builds [#6071](https://github.com/Project-OSRM/osrm-backend/pull/6071)
|
||||
- FIXED: Fixed Boost link flags in pkg-config file. [#6083](https://github.com/Project-OSRM/osrm-backend/pull/6083)
|
||||
- FIXED: Fixed test cache to consider MLD executable changes. [#6129](https://github.com/Project-OSRM/osrm-backend/pull/6129)
|
||||
- Routing:
|
||||
- FIXED: Fix generation of inefficient MLD partitions [#6084](https://github.com/Project-OSRM/osrm-backend/pull/6084)
|
||||
- FIXED: Fix MLD level mask generation to support 64-bit masks. [#6123](https://github.com/Project-OSRM/osrm-backend/pull/6123)
|
||||
- FIXED: Fix metric offset overflow for large MLD partitions. This breaks the **data format** [#6124](https://github.com/Project-OSRM/osrm-backend/pull/6124)
|
||||
|
||||
# 5.25.0
|
||||
|
||||
- Changes from 5.24.0
|
||||
- Build:
|
||||
- CHANGED: Node binaries now use Github Releases for hosting [#6030](https://github.com/Project-OSRM/osrm-backend/pull/6030)
|
||||
- Misc:
|
||||
- FIXED: Upgrade to @mapbox/node-pre-gyp fix various bugs with Node 12/14 [#5991](https://github.com/Project-OSRM/osrm-backend/pull/5991)
|
||||
- FIXED: `valid` type in documentation examples [#5990](https://github.com/Project-OSRM/osrm-backend/issues/5990)
|
||||
- FIXED: Remove redundant loading of .osrm.cell_metrics [#6019](https://github.com/Project-OSRM/osrm-backend/issues/6019)
|
||||
- CHANGED: Increase PackedOSMIDs size to 34 bits. This breaks the **data format** [#6020](https://github.com/Project-OSRM/osrm-backend/issues/6020)
|
||||
- Profile:
|
||||
- FIXED: Add kerb barrier exception to default car profile. [#5999](https://github.com/Project-OSRM/osrm-backend/pull/5999)
|
||||
|
||||
# 5.24.0
|
||||
|
||||
- Changes from 5.23.0
|
||||
- Features
|
||||
- ADDED: Added support for multiple via-way restrictions. [#5907](https://github.com/Project-OSRM/osrm-backend/pull/5907)
|
||||
- ADDED: Add node bindings support for Node 12, 14, and publish binaries [#5918](https://github.com/Project-OSRM/osrm-backend/pull/5918)
|
||||
- REMOVED: we no longer publish Node 8 binary modules (they are still buildable from source) [#5918](https://github.com/Project-OSRM/osrm-backend/pull/5918)
|
||||
- Routing:
|
||||
- FIXED: Avoid copying ManyToMany table results [#5923](https://github.com/Project-OSRM/osrm-backend/pull/5923)
|
||||
- FIXED: Reduce copying in API parameter constructors [#5925](https://github.com/Project-OSRM/osrm-backend/pull/5925)
|
||||
- Misc:
|
||||
- CHANGED: Cleanup NodeJS dependencies [#5945](https://github.com/Project-OSRM/osrm-backend/pull/5945)
|
||||
- CHANGED: Unify `.osrm.turn_penalites_index` dump processing same with `.osrm.turn_weight_penalties` and `.osrm.turn_duration_penalties` [#5868](https://github.com/Project-OSRM/osrm-backend/pull/5868)
|
||||
- FIXED: Properly validate source/destination validation in NodeJS table service [#5595](https://github.com/Project-OSRM/osrm-backend/pull/5595/files)
|
||||
- FIXED: turn.roads_on_the_left not containing incoming roads and turn.roads_on_the_right not containing outgoing roads on two-way roads [#5128](https://github.com/Project-OSRM/osrm-backend/issues/5128)
|
||||
- Profile:
|
||||
- ADDED: Profile debug script which fetches a way from OSM then outputs the result of the profile. [#5908](https://github.com/Project-OSRM/osrm-backend/pull/5908)
|
||||
- Infrastructure
|
||||
- CHANGED: Bundled protozero updated to v1.7.0. [#5858](https://github.com/Project-OSRM/osrm-backend/pull/5858)
|
||||
- Windows:
|
||||
- FIXED: Fix bit-shift overflow in MLD partition step. [#5878](https://github.com/Project-OSRM/osrm-backend/pull/5878)
|
||||
- FIXED: Fix vector bool permutation in graph contraction step [#5882](https://github.com/Project-OSRM/osrm-backend/pull/5882)
|
||||
- API:
|
||||
- FIXED: Undo libosrm API break by adding old interface as method overload [#5861](https://github.com/Project-OSRM/osrm-backend/pull/5861)
|
||||
- FIXED: Fixed validation of sources/destinations when accessed via node bindings [#5595](https://github.com/Project-OSRM/osrm-backend/pull/5595)
|
||||
|
||||
# 5.23.0
|
||||
|
||||
- Changes from 5.22.0
|
||||
- Build:
|
||||
- FIXED: pessimistic calls to std::move [#5560](https://github.com/Project-OSRM/osrm-backend/pull/5561)
|
||||
@ -33,6 +94,7 @@
|
||||
- REMOVED: STXXL support removed as STXXL became abandonware. [#5760](https://github.com/Project-OSRM/osrm-backend/pull/5760)
|
||||
|
||||
# 5.22.0
|
||||
|
||||
- Changes from 5.21.0
|
||||
- Build:
|
||||
- ADDED: optionally build Node `lts` and `latest` bindings [#5347](https://github.com/Project-OSRM/osrm-backend/pull/5347)
|
||||
@ -41,6 +103,7 @@
|
||||
- ADDED: data timestamp information in the response (saved in new file `.osrm.timestamp`). [#5115](https://github.com/Project-OSRM/osrm-backend/issues/5115)
|
||||
|
||||
# 5.21.0
|
||||
|
||||
- Changes from 5.20.0
|
||||
- Features:
|
||||
- ADDED: all waypoints in responses now contain a distance property between the original coordinate and the snapped location. [#5255](https://github.com/Project-OSRM/osrm-backend/pull/5255)
|
||||
@ -60,6 +123,7 @@
|
||||
- CHANGED: Refactor maxspeed parsing to use common library. [#5144](https://github.com/Project-OSRM/osrm-backend/pull/5144)
|
||||
|
||||
# 5.20.0
|
||||
|
||||
- Changes from 5.19.0:
|
||||
- Table:
|
||||
- CHANGED: switch to pre-calculated distances for table responses for large speedup and 10% memory increase. [#5251](https://github.com/Project-OSRM/osrm-backend/pull/5251)
|
||||
@ -76,22 +140,13 @@
|
||||
- CHANGED: switch from Alpine Linux to Debian Buster base images [#5281](https://github.com/Project-OSRM/osrm-backend/pull/5281)
|
||||
|
||||
# 5.19.0
|
||||
- Changes from 5.18.0:
|
||||
- Optimizations:
|
||||
- CHANGED: Use Grisu2 for serializing floating point numbers. [#5188](https://github.com/Project-OSRM/osrm-backend/pull/5188)
|
||||
- ADDED: Node bindings can return pre-rendered JSON buffer. [#5189](https://github.com/Project-OSRM/osrm-backend/pull/5189)
|
||||
- Profiles:
|
||||
- CHANGED: Bicycle profile now blacklists barriers instead of whitelisting them [#5076
|
||||
](https://github.com/Project-OSRM/osrm-backend/pull/5076/)
|
||||
- CHANGED: Foot profile now blacklists barriers instead of whitelisting them [#5077
|
||||
](https://github.com/Project-OSRM/osrm-backend/pull/5077/)
|
||||
- CHANGED: Support maxlength and maxweight in car profile [#5101](https://github.com/Project-OSRM/osrm-backend/pull/5101]
|
||||
- Bugfixes:
|
||||
- FIXED: collapsing of ExitRoundabout instructions [#5114](https://github.com/Project-OSRM/osrm-backend/issues/5114)
|
||||
- Misc:
|
||||
- CHANGED: Support up to 512 named shared memory regions [#5185](https://github.com/Project-OSRM/osrm-backend/pull/5185)
|
||||
|
||||
- Changes from 5.18.0: - Optimizations: - CHANGED: Use Grisu2 for serializing floating point numbers. [#5188](https://github.com/Project-OSRM/osrm-backend/pull/5188) - ADDED: Node bindings can return pre-rendered JSON buffer. [#5189](https://github.com/Project-OSRM/osrm-backend/pull/5189) - Profiles: - CHANGED: Bicycle profile now blacklists barriers instead of whitelisting them [#5076
|
||||
](https://github.com/Project-OSRM/osrm-backend/pull/5076/) - CHANGED: Foot profile now blacklists barriers instead of whitelisting them [#5077
|
||||
](https://github.com/Project-OSRM/osrm-backend/pull/5077/) - CHANGED: Support maxlength and maxweight in car profile [#5101](https://github.com/Project-OSRM/osrm-backend/pull/5101) - Bugfixes: - FIXED: collapsing of ExitRoundabout instructions [#5114](https://github.com/Project-OSRM/osrm-backend/issues/5114) - Misc: - CHANGED: Support up to 512 named shared memory regions [#5185](https://github.com/Project-OSRM/osrm-backend/pull/5185)
|
||||
|
||||
# 5.18.0
|
||||
|
||||
- Changes from 5.17.0:
|
||||
- Features:
|
||||
- ADDED: `table` plugin now optionally returns `distance` matrix as part of response [#4990](https://github.com/Project-OSRM/osrm-backend/pull/4990)
|
||||
@ -104,11 +159,13 @@
|
||||
- ADDED: Bicycle profile allows to exclude ferry routes (default to not enabled) [#5054](https://github.com/Project-OSRM/osrm-backend/pull/5054)
|
||||
|
||||
# 5.17.1
|
||||
|
||||
- Changes from 5.17.0:
|
||||
- Bugfixes:
|
||||
- FIXED: Do not combine a segregated edge with a roundabout [#5039](https://github.com/Project-OSRM/osrm-backend/issues/5039)
|
||||
|
||||
# 5.17.0
|
||||
|
||||
- Changes from 5.16.0:
|
||||
- Bugfixes:
|
||||
- FIXED: deduplication of route steps when waypoints are used [#4909](https://github.com/Project-OSRM/osrm-backend/issues/4909)
|
||||
@ -148,6 +205,7 @@
|
||||
- ADDED: expose name for datasource annotations as metadata [#4973](https://github.com/Project-OSRM/osrm-backend/pull/4973)
|
||||
|
||||
# 5.16.0
|
||||
|
||||
- Changes from 5.15.2:
|
||||
- Guidance
|
||||
- ADDED #4676: Support for maneuver override relation, allowing data-driven overrides for turn-by-turn instructions [#4676](https://github.com/Project-OSRM/osrm-backend/pull/4676)
|
||||
@ -164,6 +222,7 @@
|
||||
- ADDED #4872: Handling of `barrier=height_restrictor` nodes [#4872](https://github.com/Project-OSRM/osrm-backend/pull/4872)
|
||||
|
||||
# 5.15.2
|
||||
|
||||
- Changes from 5.15.1:
|
||||
- Features:
|
||||
- ADDED: Exposed the waypoints parameter in the node bindings interface
|
||||
@ -171,6 +230,7 @@
|
||||
- FIXED: Segfault causing bug in leg collapsing map matching when traversing edges in reverse
|
||||
|
||||
# 5.15.1
|
||||
|
||||
- Changes from 5.15.0:
|
||||
- Bugfixes:
|
||||
- FIXED: Segfault in map matching when RouteLeg collapsing code is run on a match with multiple submatches
|
||||
@ -178,13 +238,14 @@
|
||||
- Set type of trivial intersections where classes change to Suppressed instead of NoTurn
|
||||
|
||||
# 5.15.0
|
||||
|
||||
- Changes from 5.14.3:
|
||||
- Bugfixes:
|
||||
- FIXED #4704: Fixed regression in bearings reordering introduced in 5.13 [#4704](https://github.com/Project-OSRM/osrm-backend/issues/4704)
|
||||
- FIXED #4781: Fixed overflow exceptions in percent-encoding parsing
|
||||
- FIXED #4770: Fixed exclude flags for single toll road scenario
|
||||
- FIXED #4283: Fix overflow on zero duration segments
|
||||
- FIXED #4804: Ignore no_*_on_red turn restrictions
|
||||
- FIXED #4804: Ignore no\_\*\_on_red turn restrictions
|
||||
- Guidance:
|
||||
- CHANGED #4706: Guidance refactoring step to decouple intersection connectivity analysis and turn instructions generation [#4706](https://github.com/Project-OSRM/osrm-backend/pull/4706)
|
||||
- CHANGED #3491: Refactor `isThroughStreet`/Intersection options
|
||||
@ -192,6 +253,7 @@
|
||||
- ADDED: `tunnel` as a new class in car profile so that sections of the route with tunnel tags will be marked as such
|
||||
|
||||
# 5.14.3
|
||||
|
||||
- Changes from 5.14.2:
|
||||
- Features:
|
||||
- Added a `waypoints` parameter to the match service plugin that accepts indices to input coordinates and treats only those points as waypoints in the response format.
|
||||
@ -204,6 +266,7 @@
|
||||
- CHANGED: set default urban speed in Ukraine to 50kmh
|
||||
|
||||
# 5.14.2
|
||||
|
||||
- Changes from 5.14.1:
|
||||
- Bugfixes:
|
||||
- FIXED #4727: Erroring when a old .core file is present.
|
||||
@ -215,11 +278,13 @@
|
||||
- ADDED: New osrm-routed `max_radiuses_map_matching` command line flag to optionally set a maximum radius for map matching
|
||||
|
||||
# 5.14.1
|
||||
|
||||
- Changes from 5.14.0
|
||||
- Bugfixes:
|
||||
- FIXED: don't use removed alternative candidates in `filterPackedPathsByCellSharing`
|
||||
|
||||
# 5.14.0
|
||||
|
||||
- Changes from 5.13
|
||||
- API:
|
||||
- ADDED: new RouteStep property `driving_side` that has either "left" or "right" for that step
|
||||
@ -248,6 +313,7 @@
|
||||
- FIXED: don't consider empty names + empty refs as a valid name for u-turns
|
||||
|
||||
# 5.13.0
|
||||
|
||||
- Changes from 5.12:
|
||||
- Profile:
|
||||
- Append cardinal directions from route relations to ref fields to improve instructions; off by default see `profile.cardinal_directions`
|
||||
@ -278,6 +344,7 @@
|
||||
- MLD uses a unidirectional Dijkstra for 1-to-N and N-to-1 matrices which yields speedup.
|
||||
|
||||
# 5.12.0
|
||||
|
||||
- Changes from 5.11:
|
||||
- Guidance
|
||||
- now announcing turning onto oneways at the end of a road (e.g. onto dual carriageways)
|
||||
@ -301,6 +368,7 @@
|
||||
- Added new properties `type` and `modifier` to `turns` layer, useful for viewing guidance calculated turn types on the map
|
||||
|
||||
# 5.11.0
|
||||
|
||||
- Changes from 5.10:
|
||||
- Features
|
||||
- BREAKING: Added support for conditional via-way restrictions. This features changes the file format of osrm.restrictions and requires re-extraction
|
||||
@ -322,6 +390,7 @@
|
||||
- Change timezones in West Africa to the WAT zone so they're recognized on the Windows platform
|
||||
|
||||
# 5.10.0
|
||||
|
||||
- Changes from 5.9:
|
||||
- Profiles:
|
||||
- New version 2 profile API which cleans up a number of things and makes it easier to for profiles to include each other. Profiles using the old version 0 and 1 APIs are still supported.
|
||||
@ -346,14 +415,17 @@
|
||||
- Added support for via-way restrictions
|
||||
|
||||
# 5.9.2
|
||||
|
||||
- API:
|
||||
- `annotations=durations,weights,speeds` values no longer include turn penalty values ([#4330](https://github.com/Project-OSRM/osrm-backend/issues/4330))
|
||||
|
||||
# 5.9.1
|
||||
|
||||
- Infrastructure
|
||||
- STXXL is not required by default
|
||||
|
||||
# 5.9.0
|
||||
|
||||
- Changes from 5.8:
|
||||
- Algorithm:
|
||||
- Multi-Level Dijkstra:
|
||||
@ -380,6 +452,7 @@
|
||||
- #4278: Remove superflous continious instruction on a motorway.
|
||||
|
||||
# 5.8.0
|
||||
|
||||
- Changes from 5.7
|
||||
- API:
|
||||
- polyline6 support in request string
|
||||
@ -410,10 +483,12 @@
|
||||
- Avoid collapsing u-turns into combined turn instructions
|
||||
|
||||
# 5.7.1
|
||||
|
||||
- Bugfixes
|
||||
- #4030 Roundabout edge-case crashes post-processing
|
||||
|
||||
# 5.7.0
|
||||
|
||||
- Changes from 5.6
|
||||
- Algorithm:
|
||||
- OSRM object has new option `algorithm` that allows the selection of a routing algorithm.
|
||||
@ -440,21 +515,25 @@
|
||||
- new option `tidy=true|false` to simplify traces automatically
|
||||
|
||||
# 5.6.3
|
||||
|
||||
- Changes from 5.6.0
|
||||
- Bugfixes
|
||||
- #3790 Fix incorrect speed values in tile plugin
|
||||
|
||||
# 5.6.2
|
||||
|
||||
- Changes from 5.6.0
|
||||
- Bugfixes
|
||||
- Fix incorrect forward datasources getter in facade
|
||||
|
||||
# 5.6.1
|
||||
|
||||
- Changes from 5.6.0
|
||||
- Bugfixes
|
||||
- Fix #3754 add restricted penalty on NoTurn turns
|
||||
|
||||
# 5.6.0
|
||||
|
||||
- Changes from 5.5
|
||||
- Bugfixes
|
||||
- Fix #3475 removed an invalid `exit` field from the `arrive` maneuver
|
||||
@ -490,6 +569,7 @@
|
||||
- Added a new feature that finds the optimal route given a list of waypoints, a source and a destination. This does not return a roundtrip and instead returns a one way optimal route from the fixed source to the destination points.
|
||||
|
||||
# 5.5.1
|
||||
|
||||
- Changes from 5.5.0
|
||||
- API:
|
||||
- Adds `generate_hints=true` (`true` by default) which lets user disable `Hint` generating in the response. Use if you don't need `Hint`s!
|
||||
@ -498,6 +578,7 @@
|
||||
- Fixed a bug that could lead to emitting false instructions for staying on a roundabout
|
||||
|
||||
# 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
|
||||
@ -539,12 +620,14 @@
|
||||
- Prettier API documentation now generated via `npm run build-api-docs` output `build/docs`
|
||||
|
||||
# 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
|
||||
@ -552,11 +635,13 @@
|
||||
- #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.
|
||||
@ -574,7 +659,7 @@
|
||||
- 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
|
||||
- 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
|
||||
@ -589,7 +674,9 @@
|
||||
- Adds a feature to limit results in nearest service with a default of 100 in `osrm-routed`
|
||||
|
||||
# 5.3.0
|
||||
|
||||
- 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.
|
||||
@ -621,6 +708,7 @@
|
||||
- Fix devide by zero on updating speed data using osrm-contract
|
||||
|
||||
# 5.3.0 RC3
|
||||
|
||||
- Changes from 5.3.0-rc.2
|
||||
- Guidance
|
||||
- Improved detection of obvious turns
|
||||
@ -629,11 +717,13 @@
|
||||
- Fix bug that didn't chose minimal weights on overlapping edges
|
||||
|
||||
# 5.3.0 RC2
|
||||
|
||||
- Changes from 5.3.0-rc.1
|
||||
- Bugfixes
|
||||
- Fixes invalid checks in the lane-extraction part of the car profile
|
||||
|
||||
# 5.3.0 RC1
|
||||
|
||||
- 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 route response. The lane data contains both the markings at the intersection and a flag indicating their involvement in the turn
|
||||
@ -643,35 +733,46 @@
|
||||
- BREAKING: Turn lane data introduces two new files (osrm.tld,osrm.tls). This breaks the fileformat for older versions.
|
||||
|
||||
# 5.2.5
|
||||
|
||||
- Bugfixes
|
||||
- Fixes a segfault caused by incorrect trimming logic for very short steps.
|
||||
|
||||
# 5.2.4
|
||||
|
||||
- Bugfixes:
|
||||
- Fixed in issue that arised on roundabouts in combination with intermediate intersections and sliproads
|
||||
|
||||
# 5.2.3
|
||||
|
||||
- Bugfixes:
|
||||
- Fixed an issue with name changes in roundabouts that could result in crashes
|
||||
|
||||
# 5.2.2
|
||||
|
||||
Changes from 5.2.1
|
||||
|
||||
- Bugfixes:
|
||||
- Buffer overrun in tile plugin response handling
|
||||
|
||||
# 5.2.1
|
||||
|
||||
Changes from 5.2.0
|
||||
|
||||
- Bugfixes:
|
||||
- Removed debug statement that was spamming the console
|
||||
|
||||
# 5.2.0
|
||||
|
||||
Changes from 5.2.0 RC2
|
||||
|
||||
- Bugfixes:
|
||||
- Fixed crash when loading shared memory caused by invalid OSM IDs segment size.
|
||||
- Various small instructions handling fixes
|
||||
|
||||
Changes from 5.1.0
|
||||
|
||||
- API:
|
||||
|
||||
- new parameter `annotations` for `route`, `trip` and `match` requests. Returns additional data about each
|
||||
coordinate along the selected/matched route line per `RouteLeg`:
|
||||
- duration of each segment
|
||||
@ -685,12 +786,14 @@
|
||||
- Support for name pronunciations. New member `pronunciation` in `RouteStep`, based on `name:pronunciation`
|
||||
|
||||
- Profile changes:
|
||||
|
||||
- duration parser now accepts P[n]DT[n]H[n]M[n]S, P[n]W, PTHHMMSS and PTHH:MM:SS ISO8601 formats.
|
||||
- `result.destinations` allows you to set a way's destinations
|
||||
- `result.pronunciation` allows you to set way name pronunciations
|
||||
- `highway=motorway_link` no longer implies `oneway` as per the OSM Wiki
|
||||
|
||||
- Infrastructure:
|
||||
|
||||
- BREAKING: Changed the on-disk encoding of the StaticRTree to reduce ramIndex file size. This breaks the **data format**
|
||||
- BREAKING: Intersection Classification adds a new file to the mix (osrm.icd). This breaks the fileformat for older versions.
|
||||
- Better support for osrm-routed binary upgrade on the fly [UNIX specific]:
|
||||
@ -699,6 +802,7 @@
|
||||
- Disable http access logging via DISABLE_ACCESS_LOGGING environment variable.
|
||||
|
||||
- Guidance:
|
||||
|
||||
- BREAKING: modifies the file format with new internal identifiers
|
||||
- improved detection of turning streets, not reporting new-name in wrong situations
|
||||
- improved handling of sliproads (emit turns instead of 'take the ramp')
|
||||
@ -708,14 +812,17 @@
|
||||
- fixed broken summaries for very short routes
|
||||
|
||||
# 5.2.0 RC2
|
||||
|
||||
Changes from 5.2.0 RC1
|
||||
|
||||
- Guidance:
|
||||
|
||||
- improved handling of sliproads (emit turns instead of 'take the ramp')
|
||||
- improved collapsing of instructions. Some 'new name' instructions will be suppressed if they are without alternative and the segment is short
|
||||
- BREAKING: modifies the file format with new internal identifiers
|
||||
|
||||
- API:
|
||||
|
||||
- paramater `annotate` was renamed to `annotations`.
|
||||
- `annotation` as accidentally placed in `Route` instead of `RouteLeg`
|
||||
- Support for destination signs. New member `destinations` in `RouteStep`, based on `destination` and `destination:ref`
|
||||
@ -723,20 +830,24 @@
|
||||
- Add `nodes` property to `annotation` in `RouteLeg` containing the ids of nodes covered by the route
|
||||
|
||||
- Profile changes:
|
||||
|
||||
- `result.destinations` allows you to set a way's destinations
|
||||
- `result.pronunciation` allows you to set way name pronunciations
|
||||
- `highway=motorway_link` no longer implies `oneway` as per the OSM Wiki
|
||||
|
||||
- Infrastructure
|
||||
|
||||
- BREAKING: Changed the on-disk encoding of the StaticRTree to reduce ramIndex file size. This breaks the **data format**
|
||||
|
||||
- Bugfixes
|
||||
- fixed broken summaries for very short routes
|
||||
|
||||
# 5.2.0 RC1
|
||||
|
||||
Changes from 5.1.0
|
||||
|
||||
- API:
|
||||
|
||||
- new parameter `annotate` for `route` and `match` requests. Returns additional data about each
|
||||
coordinate along the selected/matched route line.
|
||||
- Introducing Intersections for Route Steps. This changes the API format in multiple ways.
|
||||
@ -745,9 +856,11 @@
|
||||
- every `RouteStep` now has property `intersections` containing a list of `Intersection` objects.
|
||||
|
||||
- Profile changes:
|
||||
|
||||
- duration parser now accepts P[n]DT[n]H[n]M[n]S, P[n]W, PTHHMMSS and PTHH:MM:SS ISO8601 formats.
|
||||
|
||||
- Infrastructure:
|
||||
|
||||
- Better support for osrm-routed binary upgrade on the fly [UNIX specific]:
|
||||
- Open sockets with SO_REUSEPORT to allow multiple osrm-routed processes serving requests from the same port.
|
||||
- Add SIGNAL_PARENT_WHEN_READY environment variable to enable osrm-routed signal its parent with USR1 when it's running and waiting for requests.
|
||||
@ -759,9 +872,11 @@
|
||||
- improved detection of turning streets, not reporting new-name in wrong situations
|
||||
|
||||
# 5.1.0
|
||||
|
||||
Changes with regard to 5.0.0
|
||||
|
||||
- API:
|
||||
|
||||
- added StepManeuver type `roundabout turn`. The type indicates a small roundabout that is treated as an intersection
|
||||
(turn right at the roundabout for first exit, go straight at the roundabout...)
|
||||
- added StepManeuver type `on ramp` and `off ramp` to distinguish between ramps that enter and exit a highway.
|
||||
@ -791,14 +906,18 @@
|
||||
- Emit new-name on when changing fron unanmed road to named road
|
||||
|
||||
# 5.0.0
|
||||
|
||||
Changes with regard 5.0.0 RC2:
|
||||
|
||||
- API:
|
||||
- if `geometry=geojson` is passed the resulting geometry can be a LineString or Point
|
||||
depending on how many coordinates are present.
|
||||
- the removal of the summary field was revered. for `steps=flase` the field will always be an empty string.
|
||||
|
||||
Changes with regard to 4.9.1:
|
||||
|
||||
- API:
|
||||
|
||||
- BREAKING: Complete rewrite of the HTTP and library API. See detailed documentation in the wiki.
|
||||
- BREAKING: The default coordinate order is now `longitude, latidue`. Exception: Polyline geometry
|
||||
which follow the original Google specification of `latitdue, longitude`.
|
||||
@ -812,6 +931,7 @@
|
||||
- Improved handling of roundabouts
|
||||
|
||||
- Tools:
|
||||
|
||||
- BREAKING: Renamed osrm-prepare to osrm-contract
|
||||
- BREAKING: Removes profiles from osrm-contract, only needed in osrm-extract.
|
||||
- Abort processing in osrm-extract if there are no snappable edges remaining.
|
||||
@ -819,11 +939,13 @@
|
||||
- Enables the use of multiple segment-speed-files on the osrm-contract command line
|
||||
|
||||
- Profile changes:
|
||||
|
||||
- Remove movable bridge mode
|
||||
- Add `maxspeed=none` tag to car profile.
|
||||
- A `side_road` tag support for the OSRM car profile.
|
||||
|
||||
- Fixes:
|
||||
|
||||
- Issue #2150: Prevents routing over delivery ways and nodes
|
||||
- Issue #1972: Provide uninstall target
|
||||
- Issue #2072: Disable alternatives by default and if core factor < 1.0
|
||||
@ -835,8 +957,8 @@
|
||||
- Updated to libosmium v2.6.1
|
||||
- Remove GeoJSON based debugging output, replaced by debug tiles
|
||||
|
||||
|
||||
# 5.0.0 RC2
|
||||
|
||||
- Profiles:
|
||||
- `properties.allow_uturns_at_via` -> `properties.continue_straight_at_waypoint` (value is inverted!)
|
||||
- API:
|
||||
@ -862,6 +984,7 @@
|
||||
- Add missing -lz to fix linking of server-tests
|
||||
|
||||
# 5.0.0 RC1
|
||||
|
||||
- Renamed osrm-prepare into osrm-contract
|
||||
- osrm-contract does not need a profile parameter anymore
|
||||
- New public HTTP API, find documentation [here](https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND NOT MSVC_IDE)
|
||||
message(FATAL_ERROR "In-source builds are not allowed.
|
||||
@ -22,6 +22,7 @@ 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_PACKAGE "Build OSRM package" OFF)
|
||||
option(BUILD_ROUTED "Build osrm-routed HTTP server" ON)
|
||||
option(ENABLE_ASSERTIONS "Use assertions in release mode" OFF)
|
||||
option(ENABLE_DEBUG_LOGGING "Use debug logging in release mode" OFF)
|
||||
option(ENABLE_COVERAGE "Build with coverage instrumentalisation" OFF)
|
||||
@ -36,7 +37,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
if(ENABLE_MASON)
|
||||
# versions in use
|
||||
set(MASON_BOOST_VERSION "1.65.1")
|
||||
set(MASON_BOOST_VERSION "1.73.0")
|
||||
set(MASON_EXPAT_VERSION "2.2.0")
|
||||
set(MASON_LUA_VERSION "5.2.4")
|
||||
set(MASON_BZIP2_VERSION "1.0.6")
|
||||
@ -162,7 +163,11 @@ add_library(CONTRACTOR OBJECT ${ContractorGlob})
|
||||
add_library(UPDATER OBJECT ${UpdaterGlob})
|
||||
add_library(STORAGE OBJECT ${StorageGlob})
|
||||
add_library(ENGINE OBJECT ${EngineGlob})
|
||||
|
||||
if (BUILD_ROUTED)
|
||||
add_library(SERVER OBJECT ${ServerGlob})
|
||||
add_executable(osrm-routed src/tools/routed.cpp $<TARGET_OBJECTS:SERVER> $<TARGET_OBJECTS:UTIL>)
|
||||
endif()
|
||||
|
||||
set_target_properties(UTIL PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
@ -170,7 +175,6 @@ add_executable(osrm-extract src/tools/extract.cpp)
|
||||
add_executable(osrm-partition src/tools/partition.cpp)
|
||||
add_executable(osrm-customize src/tools/customize.cpp)
|
||||
add_executable(osrm-contract src/tools/contract.cpp)
|
||||
add_executable(osrm-routed src/tools/routed.cpp $<TARGET_OBJECTS:SERVER> $<TARGET_OBJECTS:UTIL>)
|
||||
add_executable(osrm-datastore src/tools/store.cpp $<TARGET_OBJECTS:MICROTAR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm src/osrm/osrm.cpp $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:MICROTAR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_contract src/osrm/contractor.cpp $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
@ -514,14 +518,18 @@ if(ENABLE_MASON)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
|
||||
# current mason packages target -D_GLIBCXX_USE_CXX11_ABI=0
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
add_dependency_defines(-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
|
||||
# note: we avoid calling find_package(Osmium ...) here to ensure that the
|
||||
# expat and bzip2 are used from mason rather than the system
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include)
|
||||
else()
|
||||
|
||||
find_package(Boost 1.54 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
if (BUILD_ROUTED)
|
||||
# osrm-routed requires newer boost:asio
|
||||
find_package(Boost 1.70 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
else()
|
||||
find_package(Boost 1.60 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
endif()
|
||||
add_dependency_includes(${Boost_INCLUDE_DIRS})
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
@ -614,7 +622,9 @@ target_link_libraries(osrm-extract osrm_extract ${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
target_link_libraries(osrm-partition osrm_partition ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-customize osrm_customize ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-contract osrm_contract ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
if (BUILD_ROUTED)
|
||||
target_link_libraries(osrm-routed osrm ${Boost_PROGRAM_OPTIONS_LIBRARY} ${OPTIONAL_SOCKET_LIBS} ${ZLIB_LIBRARY})
|
||||
endif()
|
||||
|
||||
set(EXTRACTOR_LIBRARIES
|
||||
${BZIP2_LIBRARIES}
|
||||
@ -697,7 +707,7 @@ install(TARGETS osrm-components DESTINATION bin)
|
||||
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_BASE_LIBRARIES} ${TBB_LIBRARIES})
|
||||
|
||||
install(TARGETS osrm-io-benchmark DESTINATION bin)
|
||||
endif()
|
||||
@ -719,7 +729,9 @@ set_property(TARGET osrm-extract PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-partition PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-contract PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-datastore PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
if (BUILD_ROUTED)
|
||||
set_property(TARGET osrm-routed PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
endif()
|
||||
|
||||
file(GLOB VariantGlob third_party/variant/include/mapbox/*.hpp)
|
||||
file(GLOB FlatbuffersGlob third_party/flatbuffers/include/flatbuffers/*.h)
|
||||
@ -748,7 +760,9 @@ install(TARGETS osrm-partition DESTINATION bin)
|
||||
install(TARGETS osrm-customize DESTINATION bin)
|
||||
install(TARGETS osrm-contract DESTINATION bin)
|
||||
install(TARGETS osrm-datastore DESTINATION bin)
|
||||
if (BUILD_ROUTED)
|
||||
install(TARGETS osrm-routed DESTINATION bin)
|
||||
endif()
|
||||
install(TARGETS osrm DESTINATION lib)
|
||||
install(TARGETS osrm_extract DESTINATION lib)
|
||||
install(TARGETS osrm_partition DESTINATION lib)
|
||||
@ -802,9 +816,25 @@ set(PKGCONFIG_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS "${PKGCONFIG_INCLUDE_DIR}")
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS "${PKGCONFIG_INCLUDE_DIR}/osrm")
|
||||
JOIN("-I${DEPENDENCIES_INCLUDE_DIRS}" " -I" PKGCONFIG_OSRM_INCLUDE_FLAGS)
|
||||
JOIN("${ENGINE_LIBRARIES}" " " PKGCONFIG_OSRM_DEPENDENT_LIBRARIES)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig.in libosrm.pc @ONLY)
|
||||
# Boost uses imported targets, we need to use a generator expression to extract
|
||||
# the link libraries to be written to the pkg-config file.
|
||||
foreach(engine_lib ${ENGINE_LIBRARIES})
|
||||
if("${engine_lib}" MATCHES "^Boost.*")
|
||||
list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "$<TARGET_LINKER_FILE:${engine_lib}>")
|
||||
else()
|
||||
list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "${engine_lib}")
|
||||
endif()
|
||||
endforeach(engine_lib)
|
||||
JOIN("${PKGCONFIG_DEPENDENT_LIBRARIES}" " " PKGCONFIG_OSRM_DEPENDENT_LIBRARIES)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig.in pkgconfig.configured @ONLY)
|
||||
file(GENERATE
|
||||
OUTPUT
|
||||
${PROJECT_BINARY_DIR}/libosrm.pc
|
||||
INPUT
|
||||
${PROJECT_BINARY_DIR}/pkgconfig.configured)
|
||||
|
||||
install(FILES ${PROJECT_BINARY_DIR}/libosrm.pc DESTINATION ${PKGCONFIG_LIBRARY_DIR}/pkgconfig)
|
||||
|
||||
# uninstall target
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
| Linux / macOS | Windows | Code Coverage |
|
||||
| ------------- | ------- | ------------- |
|
||||
| [](https://travis-ci.org/Project-OSRM/osrm-backend) | [](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) | [](https://codecov.io/gh/Project-OSRM/osrm-backend) |
|
||||
| [](https://github.com/Project-OSRM/osrm-backend/actions/workflows/osrm-backend.yml) | [](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) | [](https://codecov.io/gh/Project-OSRM/osrm-backend) |
|
||||
|
||||
High performance routing engine written in C++14 designed to run on OpenStreetMap data.
|
||||
|
||||
|
||||
@ -131,6 +131,10 @@ ECHO running extractor-tests.exe ...
|
||||
unit_tests\%Configuration%\extractor-tests.exe
|
||||
IF %ERRORLEVEL% EQU 1 GOTO ERROR
|
||||
|
||||
ECHO running contractor-tests.exe ...
|
||||
unit_tests\%Configuration%\contractor-tests.exe
|
||||
IF %ERRORLEVEL% EQU 1 GOTO ERROR
|
||||
|
||||
ECHO running engine-tests.exe ...
|
||||
unit_tests\%Configuration%\engine-tests.exe
|
||||
IF %ERRORLEVEL% EQU 1 GOTO ERROR
|
||||
@ -143,34 +147,41 @@ ECHO running server-tests.exe ...
|
||||
unit_tests\%Configuration%\server-tests.exe
|
||||
IF %ERRORLEVEL% EQU 1 GOTO ERROR
|
||||
|
||||
::TODO: CH processing sometimes mysteriously hangs, need to find why and enable tests below.
|
||||
::ECHO running library-tests.exe ...
|
||||
::SET test_region=monaco
|
||||
::SET test_region_ch=ch\monaco
|
||||
::SET test_region_corech=corech\monaco
|
||||
::SET test_region_mld=mld\monaco
|
||||
::SET test_osm=%test_region%.osm.pbf
|
||||
::IF NOT EXIST %test_osm% powershell Invoke-WebRequest http://project-osrm.wolt.com/testing/monaco.osm.pbf -OutFile %test_osm%
|
||||
::ECHO running %Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm%
|
||||
::%Configuration%\osrm-extract.exe
|
||||
::%Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm%
|
||||
::MKDIR ch
|
||||
::XCOPY %test_region%.osrm.* ch\
|
||||
::XCOPY %test_region%.osrm ch\
|
||||
::MKDIR corech
|
||||
::XCOPY %test_region%.osrm.* corech\
|
||||
::XCOPY %test_region%.osrm corech\
|
||||
::MKDIR mld
|
||||
::XCOPY %test_region%.osrm.* mld\
|
||||
::XCOPY %test_region%.osrm mld\
|
||||
::%Configuration%\osrm-contract.exe %test_region_ch%.osrm
|
||||
::%Configuration%\osrm-contract.exe --core 0.8 %test_region_corech%.osrm
|
||||
::%Configuration%\osrm-partition.exe %test_region_mld%.osrm
|
||||
::%Configuration%\osrm-customize.exe %test_region_mld%.osrm
|
||||
::XCOPY /Y ch\*.* ..\test\data\ch\
|
||||
::XCOPY /Y corech\*.* ..\test\data\corech\
|
||||
::XCOPY /Y mld\*.* ..\test\data\mld\
|
||||
::unit_tests\%Configuration%\library-tests.exe
|
||||
ECHO running partitioner-tests.exe ...
|
||||
unit_tests\%Configuration%\partitioner-tests.exe
|
||||
IF %ERRORLEVEL% EQU 1 GOTO ERROR
|
||||
|
||||
ECHO running customizer-tests.exe ...
|
||||
unit_tests\%Configuration%\customizer-tests.exe
|
||||
IF %ERRORLEVEL% EQU 1 GOTO ERROR
|
||||
|
||||
ECHO running library-tests.exe ...
|
||||
SET test_region=monaco
|
||||
SET test_region_ch=ch\monaco
|
||||
SET test_region_corech=corech\monaco
|
||||
SET test_region_mld=mld\monaco
|
||||
SET test_osm=%test_region%.osm.pbf
|
||||
IF NOT EXIST %test_osm% powershell Invoke-WebRequest http://project-osrm.wolt.com/testing/monaco.osm.pbf -OutFile %test_osm%
|
||||
ECHO running %Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm%
|
||||
%Configuration%\osrm-extract.exe
|
||||
%Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm%
|
||||
MKDIR ch
|
||||
XCOPY %test_region%.osrm.* ch\
|
||||
XCOPY %test_region%.osrm ch\
|
||||
MKDIR corech
|
||||
XCOPY %test_region%.osrm.* corech\
|
||||
XCOPY %test_region%.osrm corech\
|
||||
MKDIR mld
|
||||
XCOPY %test_region%.osrm.* mld\
|
||||
XCOPY %test_region%.osrm mld\
|
||||
%Configuration%\osrm-contract.exe %test_region_ch%.osrm
|
||||
%Configuration%\osrm-contract.exe --core 0.8 %test_region_corech%.osrm
|
||||
%Configuration%\osrm-partition.exe %test_region_mld%.osrm
|
||||
%Configuration%\osrm-customize.exe %test_region_mld%.osrm
|
||||
XCOPY /Y ch\*.* ..\test\data\ch\
|
||||
XCOPY /Y corech\*.* ..\test\data\corech\
|
||||
XCOPY /Y mld\*.* ..\test\data\mld\
|
||||
unit_tests\%Configuration%\library-tests.exe
|
||||
|
||||
:ERROR
|
||||
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -44,7 +44,7 @@ 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)
|
||||
set(LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0)
|
||||
|
||||
if (Lua_FIND_VERSION_EXACT)
|
||||
if (Lua_FIND_VERSION_COUNT GREATER 1)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM debian:stretch-slim as builder
|
||||
FROM debian:bullseye-slim as builder
|
||||
ARG DOCKER_TAG
|
||||
ARG BUILD_CONCURRENCY
|
||||
RUN mkdir -p /src && mkdir -p /opt
|
||||
@ -8,7 +8,7 @@ WORKDIR /src
|
||||
RUN NPROC=${BUILD_CONCURRENCY:-$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)} && \
|
||||
apt-get update && \
|
||||
apt-get -y --no-install-recommends install cmake make git gcc g++ libbz2-dev libxml2-dev \
|
||||
libzip-dev libboost1.62-all-dev lua5.2 liblua5.2-dev libtbb-dev -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 && \
|
||||
libzip-dev libboost1.74-all-dev lua5.2 liblua5.2-dev libtbb-dev -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 && \
|
||||
echo "Building OSRM ${DOCKER_TAG}" && \
|
||||
git show --format="%H" | head -n1 > /opt/OSRM_GITSHA && \
|
||||
echo "Building OSRM gitsha $(cat /opt/OSRM_GITSHA)" && \
|
||||
@ -30,12 +30,13 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(grep -c ^processor /proc/cpuinfo 2>/dev/null ||
|
||||
|
||||
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
|
||||
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
||||
FROM debian:stretch-slim as runstage
|
||||
FROM debian:bullseye-slim as runstage
|
||||
RUN mkdir -p /src && mkdir -p /opt
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends libboost-program-options1.62.0 libboost-regex1.62.0 \
|
||||
libboost-date-time1.62.0 libboost-chrono1.62.0 libboost-filesystem1.62.0 \
|
||||
libboost-iostreams1.62.0 libboost-thread1.62.0 expat liblua5.2-0 libtbb2 &&\
|
||||
apt-get install -y --no-install-recommends libboost-program-options1.74.0 libboost-regex1.74.0 \
|
||||
libboost-date-time1.74.0 libboost-chrono1.74.0 libboost-filesystem1.74.0 \
|
||||
libboost-iostreams1.74.0 libboost-system1.74.0 libboost-thread1.74.0 \
|
||||
expat liblua5.2-0 libtbb2 &&\
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=builder /usr/local /usr/local
|
||||
COPY --from=builder /opt /opt
|
||||
|
||||
16
docs/http.md
16
docs/http.md
@ -299,9 +299,9 @@ curl 'http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397
|
||||
|
||||
- `code` if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `durations` array of arrays that stores the matrix in row-major order. `durations[i][j]` gives the travel time from
|
||||
the i-th waypoint to the j-th waypoint. Values are given in seconds. Can be `null` if no route between `i` and `j` can be found.
|
||||
the i-th source to the j-th destination. Values are given in seconds. Can be `null` if no route between `i` and `j` can be found.
|
||||
- `distances` array of arrays that stores the matrix in row-major order. `distances[i][j]` gives the travel distance from
|
||||
the i-th waypoint to the j-th waypoint. Values are given in meters. Can be `null` if no route between `i` and `j` can be found.
|
||||
the i-th source to the j-th destination. Values are given in meters. Can be `null` if no route between `i` and `j` can be found.
|
||||
- `sources` array of `Waypoint` objects describing all sources in order
|
||||
- `destinations` array of `Waypoint` objects describing all destinations in order
|
||||
- `fallback_speed_cells` (optional) array of arrays containing `i,j` pairs indicating which cells contain estimated values based on `fallback_speed`. Will be absent if `fallback_speed` is not used.
|
||||
@ -762,8 +762,8 @@ step.
|
||||
{ "bearings" : [ 10, 92, 184, 270 ],
|
||||
"lanes" : [
|
||||
{ "indications" : [ "left", "straight" ],
|
||||
"valid" : "false" },
|
||||
{ "valid" : "true",
|
||||
"valid" : false },
|
||||
{ "valid" : true,
|
||||
"indications" : [ "right" ] }
|
||||
],
|
||||
"out" : 2,
|
||||
@ -774,9 +774,9 @@ step.
|
||||
{ "out" : 1,
|
||||
"lanes" : [
|
||||
{ "indications" : [ "straight" ],
|
||||
"valid" : "true" },
|
||||
"valid" : true },
|
||||
{ "indications" : [ "right" ],
|
||||
"valid" : "false" }
|
||||
"valid" : false }
|
||||
],
|
||||
"bearings" : [ 60, 240, 330 ],
|
||||
"in" : 0,
|
||||
@ -884,7 +884,7 @@ A `Lane` represents a turn lane at the corresponding turn location.
|
||||
```json
|
||||
{
|
||||
"indications": ["left", "straight"],
|
||||
"valid": "false"
|
||||
"valid": false
|
||||
}
|
||||
```
|
||||
|
||||
@ -919,7 +919,7 @@ location of the StepManeuver. Further intersections are listed for every cross-w
|
||||
"classes": ["toll", "restricted"],
|
||||
"lanes":{
|
||||
"indications": ["left", "straight"],
|
||||
"valid": "false"
|
||||
"valid": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -244,9 +244,16 @@ osrm.match(options, function(err, response) {
|
||||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `tracepoints` and `matchings`.
|
||||
**`tracepoints`** Array of [`Ẁaypoint`](#waypoint) 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 includes two additional properties, 1) `matchings_index`: Index to the
|
||||
[`Route`](#route) object in matchings the sub-trace was matched to, 2) `waypoint_index`: Index of
|
||||
Each `Waypoint` object has the following additional properties,
|
||||
|
||||
1) `matchings_index`: Index to the
|
||||
[`Route`](#route) object in matchings the sub-trace was matched to,
|
||||
|
||||
2) `waypoint_index`: Index of
|
||||
the waypoint inside the matched route.
|
||||
|
||||
3) `alternatives_count`: Number of probable alternative matchings for this trace point. A value of zero indicate that this point was matched unambiguously. Split the trace at these points for incremental map matching.
|
||||
|
||||
**`matchings`** is an array of [`Route`](#route) objects that assemble the trace. Each `Route` object has an additional `confidence` property,
|
||||
which is the confidence of the matching. float value between `0` and `1`. `1` is very confident that the matching is correct.
|
||||
|
||||
|
||||
@ -50,7 +50,8 @@ We may introduce forward-compatible changes: query parameters and response prope
|
||||
7. Push tags and commits: `git push; git push --tags`
|
||||
8. On https://github.com/Project-OSRM/osrm-backend/releases press `Draft a new release`,
|
||||
write the release tag `vx.y.z` in the `Tag version` field, write the changelog entries in the `Describe this release` field
|
||||
and press `Publish release`.
|
||||
and press `Publish release`. Note that Travis deployments will create a release when publishing node binaries, so the release
|
||||
may already exist. In which case the description should be updated with the changelog entries.
|
||||
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
||||
10. Wait until the travis build has been completed and check if the node binaries were published by doing:
|
||||
`rm -rf node_modules && npm install` locally.
|
||||
|
||||
@ -46,6 +46,18 @@ Feature: Car - Barriers
|
||||
| bollard | rising | x |
|
||||
| bollard | removable | |
|
||||
|
||||
# https://github.com/Project-OSRM/osrm-backend/issues/5996
|
||||
Scenario: Car - Kerb exception for barriers
|
||||
Then routability should be
|
||||
| node/barrier | node/highway | node/kerb | bothw |
|
||||
| kerb | | | |
|
||||
| kerb | crossing | | x |
|
||||
| kerb | crossing | yes | x |
|
||||
| kerb | | lowered | x |
|
||||
| kerb | | flush | x |
|
||||
| kerb | | raised | |
|
||||
| kerb | | yes | |
|
||||
|
||||
Scenario: Car - Height restrictions
|
||||
Then routability should be
|
||||
| node/barrier | node/maxheight | bothw |
|
||||
|
||||
@ -387,217 +387,37 @@ Feature: Car - Turn restrictions
|
||||
| m | p | mj,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - only_right_turn
|
||||
Scenario: Car - Multiple conditional restrictions applicable to same turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d j b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| bj | yes |
|
||||
| jd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | bj | aj | j | only_right_turn @ (Mo-Su 07:00-14:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | bj,aj,aj,jc,jc |
|
||||
| b | a | bj,aj,aj |
|
||||
| b | d | bj,aj,aj,jd,jd |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - No right turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d j b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| bj | yes |
|
||||
| jd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | bj | aj | j | no_right_turn @ (Mo-Fr 07:00-13:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | # |
|
||||
| b | c | bj,jc,jc | normal turn |
|
||||
| b | a | bj,jc,jc,aj,aj | avoids right turn |
|
||||
| b | d | bj,jd,jd | normal maneuver |
|
||||
|
||||
@only_turning @conditionals
|
||||
Scenario: Car - only_left_turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d j b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| bj | yes |
|
||||
| jd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | bj | jc | j | only_left_turn @ (Mo-Fr 07:00-16:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | bj,jc,jc |
|
||||
| b | a | bj,jc,jc,aj,aj |
|
||||
| b | d | bj,jc,jc,jd,jd |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - No left turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d j b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| bj | yes |
|
||||
| jd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | bj | jc | j | no_left_turn @ (Mo-Su 00:00-23:59) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | bj,aj,aj,jc,jc |
|
||||
| b | a | bj,aj,aj |
|
||||
| b | d | bj,jd,jd |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction is off
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d j b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| bj | yes |
|
||||
| jd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | bj | aj | j | no_right_turn @ (Mo-Su 16:00-20:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | bj,jc,jc |
|
||||
| b | a | bj,aj,aj |
|
||||
| b | d | bj,jd,jd |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction is on
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 10am utc, wed
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
d j b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| bj | yes |
|
||||
| jd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | jb | aj | j | no_right_turn @ (Mo-Fr 07:00-14:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| b | c | bj,jc,jc |
|
||||
| b | a | bj,jc,jc,aj,aj |
|
||||
| b | d | bj,jd,jd |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction with multiple time windows
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 5pm Wed 02 May, 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
p |
|
||||
\ |
|
||||
j
|
||||
| \
|
||||
c m
|
||||
|
|
||||
k - l - m
|
||||
|
|
||||
n
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| aj | no |
|
||||
| jc | no |
|
||||
| jp | yes |
|
||||
| mj | yes |
|
||||
| nodes |
|
||||
| kl |
|
||||
| jl |
|
||||
| ln |
|
||||
| lm |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | aj | jp | j | no_right_turn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||
| restriction | kl | lj | l | only_left_turn @ (Sa-Su 07:00-10:30) |
|
||||
| restriction | kl | ln | l | only_right_turn @ (Mo-Fr 07:00-10:30) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | p | aj,jc,jc,jp,jp |
|
||||
| m | p | mj,jp,jp |
|
||||
| k | m | kl,ln,ln,lm,lm |
|
||||
|
||||
|
||||
@restriction-way
|
||||
Scenario: Car - prohibit turn
|
||||
@ -1047,7 +867,7 @@ Feature: Car - Turn restrictions
|
||||
| type | way:from | node:via | way:to | restriction:conditional |
|
||||
| restriction | be | e | de | no_right_turn @ (Mo-Fr 07:00-11:00) |
|
||||
|
||||
# node restrictino is off, way restriction is on
|
||||
# node restriction is off, way restriction is on
|
||||
When I route I should get
|
||||
| from | to | route | turns | locations |
|
||||
| a | d | ab,be,ef,ef,de,de | depart,turn right,turn left,continue uturn,new name straight,arrive | a,b,e,f,e,d |
|
||||
|
||||
1033
features/car/multi_via_restrictions.feature
Normal file
1033
features/car/multi_via_restrictions.feature
Normal file
File diff suppressed because it is too large
Load Diff
@ -798,82 +798,6 @@ Feature: Car - Turn restrictions
|
||||
| from | to | route |
|
||||
| a | d | ab,be,de,de |
|
||||
|
||||
@restriction-way
|
||||
Scenario: Multi Way restriction
|
||||
Given the node map
|
||||
"""
|
||||
k j
|
||||
| |
|
||||
h - - g - f - - e
|
||||
| |
|
||||
| |
|
||||
a - - b - c - - d
|
||||
| |
|
||||
l i
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway |
|
||||
| ab | horiz | yes |
|
||||
| bc | horiz | yes |
|
||||
| cd | horiz | yes |
|
||||
| ef | horiz | yes |
|
||||
| fg | horiz | yes |
|
||||
| gh | horiz | yes |
|
||||
| ic | vert | yes |
|
||||
| cf | vert | yes |
|
||||
| fj | vert | yes |
|
||||
| kg | vert | yes |
|
||||
| gb | vert | yes |
|
||||
| bl | vert | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:via | way:to | restriction |
|
||||
| restriction | ab | bc,cf,fg | gh | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | h | horiz,vert,horiz,horiz |
|
||||
|
||||
@restriction-way
|
||||
Scenario: Multi-Way overlapping single-way
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
|
|
||||
a - b - c - d
|
||||
|
|
||||
f - g
|
||||
|
|
||||
h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | abcd |
|
||||
| bc | abcd |
|
||||
| cd | abcd |
|
||||
| hf | hfb |
|
||||
| fb | hfb |
|
||||
| gf | gf |
|
||||
| ce | ce |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:via | way:to | restriction |
|
||||
| restriction | ab | bc | ce | only_left_turn |
|
||||
| restriction | gf | fb,bc | cd | only_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | locations |
|
||||
| a | d | abcd,ce,ce,abcd,abcd | depart,turn left,continue uturn,turn left,arrive | a,c,e,c,d |
|
||||
| a | e | abcd,ce,ce | depart,turn left,arrive | a,c,e |
|
||||
| a | f | abcd,hfb,hfb | depart,turn right,arrive | a,b,f |
|
||||
| g | e | gf,hfb,abcd,ce,ce | depart,turn right,turn right,turn left,arrive | g,f,b,c,e |
|
||||
| g | d | gf,hfb,abcd,abcd | depart,turn right,turn right,arrive | g,f,b,d |
|
||||
| h | e | hfb,abcd,ce,ce | depart,end of road right,turn left,arrive | h,b,c,e |
|
||||
| h | d | hfb,abcd,abcd | depart,end of road right,arrive | h,b,d |
|
||||
|
||||
|
||||
@restriction-way
|
||||
Scenario: Car - prohibit turn, traffic lights
|
||||
Given the node map
|
||||
@ -984,8 +908,6 @@ Feature: Car - Turn restrictions
|
||||
| restriction | ab | bge | de | no_right_turn |
|
||||
| restriction | bc | bge | ef | no_left_turn |
|
||||
|
||||
# this case is currently not handling the via-way restrictions and we need support for looking across traffic signals.
|
||||
# It is mainly included to show limitations and to prove that we don't crash hard here
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | ab,bge,ef,ef,de,de |
|
||||
|
||||
@ -180,3 +180,30 @@ Feature: Turn Function Information
|
||||
And stdout should contain /roads_on_the_right \[1\] speed: [0-9]+, is_incoming: true, is_outgoing: false, highway_turn_classification: 3, access_turn_classification: 0/
|
||||
# turning abc, give information about about db
|
||||
And stdout should contain /roads_on_the_left \[1\] speed: [0-9]+, is_incoming: true, is_outgoing: false, highway_turn_classification: 0, access_turn_classification: 1/
|
||||
|
||||
Scenario: Turns should have correct information of two-way roads at intersection
|
||||
Given the node map
|
||||
"""
|
||||
b
|
||||
|
|
||||
a-c-d
|
||||
|
|
||||
e
|
||||
"""
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ac | motorway | yes |
|
||||
| cd | motorway_link | yes |
|
||||
| bc | trunk | yes |
|
||||
| cb | trunk_link | yes |
|
||||
| ce | primary | yes |
|
||||
| ec | primary_link | yes |
|
||||
And the data has been saved to disk
|
||||
|
||||
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||
Then it should exit successfully
|
||||
# Turn acd
|
||||
# on the left there should be cb (and bc)
|
||||
And stdout should contain /roads_on_the_left \[1\] speed: [0-9]+, is_incoming: true, is_outgoing: true, highway_turn_classification: [0-9]+, access_turn_classification: 0, priority_class: 3/
|
||||
# on the right there should be ce and ec
|
||||
And stdout should contain /roads_on_the_right \[1\] speed: [0-9]+, is_incoming: true, is_outgoing: true, highway_turn_classification: [0-9]+, access_turn_classification: 0, priority_class: 4/
|
||||
|
||||
@ -114,9 +114,12 @@ module.exports = function() {
|
||||
let dependencies = [
|
||||
this.OSRM_EXTRACT_PATH,
|
||||
this.OSRM_CONTRACT_PATH,
|
||||
this.OSRM_CUSTOMIZE_PATH,
|
||||
this.OSRM_PARTITION_PATH,
|
||||
this.LIB_OSRM_EXTRACT_PATH,
|
||||
this.LIB_OSRM_GUIDANCE_PATH,
|
||||
this.LIB_OSRM_CONTRACT_PATH
|
||||
this.LIB_OSRM_CONTRACT_PATH,
|
||||
this.LIB_OSRM_CUSTOMIZE_PATH,
|
||||
this.LIB_OSRM_PARTITION_PATH
|
||||
];
|
||||
|
||||
var addLuaFiles = (directory, callback) => {
|
||||
|
||||
@ -69,10 +69,13 @@ module.exports = function () {
|
||||
|
||||
this.OSRM_EXTRACT_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-extract', this.EXE));
|
||||
this.OSRM_CONTRACT_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-contract', this.EXE));
|
||||
this.OSRM_CUSTOMIZE_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-customize', this.EXE));
|
||||
this.OSRM_PARTITION_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-partition', this.EXE));
|
||||
this.OSRM_ROUTED_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-routed', this.EXE));
|
||||
this.LIB_OSRM_EXTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_extract'),
|
||||
this.LIB_OSRM_GUIDANCE_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_guidance'),
|
||||
this.LIB_OSRM_CONTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_contract'),
|
||||
this.LIB_OSRM_CUSTOMIZE_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_customize'),
|
||||
this.LIB_OSRM_PARTITION_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_partition'),
|
||||
this.LIB_OSRM_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm');
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
@ -113,7 +116,7 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
var q = d3.queue();
|
||||
[this.OSRM_EXTRACT_PATH, this.OSRM_CONTRACT_PATH, this.OSRM_ROUTED_PATH].forEach(bin => { q.defer(verify, bin); });
|
||||
[this.OSRM_EXTRACT_PATH, this.OSRM_CONTRACT_PATH, this.OSRM_CUSTOMIZE_PATH, this.OSRM_PARTITION_PATH, this.OSRM_ROUTED_PATH].forEach(bin => { q.defer(verify, bin); });
|
||||
q.awaitAll(callback);
|
||||
};
|
||||
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
@routing @testbot @nil
|
||||
Feature: Testbot - Check assigning nil values
|
||||
Scenario: Assign nil values to all way strings
|
||||
Feature: Testbot - Check assigning empty values
|
||||
Scenario: Assign empty values to all way strings
|
||||
Given the profile file
|
||||
"""
|
||||
functions = require('testbot')
|
||||
|
||||
function way_function(profile, way, result)
|
||||
result.name = nil
|
||||
result.ref = nil
|
||||
result.destinations = nil
|
||||
result.exits = nil
|
||||
result.pronunciation = nil
|
||||
result.turn_lanes_forward = nil
|
||||
result.turn_lanes_backward = nil
|
||||
result.name = ""
|
||||
result.ref = ""
|
||||
result.destinations = ""
|
||||
result.exits = ""
|
||||
result.pronunciation = ""
|
||||
result.turn_lanes_forward = ""
|
||||
result.turn_lanes_backward = ""
|
||||
|
||||
result.forward_speed = 10
|
||||
result.backward_speed = 10
|
||||
|
||||
@ -94,7 +94,7 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_,
|
||||
return GraphAndFilter{QueryGraph{num_nodes, std::move(edge_container.edges)},
|
||||
edge_container.MakeEdgeFilters()};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -164,7 +164,7 @@ struct ContractedEdgeContainer
|
||||
std::vector<MergedFlags> flags;
|
||||
std::vector<QueryEdge> edges;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -15,11 +15,11 @@ template <storage::Ownership Ownership> struct ContractedMetric
|
||||
detail::QueryGraph<Ownership> graph;
|
||||
std::vector<util::ViewOrVector<bool, Ownership>> edge_filter;
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
using ContractedMetric = detail::ContractedMetric<storage::Ownership::Container>;
|
||||
using ContractedMetricView = detail::ContractedMetric<storage::Ownership::View>;
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -49,7 +49,7 @@ class Contractor
|
||||
private:
|
||||
ContractorConfig config;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // PROCESSING_CHAIN_HPP
|
||||
|
||||
@ -73,7 +73,7 @@ struct ContractorConfig final : storage::IOConfig
|
||||
//(e.g. 0.8 contracts 80 percent of the hierarchy, leaving a core of 20%)
|
||||
double core_factor;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // EXTRACTOR_OPTIONS_HPP
|
||||
|
||||
@ -125,7 +125,7 @@ struct RangebasedCRC32
|
||||
private:
|
||||
IteratorbasedCRC32 crc32;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* ITERATOR_BASED_CRC32_H */
|
||||
|
||||
@ -52,8 +52,8 @@ inline void writeGraph(const boost::filesystem::path &path,
|
||||
serialization::write(writer, "/ch/metrics/" + pair.first, pair.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace files
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -77,7 +77,7 @@ struct QueryEdge
|
||||
data.distance == right.data.distance);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // QUERYEDGE_HPP
|
||||
|
||||
@ -19,7 +19,7 @@ using QueryGraph = util::StaticGraph<typename QueryEdge::EdgeData, Ownership>;
|
||||
|
||||
using QueryGraph = detail::QueryGraph<storage::Ownership::Container>;
|
||||
using QueryGraphView = detail::QueryGraph<storage::Ownership::View>;
|
||||
}
|
||||
}
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // QUERYEDGE_HPP
|
||||
|
||||
@ -46,8 +46,8 @@ void read(storage::tar::FileReader &reader,
|
||||
metric.edge_filter[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace serialization
|
||||
} // namespace contractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -212,9 +212,8 @@ class CellCustomizer
|
||||
}
|
||||
|
||||
const auto &data = graph.GetEdgeData(edge);
|
||||
if (data.forward &&
|
||||
(first_level ||
|
||||
partition.GetCell(level - 1, node) != partition.GetCell(level - 1, to)))
|
||||
if (data.forward && (first_level || partition.GetCell(level - 1, node) !=
|
||||
partition.GetCell(level - 1, to)))
|
||||
{
|
||||
const EdgeWeight to_weight = weight + data.weight;
|
||||
const EdgeDuration to_duration = duration + data.duration;
|
||||
@ -237,7 +236,7 @@ class CellCustomizer
|
||||
|
||||
const partitioner::MultiLevelPartition &partition;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace customizer
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CELLS_CUSTOMIZER_HPP
|
||||
|
||||
@ -22,11 +22,11 @@ template <storage::Ownership Ownership> struct CellMetricImpl
|
||||
Vector<EdgeDuration> durations;
|
||||
Vector<EdgeDistance> distances;
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
using CellMetric = detail::CellMetricImpl<storage::Ownership::Container>;
|
||||
using CellMetricView = detail::CellMetricImpl<storage::Ownership::View>;
|
||||
}
|
||||
}
|
||||
} // namespace customizer
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ struct CustomizationConfig final : storage::IOConfig
|
||||
|
||||
updater::UpdaterConfig updater_config;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace customizer
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_CUSTOMIZE_CUSTOMIZER_CONFIG_HPP
|
||||
|
||||
@ -34,7 +34,7 @@ template <typename EdgeDataT, storage::Ownership Ownership>
|
||||
void write(storage::tar::FileWriter &writer,
|
||||
const std::string &name,
|
||||
const MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
}
|
||||
} // namespace serialization
|
||||
|
||||
template <typename EdgeDataT, storage::Ownership Ownership>
|
||||
class MultiLevelGraph : public partitioner::MultiLevelGraph<EdgeDataT, Ownership>
|
||||
@ -126,7 +126,7 @@ using MultiLevelEdgeBasedGraph =
|
||||
MultiLevelGraph<EdgeBasedGraphEdgeData, storage::Ownership::Container>;
|
||||
using MultiLevelEdgeBasedGraphView =
|
||||
MultiLevelGraph<EdgeBasedGraphEdgeData, storage::Ownership::View>;
|
||||
}
|
||||
}
|
||||
} // namespace customizer
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -106,8 +106,8 @@ inline void writeGraph(const boost::filesystem::path &path,
|
||||
writer.WriteFrom("/mld/connectivity_checksum", connectivity_checksum);
|
||||
serialization::write(writer, "/mld/multilevelgraph", graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace files
|
||||
} // namespace customizer
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -65,8 +65,8 @@ inline void write(storage::tar::FileWriter &writer,
|
||||
storage::serialization::write(writer, name + "/is_backward_edge", graph.is_backward_edge);
|
||||
storage::serialization::write(writer, name + "/node_to_edge_offset", graph.node_to_edge_offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace serialization
|
||||
} // namespace customizer
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -16,14 +16,14 @@ namespace ch
|
||||
struct Algorithm final
|
||||
{
|
||||
};
|
||||
}
|
||||
} // namespace ch
|
||||
// Multi-Level Dijkstra
|
||||
namespace mld
|
||||
{
|
||||
struct Algorithm final
|
||||
{
|
||||
};
|
||||
}
|
||||
} // namespace mld
|
||||
|
||||
// Algorithm names
|
||||
template <typename AlgorithmT> const char *name();
|
||||
@ -111,8 +111,8 @@ template <> struct HasGetTileTurns<mld::Algorithm> final : std::true_type
|
||||
template <> struct HasExcludeFlags<mld::Algorithm> final : std::true_type
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace routing_algorithms
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -128,8 +128,8 @@ class BaseAPI
|
||||
const BaseParameters ¶meters;
|
||||
};
|
||||
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -92,21 +92,21 @@ struct BaseParameters
|
||||
|
||||
SnappingType snapping = SnappingType::Default;
|
||||
|
||||
BaseParameters(const std::vector<util::Coordinate> coordinates_ = {},
|
||||
const std::vector<boost::optional<Hint>> hints_ = {},
|
||||
BaseParameters(std::vector<util::Coordinate> coordinates_ = {},
|
||||
std::vector<boost::optional<Hint>> hints_ = {},
|
||||
std::vector<boost::optional<double>> radiuses_ = {},
|
||||
std::vector<boost::optional<Bearing>> bearings_ = {},
|
||||
std::vector<boost::optional<Approach>> approaches_ = {},
|
||||
bool generate_hints_ = true,
|
||||
std::vector<std::string> exclude = {},
|
||||
const SnappingType snapping_ = SnappingType::Default)
|
||||
: coordinates(coordinates_), hints(hints_), radiuses(radiuses_), bearings(bearings_),
|
||||
approaches(approaches_), exclude(std::move(exclude)), generate_hints(generate_hints_),
|
||||
snapping(snapping_)
|
||||
: coordinates(std::move(coordinates_)), hints(std::move(hints_)),
|
||||
radiuses(std::move(radiuses_)), bearings(std::move(bearings_)),
|
||||
approaches(std::move(approaches_)), exclude(std::move(exclude)),
|
||||
generate_hints(generate_hints_), snapping(snapping_)
|
||||
{
|
||||
}
|
||||
|
||||
// FIXME add validation for invalid bearing values
|
||||
bool IsValid() const
|
||||
{
|
||||
return (hints.empty() || hints.size() == coordinates.size()) &&
|
||||
@ -115,7 +115,7 @@ struct BaseParameters
|
||||
(approaches.empty() || approaches.size() == coordinates.size()) &&
|
||||
std::all_of(bearings.begin(),
|
||||
bearings.end(),
|
||||
[](const boost::optional<Bearing> bearing_and_range) {
|
||||
[](const boost::optional<Bearing> &bearing_and_range) {
|
||||
if (bearing_and_range)
|
||||
{
|
||||
return bearing_and_range->IsValid();
|
||||
@ -124,8 +124,8 @@ struct BaseParameters
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // ROUTE_PARAMETERS_HPP
|
||||
|
||||
@ -16,8 +16,8 @@ namespace api
|
||||
{
|
||||
using ResultT =
|
||||
mapbox::util::variant<util::json::Object, std::string, flatbuffers::FlatBufferBuilder>;
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -112,8 +112,8 @@ util::json::Object makeRouteLeg(guidance::RouteLeg leg, util::json::Array steps)
|
||||
util::json::Array makeRouteLegs(std::vector<guidance::RouteLeg> legs,
|
||||
std::vector<util::json::Value> step_geometries,
|
||||
std::vector<util::json::Object> annotations);
|
||||
}
|
||||
}
|
||||
} // namespace json
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
|
||||
@ -248,8 +248,8 @@ class MatchAPI final : public RouteAPI
|
||||
const tidy::Result &tidy_result;
|
||||
};
|
||||
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -68,8 +68,11 @@ struct MatchParameters : public RouteParameters
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
MatchParameters(std::vector<unsigned> timestamps_, GapsType gaps_, bool tidy_, Args... args_)
|
||||
: MatchParameters(std::move(timestamps_), gaps_, tidy_, {}, std::forward<Args>(args_)...)
|
||||
MatchParameters(const std::vector<unsigned> ×tamps_,
|
||||
GapsType gaps_,
|
||||
bool tidy_,
|
||||
Args &&... args_)
|
||||
: MatchParameters(timestamps_, gaps_, tidy_, {}, std::forward<Args>(args_)...)
|
||||
{
|
||||
}
|
||||
|
||||
@ -77,10 +80,11 @@ struct MatchParameters : public RouteParameters
|
||||
MatchParameters(std::vector<unsigned> timestamps_,
|
||||
GapsType gaps_,
|
||||
bool tidy_,
|
||||
std::vector<std::size_t> waypoints_,
|
||||
Args... args_)
|
||||
: RouteParameters{std::forward<Args>(args_)..., waypoints_},
|
||||
timestamps{std::move(timestamps_)}, gaps(gaps_), tidy(tidy_)
|
||||
const std::vector<std::size_t> &waypoints_,
|
||||
Args &&... args_)
|
||||
: RouteParameters{std::forward<Args>(args_)..., waypoints_}, timestamps{std::move(
|
||||
timestamps_)},
|
||||
gaps(gaps_), tidy(tidy_)
|
||||
{
|
||||
}
|
||||
|
||||
@ -94,8 +98,8 @@ struct MatchParameters : public RouteParameters
|
||||
(timestamps.empty() || timestamps.size() == coordinates.size());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -200,9 +200,9 @@ inline Result tidy(const MatchParameters ¶ms, Thresholds cfg = {15., 5})
|
||||
return result;
|
||||
}
|
||||
|
||||
} // ns tidy
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace tidy
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -159,8 +159,8 @@ class NearestAPI final : public BaseAPI
|
||||
}
|
||||
};
|
||||
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -52,8 +52,8 @@ struct NearestParameters : public BaseParameters
|
||||
|
||||
bool IsValid() const { return BaseParameters::IsValid() && number_of_results >= 1; }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // ENGINE_API_NEAREST_PARAMETERS_HPP
|
||||
|
||||
@ -988,8 +988,8 @@ class RouteAPI : public BaseAPI
|
||||
}
|
||||
};
|
||||
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -87,19 +87,13 @@ struct RouteParameters : public BaseParameters
|
||||
const GeometriesType geometries_,
|
||||
const OverviewType overview_,
|
||||
const boost::optional<bool> continue_straight_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
// Once we perfectly-forward `args` (see #2990) this constructor can delegate to the one
|
||||
// below.
|
||||
: BaseParameters{std::forward<Args>(args_)...},
|
||||
steps{steps_},
|
||||
alternatives{alternatives_},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u},
|
||||
annotations{false},
|
||||
annotations_type{AnnotationsType::None},
|
||||
geometries{geometries_},
|
||||
overview{overview_},
|
||||
continue_straight{continue_straight_},
|
||||
waypoints()
|
||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{false},
|
||||
annotations_type{AnnotationsType::None}, geometries{geometries_}, overview{overview_},
|
||||
continue_straight{continue_straight_}, waypoints()
|
||||
{
|
||||
}
|
||||
|
||||
@ -111,7 +105,7 @@ struct RouteParameters : public BaseParameters
|
||||
const GeometriesType geometries_,
|
||||
const OverviewType overview_,
|
||||
const boost::optional<bool> continue_straight_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_},
|
||||
annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None},
|
||||
@ -129,12 +123,12 @@ struct RouteParameters : public BaseParameters
|
||||
const GeometriesType geometries_,
|
||||
const OverviewType overview_,
|
||||
const boost::optional<bool> continue_straight_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u},
|
||||
annotations{annotations_ == AnnotationsType::None ? false : true},
|
||||
annotations_type{annotations_}, geometries{geometries_}, overview{overview_},
|
||||
continue_straight{continue_straight_}, waypoints()
|
||||
annotations{annotations_ != AnnotationsType::None}, annotations_type{annotations_},
|
||||
geometries{geometries_}, overview{overview_}, continue_straight{continue_straight_},
|
||||
waypoints()
|
||||
{
|
||||
}
|
||||
|
||||
@ -147,12 +141,12 @@ struct RouteParameters : public BaseParameters
|
||||
const OverviewType overview_,
|
||||
const boost::optional<bool> continue_straight_,
|
||||
std::vector<std::size_t> waypoints_,
|
||||
const Args... args_)
|
||||
const Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_},
|
||||
annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None},
|
||||
geometries{geometries_}, overview{overview_}, continue_straight{continue_straight_},
|
||||
waypoints{waypoints_}
|
||||
geometries{geometries_}, overview{overview_},
|
||||
continue_straight{continue_straight_}, waypoints{std::move(waypoints_)}
|
||||
{
|
||||
}
|
||||
|
||||
@ -165,12 +159,12 @@ struct RouteParameters : public BaseParameters
|
||||
const OverviewType overview_,
|
||||
const boost::optional<bool> continue_straight_,
|
||||
std::vector<std::size_t> waypoints_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u},
|
||||
annotations{annotations_ == AnnotationsType::None ? false : true},
|
||||
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_ !=
|
||||
AnnotationsType::None},
|
||||
annotations_type{annotations_}, geometries{geometries_}, overview{overview_},
|
||||
continue_straight{continue_straight_}, waypoints{waypoints_}
|
||||
continue_straight{continue_straight_}, waypoints{std::move(waypoints_)}
|
||||
{
|
||||
}
|
||||
|
||||
@ -217,8 +211,8 @@ inline RouteParameters::AnnotationsType operator|=(RouteParameters::AnnotationsT
|
||||
{
|
||||
return lhs = lhs | rhs;
|
||||
}
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -407,8 +407,8 @@ class TableAPI final : public BaseAPI
|
||||
const TableParameters ¶meters;
|
||||
};
|
||||
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -85,7 +85,7 @@ struct TableParameters : public BaseParameters
|
||||
template <typename... Args>
|
||||
TableParameters(std::vector<std::size_t> sources_,
|
||||
std::vector<std::size_t> destinations_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, sources{std::move(sources_)},
|
||||
destinations{std::move(destinations_)}
|
||||
{
|
||||
@ -95,7 +95,7 @@ struct TableParameters : public BaseParameters
|
||||
TableParameters(std::vector<std::size_t> sources_,
|
||||
std::vector<std::size_t> destinations_,
|
||||
const AnnotationsType annotations_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, sources{std::move(sources_)},
|
||||
destinations{std::move(destinations_)}, annotations{annotations_}
|
||||
{
|
||||
@ -108,7 +108,7 @@ struct TableParameters : public BaseParameters
|
||||
double fallback_speed_,
|
||||
FallbackCoordinateType fallback_coordinate_type_,
|
||||
double scale_factor_,
|
||||
Args... args_)
|
||||
Args &&... args_)
|
||||
: BaseParameters{std::forward<Args>(args_)...}, sources{std::move(sources_)},
|
||||
destinations{std::move(destinations_)}, fallback_speed{fallback_speed_},
|
||||
fallback_coordinate_type{fallback_coordinate_type_}, annotations{annotations_},
|
||||
@ -122,7 +122,7 @@ struct TableParameters : public BaseParameters
|
||||
if (!BaseParameters::IsValid())
|
||||
return false;
|
||||
|
||||
// Distance Table makes only sense with 2+ coodinates
|
||||
// Distance Table makes only sense with 2+ coordinates
|
||||
if (coordinates.size() < 2)
|
||||
return false;
|
||||
|
||||
@ -166,8 +166,8 @@ inline TableParameters::AnnotationsType &operator|=(TableParameters::Annotations
|
||||
{
|
||||
return lhs = lhs | rhs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // ENGINE_API_TABLE_PARAMETERS_HPP
|
||||
|
||||
@ -70,8 +70,8 @@ struct TileParameters final
|
||||
return valid_x && valid_y && valid_z;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -175,8 +175,8 @@ class TripAPI final : public RouteAPI
|
||||
const TripParameters ¶meters;
|
||||
};
|
||||
|
||||
} // ns api
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -65,8 +65,8 @@ struct TripParameters : public RouteParameters
|
||||
DestinationType destination_,
|
||||
bool roundtrip_,
|
||||
Args &&... args_)
|
||||
: RouteParameters{std::forward<Args>(args_)...}, source{source_}, destination{destination_},
|
||||
roundtrip{roundtrip_}
|
||||
: RouteParameters{std::forward<Args>(args_)...}, source{source_},
|
||||
destination{destination_}, roundtrip{roundtrip_}
|
||||
{
|
||||
}
|
||||
|
||||
@ -76,8 +76,8 @@ struct TripParameters : public RouteParameters
|
||||
|
||||
bool IsValid() const { return RouteParameters::IsValid(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -42,5 +42,5 @@ enum class Approach : std::uint8_t
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace osrm
|
||||
#endif
|
||||
|
||||
@ -38,7 +38,7 @@ using BinaryFromBase64 = boost::archive::iterators::transform_width<
|
||||
8, // get a view of 8 bit
|
||||
6 // from a sequence of 6 bit
|
||||
>;
|
||||
} // ns detail
|
||||
} // namespace detail
|
||||
namespace engine
|
||||
{
|
||||
|
||||
@ -135,7 +135,7 @@ template <typename T> T decodeBase64Bytewise(const std::string &encoded)
|
||||
return x;
|
||||
}
|
||||
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* OSRM_BASE64_HPP */
|
||||
|
||||
@ -46,7 +46,7 @@ inline bool operator==(const Bearing lhs, const Bearing rhs)
|
||||
return lhs.bearing == rhs.bearing && lhs.range == rhs.range;
|
||||
}
|
||||
inline bool operator!=(const Bearing lhs, const Bearing rhs) { return !(lhs == rhs); }
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -142,14 +142,14 @@ class DataWatchdogImpl<AlgorithmT, datafacade::ContiguousInternalMemoryDataFacad
|
||||
storage::SharedRegion *updatable_shared_region;
|
||||
DataFacadeFactory<datafacade::ContiguousInternalMemoryDataFacade, AlgorithmT> facade_factory;
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
// This class monitors the shared memory region that contains the pointers to
|
||||
// the data and layout regions that should be used. This region is updated
|
||||
// once a new dataset arrives.
|
||||
template <typename AlgorithmT, template <typename A> class FacadeT>
|
||||
using DataWatchdog = detail::DataWatchdogImpl<AlgorithmT, FacadeT<AlgorithmT>>;
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -11,7 +11,7 @@ namespace engine
|
||||
using DataFacadeBase = datafacade::ContiguousInternalMemoryDataFacadeBase;
|
||||
template <typename AlgorithmT>
|
||||
using DataFacade = datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT>;
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -99,8 +99,8 @@ template <> class AlgorithmDataFacade<MLD>
|
||||
// searches for a specific edge
|
||||
virtual EdgeID FindEdge(const NodeID from, const NodeID to) const = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace datafacade
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -760,8 +760,8 @@ class ContiguousInternalMemoryDataFacade<MLD> final
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace datafacade
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // CONTIGUOUS_INTERNALMEM_DATAFACADE_HPP
|
||||
|
||||
@ -223,8 +223,8 @@ class BaseDataFacade
|
||||
virtual std::vector<extractor::ManeuverOverride>
|
||||
GetOverridesThatStartAt(const NodeID edge_based_node_id) const = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace datafacade
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // DATAFACADE_BASE_HPP
|
||||
|
||||
@ -70,7 +70,7 @@ template <template <typename A> class FacadeT, typename AlgorithmT> class DataFa
|
||||
"The exclude prefix needs to be a valid data path.");
|
||||
std::size_t index =
|
||||
std::stoi(exclude_prefix.substr(index_begin + 1, exclude_prefix.size()));
|
||||
BOOST_ASSERT(index >= 0 && index < facades.size());
|
||||
BOOST_ASSERT(index < facades.size());
|
||||
facades[index] = std::make_shared<const Facade>(allocator, metric_name, index);
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ template <template <typename A> class FacadeT, typename AlgorithmT> class DataFa
|
||||
std::unordered_map<std::string, extractor::ClassData> name_to_class;
|
||||
const extractor::ProfileProperties *properties = nullptr;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -93,7 +93,7 @@ class WatchingProvider : public DataFacadeProvider<AlgorithmT, FacadeT>
|
||||
return watchdog.Get(params);
|
||||
}
|
||||
};
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
template <typename AlgorithmT>
|
||||
using DataFacadeProvider = detail::DataFacadeProvider<AlgorithmT, DataFacade>;
|
||||
@ -103,7 +103,7 @@ template <typename AlgorithmT>
|
||||
using ImmutableProvider = detail::ImmutableProvider<AlgorithmT, DataFacade>;
|
||||
template <typename AlgorithmT>
|
||||
using ExternalProvider = detail::ExternalProvider<AlgorithmT, DataFacade>;
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -57,7 +57,7 @@ const constexpr std::uint64_t DOUGLAS_PEUCKER_THRESHOLDS[19] = {
|
||||
|
||||
const constexpr auto DOUGLAS_PEUCKER_THRESHOLDS_SIZE =
|
||||
sizeof(DOUGLAS_PEUCKER_THRESHOLDS) / sizeof(*DOUGLAS_PEUCKER_THRESHOLDS);
|
||||
} // ns detail
|
||||
} // namespace detail
|
||||
|
||||
// These functions compute the bitvector of indicating generalized input
|
||||
// points according to the (Ramer-)Douglas-Peucker algorithm.
|
||||
@ -75,7 +75,7 @@ inline std::vector<util::Coordinate> douglasPeucker(const std::vector<util::Coor
|
||||
{
|
||||
return douglasPeucker(begin(geometry), end(geometry), zoom_level);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* DOUGLAS_PEUCKER_HPP_ */
|
||||
|
||||
@ -94,7 +94,7 @@ struct EngineConfig final
|
||||
std::string verbosity;
|
||||
std::string dataset_name;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // SERVER_CONFIG_HPP
|
||||
|
||||
@ -715,7 +715,7 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
|
||||
const CoordinateList &coordinates;
|
||||
DataFacadeT &datafacade;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -167,8 +167,8 @@ inline LegGeometry assembleGeometry(const datafacade::BaseDataFacade &facade,
|
||||
|
||||
return geometry;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace guidance
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -122,7 +122,7 @@ std::array<std::uint32_t, SegmentNumber> summarizeRoute(const datafacade::BaseDa
|
||||
[](const NamedSegment &segment) { return segment.name_id; });
|
||||
return summary;
|
||||
}
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
inline RouteLeg assembleLeg(const datafacade::BaseDataFacade &facade,
|
||||
const std::vector<PathData> &route_data,
|
||||
|
||||
@ -35,7 +35,7 @@ std::pair<short, short> getDepartBearings(const LegGeometry &leg_geometry,
|
||||
std::pair<short, short> getArriveBearings(const LegGeometry &leg_geometry,
|
||||
const PhantomNode &target_node,
|
||||
const bool traversed_in_reverse);
|
||||
} // ns detail
|
||||
} // namespace detail
|
||||
|
||||
inline std::vector<RouteStep> assembleSteps(const datafacade::BaseDataFacade &facade,
|
||||
const std::vector<PathData> &leg_data,
|
||||
|
||||
@ -163,7 +163,7 @@ void combineRouteSteps(RouteStep &step_at_turn_location,
|
||||
void suppressStep(RouteStep &step_at_turn_location, RouteStep &step_after_turn_location);
|
||||
|
||||
} /* namespace guidance */
|
||||
} /* namespace osrm */
|
||||
} // namespace engine
|
||||
} /* namespace osrm */
|
||||
|
||||
#endif /* OSRM_ENGINE_GUIDANCE_COLLAPSE_HPP_ */
|
||||
|
||||
@ -64,8 +64,8 @@ struct LegGeometry
|
||||
return segment_offsets.size() - 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace guidance
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -14,8 +14,8 @@ struct Route
|
||||
double duration;
|
||||
double weight;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace guidance
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -23,8 +23,8 @@ struct RouteLeg
|
||||
std::string summary;
|
||||
std::vector<RouteStep> steps;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace guidance
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -46,5 +46,5 @@ inline StepManeuver getInvalidStepManeuver()
|
||||
|
||||
} // namespace guidance
|
||||
} // namespace engine
|
||||
} // namespace osrmn
|
||||
} // namespace osrm
|
||||
#endif
|
||||
|
||||
@ -67,7 +67,7 @@ static_assert(sizeof(Hint) == 80 + 4, "Hint is bigger than expected");
|
||||
constexpr std::size_t ENCODED_HINT_SIZE = 112;
|
||||
static_assert(ENCODED_HINT_SIZE / 4 * 3 >= sizeof(Hint),
|
||||
"ENCODED_HINT_SIZE does not match size of Hint");
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -173,7 +173,7 @@ inline InternalRouteResult CollapseInternalRouteResult(const InternalRouteResult
|
||||
collapsed.unpacked_path_segments.size());
|
||||
return collapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // RAW_ROUTE_DATA_H
|
||||
|
||||
@ -98,8 +98,8 @@ class BayesClassifier
|
||||
double positive_apriori_probability;
|
||||
double negative_apriori_probability;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace map_matching
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // BAYES_CLASSIFIER_HPP
|
||||
|
||||
@ -137,8 +137,8 @@ template <class CandidateLists> struct HiddenMarkovModel
|
||||
return initial_timestamp;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace map_matching
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // HIDDEN_MARKOV_MODEL
|
||||
|
||||
@ -51,8 +51,8 @@ struct MatchingConfidence
|
||||
private:
|
||||
ClassifierT classifier;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace map_matching
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -19,8 +19,8 @@ struct SubMatching
|
||||
std::vector<unsigned> alternatives_count;
|
||||
double confidence;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace map_matching
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -44,14 +44,15 @@ namespace engine
|
||||
struct PhantomNode
|
||||
{
|
||||
PhantomNode()
|
||||
: forward_segment_id{SPECIAL_SEGMENTID, false},
|
||||
reverse_segment_id{SPECIAL_SEGMENTID, false}, forward_weight(INVALID_EDGE_WEIGHT),
|
||||
reverse_weight(INVALID_EDGE_WEIGHT), forward_weight_offset(0), reverse_weight_offset(0),
|
||||
: forward_segment_id{SPECIAL_SEGMENTID, false}, reverse_segment_id{SPECIAL_SEGMENTID,
|
||||
false},
|
||||
forward_weight(INVALID_EDGE_WEIGHT), reverse_weight(INVALID_EDGE_WEIGHT),
|
||||
forward_weight_offset(0), reverse_weight_offset(0),
|
||||
forward_distance(INVALID_EDGE_DISTANCE), reverse_distance(INVALID_EDGE_DISTANCE),
|
||||
forward_distance_offset(0), reverse_distance_offset(0),
|
||||
forward_duration(MAXIMAL_EDGE_DURATION), reverse_duration(MAXIMAL_EDGE_DURATION),
|
||||
forward_duration_offset(0), reverse_duration_offset(0), fwd_segment_position(0),
|
||||
is_valid_forward_source{false}, is_valid_forward_target{false},
|
||||
forward_duration_offset(0), reverse_duration_offset(0),
|
||||
fwd_segment_position(0), is_valid_forward_source{false}, is_valid_forward_target{false},
|
||||
is_valid_reverse_source{false}, is_valid_reverse_target{false}, bearing(0)
|
||||
|
||||
{
|
||||
@ -109,7 +110,8 @@ struct PhantomNode
|
||||
|
||||
bool IsValid(const unsigned number_of_nodes) const
|
||||
{
|
||||
return location.IsValid() && ((forward_segment_id.id < number_of_nodes) ||
|
||||
return location.IsValid() &&
|
||||
((forward_segment_id.id < number_of_nodes) ||
|
||||
(reverse_segment_id.id < number_of_nodes)) &&
|
||||
((forward_weight != INVALID_EDGE_WEIGHT) ||
|
||||
(reverse_weight != INVALID_EDGE_WEIGHT)) &&
|
||||
@ -234,7 +236,7 @@ struct PhantomNodes
|
||||
PhantomNode source_phantom;
|
||||
PhantomNode target_phantom;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // PHANTOM_NODES_H
|
||||
|
||||
@ -38,8 +38,8 @@ class MatchPlugin : public BasePlugin
|
||||
const int max_locations_map_matching;
|
||||
const double max_radius_map_matching;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // MATCH_HPP
|
||||
|
||||
@ -26,8 +26,8 @@ class NearestPlugin final : public BasePlugin
|
||||
private:
|
||||
const int max_results;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* NEAREST_HPP */
|
||||
|
||||
@ -131,8 +131,10 @@ class BasePlugin
|
||||
return phantom_pair.first;
|
||||
};
|
||||
|
||||
const auto use_closed_phantom = [](
|
||||
const std::pair<PhantomNode, PhantomNode> &phantom_pair) { return phantom_pair.first; };
|
||||
const auto use_closed_phantom =
|
||||
[](const std::pair<PhantomNode, PhantomNode> &phantom_pair) {
|
||||
return phantom_pair.first;
|
||||
};
|
||||
|
||||
const bool every_phantom_is_in_tiny_cc = std::all_of(std::begin(phantom_node_pair_list),
|
||||
std::end(phantom_node_pair_list),
|
||||
@ -388,8 +390,8 @@ class BasePlugin
|
||||
std::to_string(missing_index);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* BASE_PLUGIN_HPP */
|
||||
|
||||
@ -27,8 +27,8 @@ class TablePlugin final : public BasePlugin
|
||||
private:
|
||||
const int max_locations_distance_table;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // TABLE_HPP
|
||||
|
||||
@ -30,8 +30,8 @@ class TilePlugin final : public BasePlugin
|
||||
const api::TileParameters ¶meters,
|
||||
osrm::engine::api::ResultT &pbf_buffer) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* TILEPLUGIN_HPP */
|
||||
|
||||
@ -42,8 +42,8 @@ class TripPlugin final : public BasePlugin
|
||||
const api::TripParameters ¶meters,
|
||||
osrm::engine::api::ResultT &json_result) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // TRIP_HPP
|
||||
|
||||
@ -35,8 +35,8 @@ class ViaRoutePlugin final : public BasePlugin
|
||||
const api::RouteParameters &route_parameters,
|
||||
osrm::engine::api::ResultT &json_result) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace plugins
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // VIA_ROUTE_HPP
|
||||
|
||||
@ -17,7 +17,7 @@ namespace detail
|
||||
std::string encode(std::vector<int> &numbers);
|
||||
std::int32_t decode_polyline_integer(std::string::const_iterator &first,
|
||||
std::string::const_iterator last);
|
||||
}
|
||||
} // namespace detail
|
||||
using CoordVectorForwardIter = std::vector<util::Coordinate>::const_iterator;
|
||||
// Encodes geometry into polyline format.
|
||||
// See: https://developers.google.com/maps/documentation/utilities/polylinealgorithm
|
||||
@ -80,7 +80,7 @@ std::vector<util::Coordinate> decodePolyline(const std::string &polyline)
|
||||
}
|
||||
return coordinates;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif /* POLYLINECOMPRESSOR_H_ */
|
||||
|
||||
@ -230,7 +230,7 @@ inline std::vector<routing_algorithms::TurnData> RoutingAlgorithms<Algorithm>::G
|
||||
return routing_algorithms::getTileTurns(*facade, edges, sorted_edge_indexes);
|
||||
}
|
||||
|
||||
} // ns engine
|
||||
} // ns osrm
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -24,11 +24,10 @@ namespace ch
|
||||
// Stalling
|
||||
template <bool DIRECTION, typename HeapT>
|
||||
bool stallAtNode(const DataFacade<Algorithm> &facade,
|
||||
const NodeID node,
|
||||
const EdgeWeight weight,
|
||||
const typename HeapT::HeapNode &heapNode,
|
||||
const HeapT &query_heap)
|
||||
{
|
||||
for (auto edge : facade.GetAdjacentEdgeRange(node))
|
||||
for (auto edge : facade.GetAdjacentEdgeRange(heapNode.node))
|
||||
{
|
||||
const auto &data = facade.GetEdgeData(edge);
|
||||
if (DIRECTION == REVERSE_DIRECTION ? data.forward : data.backward)
|
||||
@ -36,9 +35,10 @@ bool stallAtNode(const DataFacade<Algorithm> &facade,
|
||||
const NodeID to = facade.GetTarget(edge);
|
||||
const EdgeWeight edge_weight = data.weight;
|
||||
BOOST_ASSERT_MSG(edge_weight > 0, "edge_weight invalid");
|
||||
if (query_heap.WasInserted(to))
|
||||
const auto toHeapNode = query_heap.GetHeapNodeIfWasInserted(to);
|
||||
if (toHeapNode)
|
||||
{
|
||||
if (query_heap.GetKey(to) + edge_weight < weight)
|
||||
if (toHeapNode->weight + edge_weight < heapNode.weight)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -50,11 +50,10 @@ bool stallAtNode(const DataFacade<Algorithm> &facade,
|
||||
|
||||
template <bool DIRECTION>
|
||||
void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
|
||||
const NodeID node,
|
||||
const EdgeWeight weight,
|
||||
const SearchEngineData<Algorithm>::QueryHeap::HeapNode &heapNode,
|
||||
SearchEngineData<Algorithm>::QueryHeap &heap)
|
||||
{
|
||||
for (const auto edge : facade.GetAdjacentEdgeRange(node))
|
||||
for (const auto edge : facade.GetAdjacentEdgeRange(heapNode.node))
|
||||
{
|
||||
const auto &data = facade.GetEdgeData(edge);
|
||||
if (DIRECTION == FORWARD_DIRECTION ? data.forward : data.backward)
|
||||
@ -63,19 +62,21 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
|
||||
const EdgeWeight edge_weight = data.weight;
|
||||
|
||||
BOOST_ASSERT_MSG(edge_weight > 0, "edge_weight invalid");
|
||||
const EdgeWeight to_weight = weight + edge_weight;
|
||||
const EdgeWeight to_weight = heapNode.weight + edge_weight;
|
||||
|
||||
const auto toHeapNode = heap.GetHeapNodeIfWasInserted(to);
|
||||
// New Node discovered -> Add to Heap + Node Info Storage
|
||||
if (!heap.WasInserted(to))
|
||||
if (!toHeapNode)
|
||||
{
|
||||
heap.Insert(to, to_weight, node);
|
||||
heap.Insert(to, to_weight, heapNode.node);
|
||||
}
|
||||
// Found a shorter Path -> Update weight
|
||||
else if (to_weight < heap.GetKey(to))
|
||||
else if (to_weight < toHeapNode->weight)
|
||||
{
|
||||
// new parent
|
||||
heap.GetData(to).parent = node;
|
||||
heap.DecreaseKey(to, to_weight);
|
||||
toHeapNode->data.parent = heapNode.node;
|
||||
toHeapNode->weight = to_weight;
|
||||
heap.DecreaseKey(*toHeapNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -122,35 +123,35 @@ void routingStep(const DataFacade<Algorithm> &facade,
|
||||
const bool force_loop_forward,
|
||||
const bool force_loop_reverse)
|
||||
{
|
||||
const NodeID node = forward_heap.DeleteMin();
|
||||
const EdgeWeight weight = forward_heap.GetKey(node);
|
||||
auto heapNode = forward_heap.DeleteMinGetHeapNode();
|
||||
const auto reverseHeapNode = reverse_heap.GetHeapNodeIfWasInserted(heapNode.node);
|
||||
|
||||
if (reverse_heap.WasInserted(node))
|
||||
if (reverseHeapNode)
|
||||
{
|
||||
const EdgeWeight new_weight = reverse_heap.GetKey(node) + weight;
|
||||
const EdgeWeight new_weight = reverseHeapNode->weight + heapNode.weight;
|
||||
if (new_weight < upper_bound)
|
||||
{
|
||||
// if loops are forced, they are so at the source
|
||||
if ((force_loop_forward && forward_heap.GetData(node).parent == node) ||
|
||||
(force_loop_reverse && reverse_heap.GetData(node).parent == node) ||
|
||||
if ((force_loop_forward && heapNode.data.parent == heapNode.node) ||
|
||||
(force_loop_reverse && reverseHeapNode->data.parent == heapNode.node) ||
|
||||
// in this case we are looking at a bi-directional way where the source
|
||||
// and target phantom are on the same edge based node
|
||||
new_weight < 0)
|
||||
{
|
||||
// check whether there is a loop present at the node
|
||||
for (const auto edge : facade.GetAdjacentEdgeRange(node))
|
||||
for (const auto edge : facade.GetAdjacentEdgeRange(heapNode.node))
|
||||
{
|
||||
const auto &data = facade.GetEdgeData(edge);
|
||||
if (DIRECTION == FORWARD_DIRECTION ? data.forward : data.backward)
|
||||
{
|
||||
const NodeID to = facade.GetTarget(edge);
|
||||
if (to == node)
|
||||
if (to == heapNode.node)
|
||||
{
|
||||
const EdgeWeight edge_weight = data.weight;
|
||||
const EdgeWeight loop_weight = new_weight + edge_weight;
|
||||
if (loop_weight >= 0 && loop_weight < upper_bound)
|
||||
{
|
||||
middle_node_id = node;
|
||||
middle_node_id = heapNode.node;
|
||||
upper_bound = loop_weight;
|
||||
}
|
||||
}
|
||||
@ -161,7 +162,7 @@ void routingStep(const DataFacade<Algorithm> &facade,
|
||||
{
|
||||
BOOST_ASSERT(new_weight >= 0);
|
||||
|
||||
middle_node_id = node;
|
||||
middle_node_id = heapNode.node;
|
||||
upper_bound = new_weight;
|
||||
}
|
||||
}
|
||||
@ -170,19 +171,19 @@ void routingStep(const DataFacade<Algorithm> &facade,
|
||||
// make sure we don't terminate too early if we initialize the weight
|
||||
// for the nodes in the forward heap with the forward/reverse offset
|
||||
BOOST_ASSERT(min_edge_offset <= 0);
|
||||
if (weight + min_edge_offset > upper_bound)
|
||||
if (heapNode.weight + min_edge_offset > upper_bound)
|
||||
{
|
||||
forward_heap.DeleteAll();
|
||||
return;
|
||||
}
|
||||
|
||||
// Stalling
|
||||
if (STALLING && stallAtNode<DIRECTION>(facade, node, weight, forward_heap))
|
||||
if (STALLING && stallAtNode<DIRECTION>(facade, heapNode, forward_heap))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
relaxOutgoingEdges<DIRECTION>(facade, node, weight, forward_heap);
|
||||
relaxOutgoingEdges<DIRECTION>(facade, heapNode, forward_heap);
|
||||
}
|
||||
|
||||
template <bool UseDuration>
|
||||
|
||||
@ -97,7 +97,6 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition,
|
||||
const std::vector<std::size_t> &phantom_indices)
|
||||
{
|
||||
auto min_level = [&partition, node](const PhantomNode &phantom_node) {
|
||||
|
||||
const auto &forward_segment = phantom_node.forward_segment_id;
|
||||
const auto forward_level =
|
||||
forward_segment.enabled ? partition.GetHighestDifferentLevel(node, forward_segment.id)
|
||||
@ -120,7 +119,7 @@ inline LevelID getNodeQueryLevel(const MultiLevelPartition &partition,
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Heaps only record for each node its predecessor ("parent") on the shortest path.
|
||||
// For re-constructing the actual path we need to trace back all parent "pointers".
|
||||
@ -229,40 +228,42 @@ retrievePackedPathFromHeap(const SearchEngineData<Algorithm>::QueryHeap &forward
|
||||
template <bool DIRECTION, typename Algorithm, typename... Args>
|
||||
void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
|
||||
typename SearchEngineData<Algorithm>::QueryHeap &forward_heap,
|
||||
const NodeID node,
|
||||
const EdgeWeight weight,
|
||||
const typename SearchEngineData<Algorithm>::QueryHeap::HeapNode &heapNode,
|
||||
Args... args)
|
||||
{
|
||||
const auto &partition = facade.GetMultiLevelPartition();
|
||||
const auto &cells = facade.GetCellStorage();
|
||||
const auto &metric = facade.GetCellMetric();
|
||||
|
||||
const auto level = getNodeQueryLevel(partition, node, args...);
|
||||
const auto level = getNodeQueryLevel(partition, heapNode.node, args...);
|
||||
|
||||
if (level >= 1 && !forward_heap.GetData(node).from_clique_arc)
|
||||
if (level >= 1 && !heapNode.data.from_clique_arc)
|
||||
{
|
||||
if (DIRECTION == FORWARD_DIRECTION)
|
||||
{
|
||||
// Shortcuts in forward direction
|
||||
const auto &cell = cells.GetCell(metric, level, partition.GetCell(level, node));
|
||||
const auto &cell =
|
||||
cells.GetCell(metric, level, partition.GetCell(level, heapNode.node));
|
||||
auto destination = cell.GetDestinationNodes().begin();
|
||||
for (auto shortcut_weight : cell.GetOutWeight(node))
|
||||
for (auto shortcut_weight : cell.GetOutWeight(heapNode.node))
|
||||
{
|
||||
BOOST_ASSERT(destination != cell.GetDestinationNodes().end());
|
||||
const NodeID to = *destination;
|
||||
|
||||
if (shortcut_weight != INVALID_EDGE_WEIGHT && node != to)
|
||||
if (shortcut_weight != INVALID_EDGE_WEIGHT && heapNode.node != to)
|
||||
{
|
||||
const EdgeWeight to_weight = weight + shortcut_weight;
|
||||
BOOST_ASSERT(to_weight >= weight);
|
||||
if (!forward_heap.WasInserted(to))
|
||||
const EdgeWeight to_weight = heapNode.weight + shortcut_weight;
|
||||
BOOST_ASSERT(to_weight >= heapNode.weight);
|
||||
const auto toHeapNode = forward_heap.GetHeapNodeIfWasInserted(to);
|
||||
if (!toHeapNode)
|
||||
{
|
||||
forward_heap.Insert(to, to_weight, {node, true});
|
||||
forward_heap.Insert(to, to_weight, {heapNode.node, true});
|
||||
}
|
||||
else if (to_weight < forward_heap.GetKey(to))
|
||||
else if (to_weight < toHeapNode->weight)
|
||||
{
|
||||
forward_heap.GetData(to) = {node, true};
|
||||
forward_heap.DecreaseKey(to, to_weight);
|
||||
toHeapNode->data = {heapNode.node, true};
|
||||
toHeapNode->weight = to_weight;
|
||||
forward_heap.DecreaseKey(*toHeapNode);
|
||||
}
|
||||
}
|
||||
++destination;
|
||||
@ -271,25 +272,28 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
|
||||
else
|
||||
{
|
||||
// Shortcuts in backward direction
|
||||
const auto &cell = cells.GetCell(metric, level, partition.GetCell(level, node));
|
||||
const auto &cell =
|
||||
cells.GetCell(metric, level, partition.GetCell(level, heapNode.node));
|
||||
auto source = cell.GetSourceNodes().begin();
|
||||
for (auto shortcut_weight : cell.GetInWeight(node))
|
||||
for (auto shortcut_weight : cell.GetInWeight(heapNode.node))
|
||||
{
|
||||
BOOST_ASSERT(source != cell.GetSourceNodes().end());
|
||||
const NodeID to = *source;
|
||||
|
||||
if (shortcut_weight != INVALID_EDGE_WEIGHT && node != to)
|
||||
if (shortcut_weight != INVALID_EDGE_WEIGHT && heapNode.node != to)
|
||||
{
|
||||
const EdgeWeight to_weight = weight + shortcut_weight;
|
||||
BOOST_ASSERT(to_weight >= weight);
|
||||
if (!forward_heap.WasInserted(to))
|
||||
const EdgeWeight to_weight = heapNode.weight + shortcut_weight;
|
||||
BOOST_ASSERT(to_weight >= heapNode.weight);
|
||||
const auto toHeapNode = forward_heap.GetHeapNodeIfWasInserted(to);
|
||||
if (!toHeapNode)
|
||||
{
|
||||
forward_heap.Insert(to, to_weight, {node, true});
|
||||
forward_heap.Insert(to, to_weight, {heapNode.node, true});
|
||||
}
|
||||
else if (to_weight < forward_heap.GetKey(to))
|
||||
else if (to_weight < toHeapNode->weight)
|
||||
{
|
||||
forward_heap.GetData(to) = {node, true};
|
||||
forward_heap.DecreaseKey(to, to_weight);
|
||||
toHeapNode->data = {heapNode.node, true};
|
||||
toHeapNode->weight = to_weight;
|
||||
forward_heap.DecreaseKey(*toHeapNode);
|
||||
}
|
||||
}
|
||||
++source;
|
||||
@ -298,7 +302,7 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
|
||||
}
|
||||
|
||||
// Boundary edges
|
||||
for (const auto edge : facade.GetBorderEdgeRange(level, node))
|
||||
for (const auto edge : facade.GetBorderEdgeRange(level, heapNode.node))
|
||||
{
|
||||
const auto &edge_data = facade.GetEdgeData(edge);
|
||||
|
||||
@ -311,21 +315,23 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
|
||||
checkParentCellRestriction(partition.GetCell(level + 1, to), args...))
|
||||
{
|
||||
const auto node_weight =
|
||||
facade.GetNodeWeight(DIRECTION == FORWARD_DIRECTION ? node : to);
|
||||
facade.GetNodeWeight(DIRECTION == FORWARD_DIRECTION ? heapNode.node : to);
|
||||
const auto turn_penalty = facade.GetWeightPenaltyForEdgeID(edge_data.turn_id);
|
||||
|
||||
// TODO: BOOST_ASSERT(edge_data.weight == node_weight + turn_penalty);
|
||||
|
||||
const EdgeWeight to_weight = weight + node_weight + turn_penalty;
|
||||
const EdgeWeight to_weight = heapNode.weight + node_weight + turn_penalty;
|
||||
|
||||
if (!forward_heap.WasInserted(to))
|
||||
const auto toHeapNode = forward_heap.GetHeapNodeIfWasInserted(to);
|
||||
if (!toHeapNode)
|
||||
{
|
||||
forward_heap.Insert(to, to_weight, {node, false});
|
||||
forward_heap.Insert(to, to_weight, {heapNode.node, false});
|
||||
}
|
||||
else if (to_weight < forward_heap.GetKey(to))
|
||||
else if (to_weight < toHeapNode->weight)
|
||||
{
|
||||
forward_heap.GetData(to) = {node, false};
|
||||
forward_heap.DecreaseKey(to, to_weight);
|
||||
toHeapNode->data = {heapNode.node, false};
|
||||
toHeapNode->weight = to_weight;
|
||||
forward_heap.DecreaseKey(*toHeapNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -342,34 +348,35 @@ void routingStep(const DataFacade<Algorithm> &facade,
|
||||
const bool force_loop_reverse,
|
||||
Args... args)
|
||||
{
|
||||
const auto node = forward_heap.DeleteMin();
|
||||
const auto weight = forward_heap.GetKey(node);
|
||||
const auto heapNode = forward_heap.DeleteMinGetHeapNode();
|
||||
const auto weight = heapNode.weight;
|
||||
|
||||
BOOST_ASSERT(!facade.ExcludeNode(node));
|
||||
BOOST_ASSERT(!facade.ExcludeNode(heapNode.node));
|
||||
|
||||
// Upper bound for the path source -> target with
|
||||
// weight(source -> node) = weight weight(to -> target) ≤ reverse_weight
|
||||
// is weight + reverse_weight
|
||||
// More tighter upper bound requires additional condition reverse_heap.WasRemoved(to)
|
||||
// with weight(to -> target) = reverse_weight and all weights ≥ 0
|
||||
if (reverse_heap.WasInserted(node))
|
||||
const auto reverseHeapNode = reverse_heap.GetHeapNodeIfWasInserted(heapNode.node);
|
||||
if (reverseHeapNode)
|
||||
{
|
||||
auto reverse_weight = reverse_heap.GetKey(node);
|
||||
auto reverse_weight = reverseHeapNode->weight;
|
||||
auto path_weight = weight + reverse_weight;
|
||||
|
||||
// MLD uses loops forcing only to prune single node paths in forward and/or
|
||||
// backward direction (there is no need to force loops in MLD but in CH)
|
||||
if (!(force_loop_forward && forward_heap.GetData(node).parent == node) &&
|
||||
!(force_loop_reverse && reverse_heap.GetData(node).parent == node) &&
|
||||
if (!(force_loop_forward && heapNode.data.parent == heapNode.node) &&
|
||||
!(force_loop_reverse && reverseHeapNode->data.parent == heapNode.node) &&
|
||||
(path_weight >= 0) && (path_weight < path_upper_bound))
|
||||
{
|
||||
middle_node = node;
|
||||
middle_node = heapNode.node;
|
||||
path_upper_bound = path_weight;
|
||||
}
|
||||
}
|
||||
|
||||
// Relax outgoing edges from node
|
||||
relaxOutgoingEdges<DIRECTION>(facade, forward_heap, node, weight, args...);
|
||||
relaxOutgoingEdges<DIRECTION>(facade, forward_heap, heapNode, args...);
|
||||
}
|
||||
|
||||
// With (s, middle, t) we trace back the paths middle -> s and middle -> t.
|
||||
|
||||
@ -226,7 +226,7 @@ inline void initializeHeap<mld::Algorithm>(SearchEngineData<mld::Algorithm> &eng
|
||||
const auto border_nodes_number = facade.GetMaxBorderNodeID() + 1;
|
||||
engine_working_data.InitializeOrClearFirstThreadLocalStorage(nodes_number, border_nodes_number);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
template <typename Algorithm>
|
||||
InternalRouteResult shortestPathSearch(SearchEngineData<Algorithm> &engine_working_data,
|
||||
|
||||
@ -120,7 +120,7 @@ template <> struct SearchEngineData<routing_algorithms::mld::Algorithm>
|
||||
void InitializeOrClearManyToManyThreadLocalStorage(unsigned number_of_nodes,
|
||||
unsigned number_of_boundary_nodes);
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // SEARCH_ENGINE_DATA_HPP
|
||||
|
||||
@ -42,7 +42,7 @@ enum class Status
|
||||
Ok,
|
||||
Error
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -92,8 +92,8 @@ std::vector<NodeID> NearestNeighbourTrip(const NodeIDIterator &start,
|
||||
}
|
||||
return route;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace trip
|
||||
} // namespace engine
|
||||
} // namespace osrm
|
||||
|
||||
#endif // TRIP_NEAREST_NEIGHBOUR_HPP
|
||||
|
||||
@ -33,7 +33,7 @@ inline bool isValidClassName(const std::string &name)
|
||||
return std::isalnum(c);
|
||||
}) == name.end();
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace extractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@ -82,7 +82,7 @@ class CompressedEdgeContainer
|
||||
std::unordered_map<EdgeID, unsigned> m_reverse_edge_id_to_zipped_index_map;
|
||||
std::unique_ptr<SegmentDataContainer> segment_data;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace extractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // GEOMETRY_COMPRESSOR_HPP_
|
||||
|
||||
@ -14,7 +14,7 @@ struct CompressedNodeBasedGraphEdge
|
||||
NodeID source;
|
||||
NodeID target;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace extractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif // OSRM_EXTRACTOR_COMPRESSED_NODE_BASED_GRAPH_EDGE_HPP
|
||||
|
||||
@ -42,7 +42,7 @@ class Datasources
|
||||
std::array<std::uint32_t, MAX_NUM_SOURES> lengths;
|
||||
std::array<char, MAX_LENGTH_NAME * MAX_NUM_SOURES> sources;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace extractor
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user