Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 46f0aa4051 | |||
| 3be0c11958 | |||
| 8cb8e642ba | |||
| 7848f9950a | |||
| f48bfdf159 | |||
| 0c9b23f4ff | |||
| 12163b0be9 | |||
| 7c1f0bf62f | |||
| 182ad13a60 | |||
| 1e7e4ff786 | |||
| 67fca9fb80 | |||
| 99b3e8fc87 | |||
| bac4f12c77 | |||
| c340430697 | |||
| 044080d96a | |||
| aea0d88f87 | |||
| ad08b15fbb | |||
| fe0d56085e | |||
| c39dc2ee0d | |||
| 5d6468f8e7 | |||
| cc0eeb2cc7 | |||
| 9ed9d6cfcd | |||
| c127194b26 | |||
| a463bbb769 | |||
| df5da66b8f | |||
| 48e8382785 | |||
| 22c8a3dd2a | |||
| d5564cc127 | |||
| c061337650 | |||
| 34617619bb | |||
| a67ef6f166 | |||
| ce6c050d73 | |||
| b6431944c4 | |||
| 022e950067 | |||
| 7e2b7d4742 | |||
| b59fff2d62 | |||
| 8190a30b72 | |||
| 66df8f5148 | |||
| ae0913d811 | |||
| 6a8ff7874f | |||
| b85f235d08 | |||
| 56ccb1ec7e | |||
| 17e1c04136 | |||
| ad047741b7 | |||
| b76dbfb9cc | |||
| 4897275562 | |||
| 6ec17cfd95 | |||
| cbed6bd44d | |||
| e578e6d912 | |||
| 2c40141a70 | |||
| 9ecc91e1e9 | |||
| 822c373113 | |||
| 165853a114 | |||
| becfd8a56d | |||
| 96543393f7 | |||
| 1d06531a55 | |||
| 4f5825f2d1 | |||
| f638b0478b | |||
| b7f0a1f482 | |||
| fec9a42132 | |||
| 2293d13c4c | |||
| 69ef347fe6 | |||
| dcd4ddb052 | |||
| ab519aae79 | |||
| ac89b85a33 | |||
| 8871c9054b | |||
| 910719819b | |||
| ac3cac7cbc | |||
| a885dff707 | |||
| 893c0d7d1d | |||
| 324e4eecc6 | |||
| dd6cf93527 | |||
| 3af3b11c7d | |||
| e67e9ea808 | |||
| 5359a7774e | |||
| 8983956fa1 | |||
| 4f1c62a768 | |||
| 09a716a9e5 | |||
| 676f6d4704 | |||
| f636dbfd44 | |||
| 5f67e715af | |||
| 203314b1aa | |||
| e5e25a1aca | |||
| 84f12c7c6d | |||
| 7802f86bd6 | |||
| 43afec3b39 | |||
| 2da7ca5338 |
@@ -31,8 +31,6 @@ jobs:
|
||||
BUILD_TYPE: Release
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: pip install "conan<2.0.0"
|
||||
- run: conan --version
|
||||
- run: cmake --version
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
@@ -51,6 +49,12 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
python3 -m venv .venv
|
||||
source .venv/Scripts/Activate
|
||||
python3 -m pip install conan==2.7.1
|
||||
conan profile detect --force
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
|
||||
cmake --build . --config Release
|
||||
|
||||
@@ -393,10 +397,10 @@ jobs:
|
||||
- name: Enable Conan cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.conan
|
||||
key: v9-conan-${{ matrix.name }}-${{ github.sha }}
|
||||
path: ~/.conan2
|
||||
key: v10-conan-${{ matrix.name }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
v9-conan-${{ matrix.name }}-
|
||||
v10-conan-${{ matrix.name }}-
|
||||
- name: Enable test cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -457,8 +461,6 @@ jobs:
|
||||
|
||||
- name: Install dev dependencies
|
||||
run: |
|
||||
python3 -m pip install "conan<2.0.0" || python3 -m pip install "conan<2.0.0" --break-system-packages
|
||||
|
||||
# workaround for issue that GitHub Actions seems to not adding it to PATH after https://github.com/actions/runner-images/pull/6499
|
||||
# and that's why CI cannot find conan executable installed above
|
||||
if [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||
@@ -495,13 +497,6 @@ jobs:
|
||||
tar zxvf onetbb.tgz
|
||||
sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/
|
||||
sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/
|
||||
- name: Add Clang 18 to list of Conan compilers # workaround for the issue that Conan 1.x doesn't know about Clang 18
|
||||
if: ${{ matrix.ENABLE_CONAN == 'ON' && matrix.CCOMPILER == 'clang-18' }}
|
||||
run: |
|
||||
sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq
|
||||
|
||||
conan config init
|
||||
yq eval '.compiler.clang.version += ["18"]' -i "$HOME/.conan/settings.yml"
|
||||
- name: Prepare build
|
||||
run: |
|
||||
mkdir ${OSRM_BUILD_DIR}
|
||||
@@ -523,7 +518,14 @@ jobs:
|
||||
run: |
|
||||
echo "Using ${JOBS} jobs"
|
||||
pushd ${OSRM_BUILD_DIR}
|
||||
|
||||
|
||||
if [[ "${ENABLE_CONAN}" == "ON" ]]; then
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python3 -m pip install conan==2.7.1
|
||||
conan profile detect --force
|
||||
fi
|
||||
|
||||
ccache --zero-stats
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_CONAN=${ENABLE_CONAN:-OFF} \
|
||||
@@ -537,6 +539,7 @@ jobs:
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DENABLE_LTO=${ENABLE_LTO:-ON} \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
|
||||
make --jobs=${JOBS}
|
||||
|
||||
if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then
|
||||
@@ -551,7 +554,7 @@ jobs:
|
||||
fi
|
||||
popd
|
||||
- name: Build example
|
||||
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }}
|
||||
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' && matrix.ENABLE_CONAN != 'ON' }}
|
||||
run: |
|
||||
mkdir example/build && pushd example/build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
@@ -563,8 +566,10 @@ jobs:
|
||||
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
|
||||
if [[ "${ENABLE_CONAN}" == "OFF" ]]; then
|
||||
export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}
|
||||
./example/build/osrm-example test/data/mld/monaco.osrm
|
||||
fi
|
||||
|
||||
# All tests assume to be run from the build directory
|
||||
pushd ${OSRM_BUILD_DIR}
|
||||
@@ -653,7 +658,7 @@ jobs:
|
||||
benchmarks:
|
||||
if: github.event_name == 'pull_request'
|
||||
needs: [format-taginfo-docs]
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: self-hosted
|
||||
env:
|
||||
CCOMPILER: clang-16
|
||||
CXXCOMPILER: clang++-16
|
||||
@@ -664,37 +669,17 @@ jobs:
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
|
||||
steps:
|
||||
- name: Enable data.osm.pbf cache
|
||||
if: ${{ ! env.RUN_BIG_BENCHMARK }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/data.osm.pbf
|
||||
key: v1-data-osm-pbf
|
||||
restore-keys: |
|
||||
v1-data-osm-pbf
|
||||
- name: Enable compiler cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: v1-ccache-benchmarks-${{ github.sha }}
|
||||
restore-keys: |
|
||||
v1-ccache-benchmarks-
|
||||
- name: Enable Conan cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.conan
|
||||
key: v1-conan-benchmarks-${{ github.sha }}
|
||||
restore-keys: |
|
||||
v1-conan-benchmarks-
|
||||
- name: Checkout PR Branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
path: pr
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4" --break-system-packages
|
||||
sudo apt-get update -y && sudo apt-get install ccache
|
||||
- name: Activate virtualenv
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
echo PATH=$PATH >> $GITHUB_ENV
|
||||
pip install "conan==2.7.1" "requests==2.31.0" "numpy==1.26.4"
|
||||
- name: Prepare data
|
||||
run: |
|
||||
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
|
||||
@@ -722,50 +707,67 @@ jobs:
|
||||
path: base
|
||||
- name: Build Base Branch
|
||||
run: |
|
||||
cd base
|
||||
npm ci --ignore-scripts
|
||||
cd ..
|
||||
mkdir base/build
|
||||
cd base/build
|
||||
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) benchmarks
|
||||
cd ..
|
||||
make -C test/data
|
||||
- name: Build PR Branch
|
||||
run: |
|
||||
cd pr
|
||||
npm ci --ignore-scripts
|
||||
cd ..
|
||||
mkdir -p pr/build
|
||||
cd pr/build
|
||||
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) benchmarks
|
||||
cd ..
|
||||
make -C test/data
|
||||
# we run benchmarks in tmpfs to avoid impact of disk IO
|
||||
- name: Create folder for tmpfs
|
||||
run: mkdir -p /opt/benchmarks
|
||||
run: |
|
||||
# if by any chance it was mounted before(e.g. due to previous job failed), unmount it
|
||||
sudo umount ~/benchmarks | true
|
||||
rm -rf ~/benchmarks
|
||||
mkdir -p ~/benchmarks
|
||||
# see https://llvm.org/docs/Benchmarking.html
|
||||
- name: Run PR Benchmarks
|
||||
run: |
|
||||
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
||||
cp -rf pr/build /opt/benchmarks/build
|
||||
mkdir -p /opt/benchmarks/test
|
||||
cp -rf pr/test/data /opt/benchmarks/test/data
|
||||
cp -rf pr/profiles /opt/benchmarks/profiles
|
||||
sudo cset shield -c 2-3 -k on
|
||||
sudo mount -t tmpfs -o size=4g none ~/benchmarks
|
||||
cp -rf pr/build ~/benchmarks/build
|
||||
cp -rf pr/lib ~/benchmarks/lib
|
||||
mkdir -p ~/benchmarks/test
|
||||
cp -rf pr/test/data ~/benchmarks/test/data
|
||||
cp -rf pr/profiles ~/benchmarks/profiles
|
||||
|
||||
./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
||||
sudo umount /opt/benchmarks
|
||||
sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
||||
sudo umount ~/benchmarks
|
||||
sudo cset shield --reset
|
||||
- name: Run Base Benchmarks
|
||||
run: |
|
||||
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
||||
cp -rf base/build /opt/benchmarks/build
|
||||
mkdir -p /opt/benchmarks/test
|
||||
cp -rf base/test/data /opt/benchmarks/test/data
|
||||
cp -rf base/profiles /opt/benchmarks/profiles
|
||||
sudo cset shield -c 2-3 -k on
|
||||
sudo mount -t tmpfs -o size=4g none ~/benchmarks
|
||||
cp -rf base/build ~/benchmarks/build
|
||||
cp -rf base/lib ~/benchmarks/lib
|
||||
mkdir -p ~/benchmarks/test
|
||||
cp -rf base/test/data ~/benchmarks/test/data
|
||||
cp -rf base/profiles ~/benchmarks/profiles
|
||||
|
||||
# TODO: remove it when base branch will have this file at needed location
|
||||
if [ ! -f /opt/benchmarks/test/data/portugal_to_korea.json ]; then
|
||||
cp base/src/benchmarks/portugal_to_korea.json /opt/benchmarks/test/data/portugal_to_korea.json
|
||||
if [ ! -f ~/benchmarks/test/data/portugal_to_korea.json ]; then
|
||||
cp base/src/benchmarks/portugal_to_korea.json ~/benchmarks/test/data/portugal_to_korea.json
|
||||
fi
|
||||
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
|
||||
./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
||||
sudo umount /opt/benchmarks
|
||||
sudo cset shield --exec -- cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
||||
sudo umount ~/benchmarks
|
||||
sudo cset shield --reset
|
||||
- name: Post Benchmark Results
|
||||
run: |
|
||||
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Unreleased
|
||||
- Changes from 5.27.1
|
||||
- Features
|
||||
- ADDED: Route pedestrians over highway=platform [#6993](https://github.com/Project-OSRM/osrm-backend/pull/6993)
|
||||
- REMOVED: Remove all core-CH left-overs [#6920](https://github.com/Project-OSRM/osrm-backend/pull/6920)
|
||||
- ADDED: Add support for a keepalive_timeout flag. [#6674](https://github.com/Project-OSRM/osrm-backend/pull/6674)
|
||||
- ADDED: Add support for a default_radius flag. [#6575](https://github.com/Project-OSRM/osrm-backend/pull/6575)
|
||||
@@ -24,6 +25,7 @@
|
||||
- NodeJS:
|
||||
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
|
||||
- Misc:
|
||||
- CHANGED: Migrate to Conan 2.x. [#7042](https://github.com/Project-OSRM/osrm-backend/pull/7042)
|
||||
- CHANGED: Use thread_local instead of boost::thread_specific_ptr. [#6991](https://github.com/Project-OSRM/osrm-backend/pull/6991)
|
||||
- CHANGED: Bump flatbuffers to v24.3.25 version. [#6988](https://github.com/Project-OSRM/osrm-backend/pull/6988)
|
||||
- CHANGED: Add .reserve(...) to assembleGeometry function. [#6983](https://github.com/Project-OSRM/osrm-backend/pull/6983)
|
||||
@@ -78,6 +80,7 @@
|
||||
- ADDED: Extract prerelease/build information from package semver [#6839](https://github.com/Project-OSRM/osrm-backend/pull/6839)
|
||||
- Profiles:
|
||||
- FIXED: Bicycle and foot profiles now don't route on proposed ways [#6615](https://github.com/Project-OSRM/osrm-backend/pull/6615)
|
||||
- ADDED: Add optional support of cargo bike exclusion and width to bicyle profile [#7044](https://github.com/Project-OSRM/osrm-backend/pull/7044)
|
||||
- Routing:
|
||||
- FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419)
|
||||
- FIXED: Correctly handle compressed traffic signals. [#6724](https://github.com/Project-OSRM/osrm-backend/pull/6724)
|
||||
|
||||
+86
-109
@@ -37,6 +37,29 @@ option(ENABLE_NODE_BINDINGS "Build NodeJs bindings" OFF)
|
||||
option(ENABLE_CLANG_TIDY "Enables clang-tidy checks" OFF)
|
||||
|
||||
|
||||
if (ENABLE_CONAN)
|
||||
message(STATUS "Installing Conan packages. It may take a while...")
|
||||
find_program(CONAN_EXECUTABLE NAMES conan)
|
||||
|
||||
if (NOT CONAN_EXECUTABLE)
|
||||
message(FATAL_ERROR "Conan not found! Please install Conan 2.x and try again.")
|
||||
else()
|
||||
set(CMAKE_TOOLCHAIN_FILE "./conan_toolchain.cmake")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CONAN_EXECUTABLE} install .. --output-folder=. --build=missing --settings compiler.cppstd=20 --settings build_type=${CMAKE_BUILD_TYPE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
OUTPUT_VARIABLE conan_stdout
|
||||
ERROR_VARIABLE conan_stderr
|
||||
RESULT_VARIABLE conan_install_result
|
||||
)
|
||||
|
||||
if (NOT conan_install_result EQUAL 0)
|
||||
message(FATAL_ERROR "Conan install failed: ${conan_install_result}. Stderr: ${conan_stderr}. Stdout: ${conan_stdout}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_CLANG_TIDY)
|
||||
find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
|
||||
if(NOT CLANG_TIDY_COMMAND)
|
||||
@@ -321,116 +344,75 @@ if (MSVC)
|
||||
add_definitions(-DBOOST_ALL_NO_LIB)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CONAN)
|
||||
message(STATUS "Installing dependencies via Conan")
|
||||
|
||||
# Conan will generate Find*.cmake files to build directory, so we use them with the highest priority
|
||||
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_BINARY_DIR})
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${CMAKE_BINARY_DIR})
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/conan.cmake)
|
||||
|
||||
conan_check(REQUIRED)
|
||||
|
||||
set(CONAN_BOOST_VERSION "1.85.0@#14265ec82b25d91305bbb3b30d3357f8")
|
||||
set(CONAN_BZIP2_VERSION "1.0.8@#d1b2d5816f25865acf978501dff1f897")
|
||||
set(CONAN_EXPAT_VERSION "2.6.2@#2d385d0d50eb5561006a7ff9e356656b")
|
||||
set(CONAN_LUA_VERSION "5.4.6@#658d6089093cf01992c2737ab2e96763")
|
||||
set(CONAN_TBB_VERSION "2021.12.0@#e56e5b44be8d690530585dd3634c0106")
|
||||
|
||||
set(CONAN_SYSTEM_INCLUDES ON)
|
||||
|
||||
|
||||
set(CONAN_ARGS
|
||||
REQUIRES
|
||||
"boost/${CONAN_BOOST_VERSION}"
|
||||
"bzip2/${CONAN_BZIP2_VERSION}"
|
||||
"expat/${CONAN_EXPAT_VERSION}"
|
||||
"lua/${CONAN_LUA_VERSION}"
|
||||
"onetbb/${CONAN_TBB_VERSION}"
|
||||
BASIC_SETUP
|
||||
GENERATORS cmake_find_package json # json generator generates a conanbuildinfo.json in the build folder so (non-CMake) projects can easily parse OSRM's dependencies
|
||||
KEEP_RPATHS
|
||||
NO_OUTPUT_DIRS
|
||||
OPTIONS boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it
|
||||
BUILD missing
|
||||
)
|
||||
|
||||
# Enable revisions in the conan config
|
||||
execute_process(COMMAND ${CONAN_CMD} config set general.revisions_enabled=1 RESULT_VARIABLE RET_CODE)
|
||||
if(NOT "${RET_CODE}" STREQUAL "0")
|
||||
message(FATAL_ERROR "Error setting revisions for Conan: '${RET_CODE}'")
|
||||
endif()
|
||||
|
||||
# explicitly say Conan to use x86 dependencies if build for x86 platforms (https://github.com/conan-io/cmake-conan/issues/141)
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
conan_cmake_run("${CONAN_ARGS};ARCH;x86")
|
||||
# cross-compilation for Apple Silicon
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
conan_cmake_run("${CONAN_ARGS};ARCH;armv8")
|
||||
else()
|
||||
conan_cmake_run("${CONAN_ARGS}")
|
||||
endif()
|
||||
|
||||
add_dependency_includes(${CONAN_INCLUDE_DIRS_BOOST})
|
||||
add_dependency_includes(${CONAN_INCLUDE_DIRS_BZIP2})
|
||||
add_dependency_includes(${CONAN_INCLUDE_DIRS_EXPAT})
|
||||
add_dependency_includes(${CONAN_INCLUDE_DIRS_LUA})
|
||||
add_dependency_includes(${CONAN_INCLUDE_DIRS_TBB})
|
||||
|
||||
if (ENABLE_CONAN)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
set(Boost_DATE_TIME_LIBRARY "${Boost_date_time_LIB_TARGETS}")
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY "${Boost_program_options_LIB_TARGETS}")
|
||||
set(Boost_IOSTREAMS_LIBRARY "${Boost_iostreams_LIB_TARGETS}")
|
||||
set(Boost_THREAD_LIBRARY "${Boost_thread_LIB_TARGETS}")
|
||||
set(Boost_ZLIB_LIBRARY "${Boost_zlib_LIB_TARGETS}")
|
||||
set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "${Boost_unit_test_framework_LIB_TARGETS}")
|
||||
|
||||
|
||||
find_package(BZip2 REQUIRED)
|
||||
find_package(EXPAT REQUIRED)
|
||||
find_package(lua REQUIRED)
|
||||
set(LUA_LIBRARIES ${lua_LIBRARIES})
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
find_package(EXPAT REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
find_package(Lua 5.2 REQUIRED)
|
||||
|
||||
|
||||
# note: we avoid calling find_package(Osmium ...) here to ensure that the
|
||||
# expat and bzip2 are used from conan rather than the system
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include)
|
||||
else()
|
||||
find_package(Boost 1.70 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
add_dependency_includes(${Boost_INCLUDE_DIRS})
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
set(BOOST_BASE_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_ENGINE_LIBRARIES ${Boost_LIBRARIES})
|
||||
|
||||
add_dependency_includes(${TBB_INCLUDE_DIR})
|
||||
set(TBB_LIBRARIES TBB::tbb)
|
||||
set(TBB_LIBRARIES ${TBB_LIBRARIES})
|
||||
|
||||
find_package(EXPAT REQUIRED)
|
||||
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
||||
add_dependency_includes(${expat_INCLUDE_DIRS})
|
||||
set(EXPAT_LIBRARIES ${expat_LIBRARIES})
|
||||
set(EXPAT_INCLUDE_DIRS ${expat_INCLUDE_DIRS})
|
||||
|
||||
find_package(BZip2 REQUIRED)
|
||||
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
||||
|
||||
find_package(Lua 5.2 REQUIRED)
|
||||
set(LUA_LIBRARIES lua::lua)
|
||||
if (LUA_FOUND)
|
||||
message(STATUS "Using Lua ${LUA_VERSION_STRING}")
|
||||
endif()
|
||||
|
||||
add_dependency_includes(${lua_INCLUDE_DIRS})
|
||||
|
||||
# note: we avoid calling find_package(Osmium ...) here to ensure that the
|
||||
# expat and bzip2 are used from conan rather than the system
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include)
|
||||
|
||||
else()
|
||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
find_package(TBB REQUIRED)
|
||||
find_package(EXPAT REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
find_package(Lua 5.2 REQUIRED)
|
||||
|
||||
add_dependency_includes(${Boost_INCLUDE_DIRS})
|
||||
add_dependency_includes(${TBB_INCLUDE_DIR})
|
||||
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
||||
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
||||
add_dependency_includes(${LUA_INCLUDE_DIR})
|
||||
|
||||
set(TBB_LIBRARIES TBB::tbb)
|
||||
|
||||
set(BOOST_BASE_LIBRARIES
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_IOSTREAMS_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY})
|
||||
|
||||
set(BOOST_ENGINE_LIBRARIES
|
||||
${Boost_ZLIB_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${BOOST_BASE_LIBRARIES})
|
||||
|
||||
# add a target to generate API documentation with Doxygen
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||
)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
# note libosmium depends on expat and bzip2
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/cmake")
|
||||
if(NOT OSMIUM_INCLUDE_DIR)
|
||||
@@ -440,6 +422,8 @@ else()
|
||||
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
# prefix compilation with ccache by default if available and on clang or gcc
|
||||
if(ENABLE_CCACHE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
@@ -454,6 +438,7 @@ endif()
|
||||
# to ensure that osrm binaries play well with other binaries like nodejs
|
||||
find_package(ZLIB REQUIRED)
|
||||
add_dependency_includes(${ZLIB_INCLUDE_DIRS})
|
||||
set(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
|
||||
|
||||
add_dependency_defines(-DBOOST_SPIRIT_USE_PHOENIX_V3)
|
||||
add_dependency_defines(-DBOOST_RESULT_OF_USE_DECLTYPE)
|
||||
@@ -464,15 +449,6 @@ add_dependency_defines(-DBOOST_PHOENIX_STL_TUPLE_H_)
|
||||
add_definitions(${OSRM_DEFINES})
|
||||
include_directories(SYSTEM ${DEPENDENCIES_INCLUDE_DIRS})
|
||||
|
||||
set(BOOST_BASE_LIBRARIES
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_IOSTREAMS_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY})
|
||||
|
||||
set(BOOST_ENGINE_LIBRARIES
|
||||
${Boost_ZLIB_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${BOOST_BASE_LIBRARIES})
|
||||
|
||||
# Binaries
|
||||
target_link_libraries(osrm-datastore osrm_store ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
@@ -505,10 +481,10 @@ set(PARTITIONER_LIBRARIES
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES}
|
||||
${ZLIB_LIBRARY})
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(CUSTOMIZER_LIBRARIES
|
||||
${BOOST_ENGINE_LIBRARIES}
|
||||
${ZLIB_LIBRARY}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
@@ -676,16 +652,17 @@ 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)
|
||||
|
||||
# Boost uses imported targets, we need to use a generator expression to extract
|
||||
# the link libraries to be written to the pkg-config file.
|
||||
# Conan & TBB define dependencies as CMake targets too, that's why we do the same for them.
|
||||
foreach(engine_lib ${ENGINE_LIBRARIES})
|
||||
if("${engine_lib}" MATCHES "^Boost.*" OR "${engine_lib}" MATCHES "^CONAN_LIB.*" OR "${engine_lib}" MATCHES "^TBB.*")
|
||||
list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "$<TARGET_LINKER_FILE:${engine_lib}>")
|
||||
else()
|
||||
list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "${engine_lib}")
|
||||
endif()
|
||||
endforeach(engine_lib)
|
||||
|
||||
if (NOT ENABLE_CONAN)
|
||||
foreach(engine_lib ${ENGINE_LIBRARIES})
|
||||
if("${engine_lib}" MATCHES "^boost.*" OR "${engine_lib}" MATCHES "^TBB.*")
|
||||
list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "$<TARGET_LINKER_FILE:${engine_lib}>")
|
||||
else()
|
||||
list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "${engine_lib}")
|
||||
endif()
|
||||
endforeach(engine_lib)
|
||||
endif()
|
||||
|
||||
JOIN("${PKGCONFIG_DEPENDENT_LIBRARIES}" " " PKGCONFIG_OSRM_DEPENDENT_LIBRARIES)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig.in pkgconfig.configured @ONLY)
|
||||
|
||||
-1026
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
|
||||
|
||||
class OsrmConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = "CMakeDeps"
|
||||
|
||||
def requirements(self):
|
||||
self.requires("boost/1.85.0")
|
||||
self.requires("bzip2/1.0.8")
|
||||
self.requires("expat/2.6.2")
|
||||
self.requires("lua/5.4.6")
|
||||
self.requires("onetbb/2021.12.0")
|
||||
if self.settings.os == "Windows":
|
||||
self.requires("zlib/1.3.1")
|
||||
|
||||
def configure(self):
|
||||
self.options["boost"].without_python = True
|
||||
self.options["boost"].without_coroutine = True
|
||||
self.options["boost"].without_stacktrace = True
|
||||
self.options["boost"].without_cobalt = True
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
tc.variables["CMAKE_CXX_STANDARD"] = "20"
|
||||
tc.generate()
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
@@ -12,7 +12,7 @@ endif()
|
||||
|
||||
project(osrm-example C CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
|
||||
@@ -26,7 +26,15 @@ Feature: Foot - Access tags on ways
|
||||
| motorway | no | | |
|
||||
| motorway | no | yes | x |
|
||||
| motorway | no | no | |
|
||||
|
||||
| platform | | | x |
|
||||
| platform | | yes | x |
|
||||
| platform | | no | |
|
||||
| platform | yes | | x |
|
||||
| platform | yes | yes | x |
|
||||
| platform | yes | no | |
|
||||
| platform | no | | |
|
||||
| platform | no | yes | x |
|
||||
| platform | no | no | |
|
||||
|
||||
Scenario: Foot - Overwriting implied acccess on ways
|
||||
Then routability should be
|
||||
|
||||
@@ -603,6 +603,8 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
auto found_range = std::equal_range(
|
||||
m_maneuver_overrides.begin(), m_maneuver_overrides.end(), edge_based_node_id, Comp{});
|
||||
|
||||
results.reserve(std::distance(found_range.first, found_range.second));
|
||||
|
||||
std::for_each(found_range.first,
|
||||
found_range.second,
|
||||
[&](const auto &override)
|
||||
|
||||
@@ -11,46 +11,6 @@ namespace osrm::util
|
||||
namespace bearing
|
||||
{
|
||||
|
||||
inline std::string get(const double heading)
|
||||
{
|
||||
BOOST_ASSERT(heading >= 0);
|
||||
BOOST_ASSERT(heading <= 360);
|
||||
|
||||
if (heading <= 22.5)
|
||||
{
|
||||
return "N";
|
||||
}
|
||||
if (heading <= 67.5)
|
||||
{
|
||||
return "NE";
|
||||
}
|
||||
if (heading <= 112.5)
|
||||
{
|
||||
return "E";
|
||||
}
|
||||
if (heading <= 157.5)
|
||||
{
|
||||
return "SE";
|
||||
}
|
||||
if (heading <= 202.5)
|
||||
{
|
||||
return "S";
|
||||
}
|
||||
if (heading <= 247.5)
|
||||
{
|
||||
return "SW";
|
||||
}
|
||||
if (heading <= 292.5)
|
||||
{
|
||||
return "W";
|
||||
}
|
||||
if (heading <= 337.5)
|
||||
{
|
||||
return "NW";
|
||||
}
|
||||
return "N";
|
||||
}
|
||||
|
||||
// Checks whether A is between B-range and B+range, all modulo 360
|
||||
// e.g. A = 5, B = 5, range = 10 == true
|
||||
// A = -6, B = 5, range = 10 == false
|
||||
|
||||
@@ -2,43 +2,13 @@
|
||||
#define OSRM_UTIL_BIT_RANGE_HPP
|
||||
|
||||
#include "util/msb.hpp"
|
||||
|
||||
#include <bit>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
|
||||
namespace osrm::util
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename T> std::size_t countOnes(T value)
|
||||
{
|
||||
static_assert(std::is_unsigned<T>::value, "Only unsigned types allowed");
|
||||
std::size_t number_of_ones = 0;
|
||||
while (value > 0)
|
||||
{
|
||||
auto index = msb(value);
|
||||
value = value & ~(T{1} << index);
|
||||
number_of_ones++;
|
||||
}
|
||||
return number_of_ones;
|
||||
}
|
||||
|
||||
#if (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__))
|
||||
inline std::size_t countOnes(std::uint8_t value)
|
||||
{
|
||||
return __builtin_popcount(std::uint32_t{value});
|
||||
}
|
||||
inline std::size_t countOnes(std::uint16_t value)
|
||||
{
|
||||
return __builtin_popcount(std::uint32_t{value});
|
||||
}
|
||||
inline std::size_t countOnes(unsigned int value) { return __builtin_popcount(value); }
|
||||
inline std::size_t countOnes(unsigned long value) { return __builtin_popcountl(value); }
|
||||
inline std::size_t countOnes(unsigned long long value) { return __builtin_popcountll(value); }
|
||||
#endif
|
||||
} // namespace detail
|
||||
|
||||
// Investigate if we can replace this with
|
||||
// http://www.boost.org/doc/libs/1_64_0/libs/dynamic_bitset/dynamic_bitset.html
|
||||
template <typename DataT>
|
||||
@@ -70,7 +40,7 @@ class BitIterator : public boost::iterator_facade<BitIterator<DataT>,
|
||||
|
||||
difference_type distance_to(const BitIterator &other) const
|
||||
{
|
||||
return detail::countOnes(m_value) - detail::countOnes(other.m_value);
|
||||
return std::popcount(m_value) - std::popcount(other.m_value);
|
||||
}
|
||||
|
||||
bool equal(const BitIterator &other) const { return m_value == other.m_value; }
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define MEMINFO_HPP
|
||||
|
||||
#include "util/log.hpp"
|
||||
#include <cstddef>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/resource.h>
|
||||
@@ -10,22 +11,31 @@
|
||||
namespace osrm::util
|
||||
{
|
||||
|
||||
inline void DumpMemoryStats()
|
||||
inline size_t PeakRAMUsedInBytes()
|
||||
{
|
||||
#ifndef _WIN32
|
||||
rusage usage;
|
||||
getrusage(RUSAGE_SELF, &usage);
|
||||
#ifdef __linux__
|
||||
// Under linux, ru.maxrss is in kb
|
||||
util::Log() << "RAM: peak bytes used: " << usage.ru_maxrss * 1024;
|
||||
return usage.ru_maxrss * 1024;
|
||||
#else // __linux__
|
||||
// Under BSD systems (OSX), it's in bytes
|
||||
util::Log() << "RAM: peak bytes used: " << usage.ru_maxrss;
|
||||
return usage.ru_maxrss;
|
||||
#endif // __linux__
|
||||
#else // _WIN32
|
||||
return 0;
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
inline void DumpMemoryStats()
|
||||
{
|
||||
#ifndef _WIN32
|
||||
util::Log() << "RAM: peak bytes used: " << PeakRAMUsedInBytes();
|
||||
#else // _WIN32
|
||||
util::Log() << "RAM: peak bytes used: <not implemented on Windows>";
|
||||
#endif // _WIN32
|
||||
}
|
||||
} // namespace osrm::util
|
||||
|
||||
#endif
|
||||
#endif
|
||||
+7
-33
@@ -1,50 +1,24 @@
|
||||
#ifndef OSRM_UTIL_MSB_HPP
|
||||
#define OSRM_UTIL_MSB_HPP
|
||||
|
||||
#include <bit>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <climits>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <limits>
|
||||
|
||||
namespace osrm::util
|
||||
{
|
||||
|
||||
// get the msb of an integer
|
||||
// return 0 for integers without msb
|
||||
template <typename T> std::size_t msb(T value)
|
||||
{
|
||||
BOOST_ASSERT(value > 0);
|
||||
|
||||
static_assert(std::is_integral<T>::value && !std::is_signed<T>::value, "Integer required.");
|
||||
std::size_t msb = 0;
|
||||
while (value > 0)
|
||||
{
|
||||
value >>= 1u;
|
||||
msb++;
|
||||
}
|
||||
BOOST_ASSERT(msb > 0);
|
||||
return msb - 1;
|
||||
constexpr auto MSB_INDEX = std::numeric_limits<unsigned char>::digits * sizeof(T) - 1;
|
||||
|
||||
return MSB_INDEX - std::countl_zero(value);
|
||||
}
|
||||
|
||||
#if (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__))
|
||||
inline std::size_t msb(unsigned long long v)
|
||||
{
|
||||
BOOST_ASSERT(v > 0);
|
||||
constexpr auto MSB_INDEX = CHAR_BIT * sizeof(unsigned long long) - 1;
|
||||
return MSB_INDEX - __builtin_clzll(v);
|
||||
}
|
||||
inline std::size_t msb(unsigned long v)
|
||||
{
|
||||
BOOST_ASSERT(v > 0);
|
||||
constexpr auto MSB_INDEX = CHAR_BIT * sizeof(unsigned long) - 1;
|
||||
return MSB_INDEX - __builtin_clzl(v);
|
||||
}
|
||||
inline std::size_t msb(unsigned int v)
|
||||
{
|
||||
BOOST_ASSERT(v > 0);
|
||||
constexpr auto MSB_INDEX = CHAR_BIT * sizeof(unsigned int) - 1;
|
||||
return MSB_INDEX - __builtin_clz(v);
|
||||
}
|
||||
#endif
|
||||
} // namespace osrm::util
|
||||
|
||||
#endif
|
||||
|
||||
Generated
+12
-1
@@ -10,7 +10,8 @@
|
||||
"hasInstallScript": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@mapbox/node-pre-gyp": "^1.0.11"
|
||||
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||
"seedrandom": "^3.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.18.10",
|
||||
@@ -14652,6 +14653,11 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"devOptional": true
|
||||
},
|
||||
"node_modules/seedrandom": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
|
||||
"integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||
@@ -30296,6 +30302,11 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"devOptional": true
|
||||
},
|
||||
"seedrandom": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
|
||||
"integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||
|
||||
+7
-4
@@ -4,7 +4,8 @@
|
||||
"private": false,
|
||||
"description": "The Open Source Routing Machine is a high performance routing engine written in C++ designed to run on OpenStreetMap data.",
|
||||
"dependencies": {
|
||||
"@mapbox/node-pre-gyp": "^1.0.11"
|
||||
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||
"seedrandom": "^3.0.5"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
@@ -57,6 +58,7 @@
|
||||
"jsonpath": "^1.1.1",
|
||||
"mkdirp": "^0.5.6",
|
||||
"node-addon-api": "^5.0.0",
|
||||
"node-cmake": "^2.5.1",
|
||||
"node-timeout": "0.0.4",
|
||||
"polyline": "^0.2.0",
|
||||
"request": "^2.88.2",
|
||||
@@ -64,12 +66,13 @@
|
||||
"tape": "^4.16.0",
|
||||
"turf": "^3.0.14",
|
||||
"uglify-js": "^3.17.0",
|
||||
"xmlbuilder": "^4.2.1",
|
||||
"node-cmake": "^2.5.1"
|
||||
"xmlbuilder": "^4.2.1"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"binary": {
|
||||
"napi_versions": [8],
|
||||
"napi_versions": [
|
||||
8
|
||||
],
|
||||
"module_name": "node_osrm",
|
||||
"module_path": "./lib/binding_napi_v{napi_build_version}/",
|
||||
"host": "https://github.com",
|
||||
|
||||
@@ -35,6 +35,10 @@ function setup()
|
||||
turn_bias = 1.4,
|
||||
use_public_transport = true,
|
||||
|
||||
-- Exclude narrow ways, in particular to route with cargo bike
|
||||
width = nil, -- Cargo bike could 0.5 width, in meters
|
||||
exclude_cargo_bike = false,
|
||||
|
||||
allowed_start_modes = Set {
|
||||
mode.cycling,
|
||||
mode.pushing_bike
|
||||
@@ -243,6 +247,27 @@ function process_node(profile, node, result)
|
||||
end
|
||||
end
|
||||
|
||||
if profile.exclude_cargo_bike then
|
||||
local cargo_bike = node:get_value_by_key("cargo_bike")
|
||||
if cargo_bike and cargo_bike == "no" then
|
||||
result.barrier = true
|
||||
end
|
||||
end
|
||||
|
||||
-- width
|
||||
if profile.width then
|
||||
-- From barrier=cycle_barrier or other barriers
|
||||
local maxwidth_physical = node:get_value_by_key("maxwidth:physical")
|
||||
local maxwidth_physical_meter = maxwidth_physical and Measure.parse_value_meters(maxwidth_physical) or 99
|
||||
local opening = node:get_value_by_key("opening")
|
||||
local opening_meter = opening and Measure.parse_value_meters(opening) or 99
|
||||
local width_meter = math.min(maxwidth_physical_meter, opening_meter)
|
||||
|
||||
if width_meter and width_meter < profile.width then
|
||||
result.barrier = true
|
||||
end
|
||||
end
|
||||
|
||||
-- check if node is a traffic light
|
||||
result.traffic_lights = TrafficSignal.get_value(node)
|
||||
end
|
||||
@@ -299,6 +324,8 @@ function handle_bicycle_tags(profile,way,result,data)
|
||||
|
||||
bike_push_handler(profile,way,result,data)
|
||||
|
||||
-- width should be after bike_push
|
||||
width_handler(profile,way,result,data)
|
||||
|
||||
-- maxspeed
|
||||
limit( result, data.maxspeed, data.maxspeed_forward, data.maxspeed_backward )
|
||||
@@ -453,6 +480,27 @@ function cycleway_handler(profile,way,result,data)
|
||||
end
|
||||
end
|
||||
|
||||
function width_handler(profile,way,result,data)
|
||||
if profile.exclude_cargo_bike then
|
||||
local cargo_bike = way:get_value_by_key("cargo_bike")
|
||||
if cargo_bike and cargo_bike == "no" then
|
||||
result.forward_mode = mode.inaccessible
|
||||
result.backward_mode = mode.inaccessible
|
||||
end
|
||||
end
|
||||
|
||||
if profile.width then
|
||||
local width = way:get_value_by_key("width")
|
||||
if width then
|
||||
local width_meter = Measure.parse_value_meters(width)
|
||||
if width_meter and width_meter < profile.width then
|
||||
result.forward_mode = mode.inaccessible
|
||||
result.backward_mode = mode.inaccessible
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function bike_push_handler(profile,way,result,data)
|
||||
-- pushing bikes - if no other mode found
|
||||
if result.forward_mode == mode.inaccessible or result.backward_mode == mode.inaccessible or
|
||||
|
||||
@@ -90,6 +90,7 @@ function setup()
|
||||
path = walking_speed,
|
||||
steps = walking_speed,
|
||||
pedestrian = walking_speed,
|
||||
platform = walking_speed,
|
||||
footway = walking_speed,
|
||||
pier = walking_speed,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const readline = require('readline');
|
||||
const seedrandom = require('seedrandom');
|
||||
|
||||
|
||||
let RNG;
|
||||
|
||||
class GPSData {
|
||||
constructor(gpsTracesFilePath) {
|
||||
this.tracks = {};
|
||||
this.coordinates = [];
|
||||
this.trackIds = [];
|
||||
this._loadGPSTraces(gpsTracesFilePath);
|
||||
}
|
||||
|
||||
_loadGPSTraces(gpsTracesFilePath) {
|
||||
const expandedPath = path.resolve(gpsTracesFilePath);
|
||||
const data = fs.readFileSync(expandedPath, 'utf-8');
|
||||
const lines = data.split('\n');
|
||||
const headers = lines[0].split(',');
|
||||
|
||||
const latitudeIndex = headers.indexOf('Latitude');
|
||||
const longitudeIndex = headers.indexOf('Longitude');
|
||||
const trackIdIndex = headers.indexOf('TrackID');
|
||||
|
||||
for (let i = 1; i < lines.length; i++) {
|
||||
if (lines[i].trim() === '') continue;
|
||||
const row = lines[i].split(',');
|
||||
|
||||
const latitude = parseFloat(row[latitudeIndex]);
|
||||
const longitude = parseFloat(row[longitudeIndex]);
|
||||
const trackId = row[trackIdIndex];
|
||||
|
||||
const coord = [longitude, latitude];
|
||||
this.coordinates.push(coord);
|
||||
|
||||
if (!this.tracks[trackId]) {
|
||||
this.tracks[trackId] = [];
|
||||
}
|
||||
this.tracks[trackId].push(coord);
|
||||
}
|
||||
|
||||
this.trackIds = Object.keys(this.tracks);
|
||||
}
|
||||
|
||||
getRandomCoordinate() {
|
||||
const randomIndex = Math.floor(RNG() * this.coordinates.length);
|
||||
return this.coordinates[randomIndex];
|
||||
}
|
||||
|
||||
getRandomTrack() {
|
||||
const randomIndex = Math.floor(RNG() * this.trackIds.length);
|
||||
const trackId = this.trackIds[randomIndex];
|
||||
return this.tracks[trackId];
|
||||
}
|
||||
};
|
||||
|
||||
async function runOSRMMethod(osrm, method, coordinates) {
|
||||
const time = await new Promise((resolve, reject) => {
|
||||
const startTime = process.hrtime();
|
||||
osrm[method]({coordinates}, (err, result) => {
|
||||
if (err) {
|
||||
if (['NoSegment', 'NoMatch', 'NoRoute', 'NoTrips'].includes(err.message)) {
|
||||
resolve(null);
|
||||
} else {
|
||||
|
||||
reject(err);
|
||||
}
|
||||
} else {
|
||||
const endTime = process.hrtime(startTime);
|
||||
resolve(endTime[0] + endTime[1] / 1e9);
|
||||
}
|
||||
});
|
||||
});
|
||||
return time;
|
||||
}
|
||||
|
||||
async function nearest(osrm, gpsData) {
|
||||
const times = [];
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
const coord = gpsData.getRandomCoordinate();
|
||||
times.push(await runOSRMMethod(osrm, 'nearest', [coord]));
|
||||
}
|
||||
return times;
|
||||
}
|
||||
|
||||
async function route(osrm, gpsData) {
|
||||
const times = [];
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
const from = gpsData.getRandomCoordinate();
|
||||
const to = gpsData.getRandomCoordinate();
|
||||
|
||||
|
||||
times.push(await runOSRMMethod(osrm, 'route', [from, to]));
|
||||
}
|
||||
return times;
|
||||
}
|
||||
|
||||
async function table(osrm, gpsData) {
|
||||
const times = [];
|
||||
for (let i = 0; i < 250; i++) {
|
||||
const numPoints = Math.floor(RNG() * 3) + 15;
|
||||
const coordinates = [];
|
||||
for (let i = 0; i < numPoints; i++) {
|
||||
coordinates.push(gpsData.getRandomCoordinate());
|
||||
}
|
||||
|
||||
|
||||
times.push(await runOSRMMethod(osrm, 'table', coordinates));
|
||||
}
|
||||
return times;
|
||||
}
|
||||
|
||||
async function match(osrm, gpsData) {
|
||||
const times = [];
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
const numPoints = Math.floor(RNG() * 50) + 50;
|
||||
const coordinates = gpsData.getRandomTrack().slice(0, numPoints);
|
||||
|
||||
|
||||
times.push(await runOSRMMethod(osrm, 'match', coordinates));
|
||||
}
|
||||
return times;
|
||||
}
|
||||
|
||||
async function trip(osrm, gpsData) {
|
||||
const times = [];
|
||||
for (let i = 0; i < 250; i++) {
|
||||
const numPoints = Math.floor(RNG() * 2) + 5;
|
||||
const coordinates = [];
|
||||
for (let i = 0; i < numPoints; i++) {
|
||||
coordinates.push(gpsData.getRandomCoordinate());
|
||||
}
|
||||
|
||||
|
||||
times.push(await runOSRMMethod(osrm, 'trip', coordinates));
|
||||
}
|
||||
return times;
|
||||
}
|
||||
|
||||
function bootstrapConfidenceInterval(data, numSamples = 1000, confidenceLevel = 0.95) {
|
||||
let means = [];
|
||||
let dataLength = data.length;
|
||||
|
||||
for (let i = 0; i < numSamples; i++) {
|
||||
let sample = [];
|
||||
for (let j = 0; j < dataLength; j++) {
|
||||
let randomIndex = Math.floor(RNG() * dataLength);
|
||||
sample.push(data[randomIndex]);
|
||||
}
|
||||
let sampleMean = sample.reduce((a, b) => a + b, 0) / sample.length;
|
||||
means.push(sampleMean);
|
||||
}
|
||||
|
||||
means.sort((a, b) => a - b);
|
||||
let lowerBoundIndex = Math.floor((1 - confidenceLevel) / 2 * numSamples);
|
||||
let upperBoundIndex = Math.floor((1 + confidenceLevel) / 2 * numSamples);
|
||||
let mean = means.reduce((a, b) => a + b, 0) / means.length;
|
||||
let lowerBound = means[lowerBoundIndex];
|
||||
let upperBound = means[upperBoundIndex];
|
||||
|
||||
return { mean: mean, lowerBound: lowerBound, upperBound: upperBound };
|
||||
}
|
||||
|
||||
function calculateConfidenceInterval(data) {
|
||||
let { mean, lowerBound, upperBound } = bootstrapConfidenceInterval(data);
|
||||
let bestValue = Math.max(...data);
|
||||
let errorMargin = (upperBound - lowerBound) / 2;
|
||||
|
||||
return { mean, errorMargin, bestValue };
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
const {OSRM} = require(args[0]);
|
||||
const path = args[1];
|
||||
const algorithm = args[2].toUpperCase();
|
||||
const method = args[3];
|
||||
const gpsTracesFilePath = args[4];
|
||||
const iterations = parseInt(args[5]);
|
||||
|
||||
const gpsData = new GPSData(gpsTracesFilePath);
|
||||
const osrm = new OSRM({path, algorithm});
|
||||
|
||||
|
||||
const functions = {
|
||||
route: route,
|
||||
table: table,
|
||||
nearest: nearest,
|
||||
match: match,
|
||||
trip: trip
|
||||
};
|
||||
const func = functions[method];
|
||||
if (!func) {
|
||||
throw new Error('Unknown method');
|
||||
}
|
||||
const allTimes = [];
|
||||
for (let i = 0; i < iterations; i++) {
|
||||
RNG = seedrandom(42);
|
||||
allTimes.push((await func(osrm, gpsData)).filter(t => t !== null));
|
||||
}
|
||||
|
||||
const opsPerSec = allTimes.map(times => times.length / times.reduce((a, b) => a + b, 0));
|
||||
const { mean, errorMargin, bestValue } = calculateConfidenceInterval(opsPerSec);
|
||||
console.log(`Ops: ${mean.toFixed(1)} ± ${errorMargin.toFixed(1)} ops/s. Best: ${bestValue.toFixed(1)} ops/s`);
|
||||
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -53,6 +53,7 @@ function run_benchmarks_for_folder {
|
||||
mkdir -p $RESULTS_FOLDER
|
||||
|
||||
BENCHMARKS_FOLDER="$BINARIES_FOLDER/src/benchmarks"
|
||||
|
||||
echo "Running match-bench MLD"
|
||||
$BENCHMARKS_FOLDER/match-bench "$FOLDER/test/data/mld/monaco.osrm" mld > "$RESULTS_FOLDER/match_mld.bench"
|
||||
echo "Running match-bench CH"
|
||||
@@ -81,6 +82,18 @@ function run_benchmarks_for_folder {
|
||||
echo "Running osrm-contract"
|
||||
measure_peak_ram_and_time "$BINARIES_FOLDER/osrm-contract $FOLDER/data.osrm" "$RESULTS_FOLDER/osrm_contract.bench"
|
||||
|
||||
|
||||
for ALGORITHM in ch mld; do
|
||||
for BENCH in nearest table trip route match; do
|
||||
echo "Running node $BENCH $ALGORITHM"
|
||||
START=$(date +%s.%N)
|
||||
node $SCRIPTS_FOLDER/scripts/ci/bench.js $FOLDER/lib/binding/node_osrm.node $FOLDER/data.osrm $ALGORITHM $BENCH $GPS_TRACES > "$RESULTS_FOLDER/node_${BENCH}_${ALGORITHM}.bench" 5
|
||||
END=$(date +%s.%N)
|
||||
DIFF=$(echo "$END - $START" | bc)
|
||||
echo "Took: ${DIFF}s"
|
||||
done
|
||||
done
|
||||
|
||||
for ALGORITHM in ch mld; do
|
||||
for BENCH in nearest table trip route match; do
|
||||
echo "Running random $BENCH $ALGORITHM"
|
||||
|
||||
@@ -10,7 +10,7 @@ set -o nounset
|
||||
# http://git.661346.n2.nabble.com/subtree-merges-lose-prefix-after-rebase-td7332850.html
|
||||
|
||||
OSMIUM_PATH="osmcode/libosmium"
|
||||
OSMIUM_TAG=v2.14.0
|
||||
OSMIUM_TAG=v2.20.0
|
||||
|
||||
SOL_PATH="ThePhD/sol2"
|
||||
SOL_TAG=v3.3.0
|
||||
@@ -22,7 +22,7 @@ MICROTAR_PATH="rxi/microtar"
|
||||
MICROTAR_TAG=v0.1.0
|
||||
|
||||
PROTOZERO_PATH="mapbox/protozero"
|
||||
PROTOZERO_TAG=v1.6.2
|
||||
PROTOZERO_TAG=v1.7.1
|
||||
|
||||
VTZERO_PATH="mapbox/vtzero"
|
||||
VTZERO_TAG=v1.1.0
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "osrm/osrm.hpp"
|
||||
#include "osrm/status.hpp"
|
||||
|
||||
#include "util/meminfo.hpp"
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
@@ -655,6 +655,12 @@ try
|
||||
std::cerr << "Unknown benchmark: " << benchmarkToRun << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
std::cout << "Peak RAM: " << std::setprecision(3)
|
||||
<< static_cast<double>(osrm::util::PeakRAMUsedInBytes()) /
|
||||
static_cast<double>((1024 * 1024))
|
||||
<< "MB" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
|
||||
@@ -222,7 +222,6 @@ oneToManySearch(SearchEngineData<Algorithm> &engine_working_data,
|
||||
std::vector<EdgeDuration> durations_table(target_indices.size(), MAXIMAL_EDGE_DURATION);
|
||||
std::vector<EdgeDistance> distances_table(calculate_distance ? target_indices.size() : 0,
|
||||
MAXIMAL_EDGE_DISTANCE);
|
||||
std::vector<NodeID> middle_nodes_table(target_indices.size(), SPECIAL_NODEID);
|
||||
|
||||
// Collect destination (source) nodes into a map
|
||||
std::unordered_multimap<NodeID, std::tuple<std::size_t, EdgeWeight, EdgeDuration, EdgeDistance>>
|
||||
@@ -307,7 +306,6 @@ oneToManySearch(SearchEngineData<Algorithm> &engine_working_data,
|
||||
weights_table[index] = path_weight;
|
||||
durations_table[index] = path_duration;
|
||||
current_distance = path_distance;
|
||||
middle_nodes_table[index] = node;
|
||||
}
|
||||
|
||||
// Remove node from destinations list
|
||||
|
||||
Vendored
+4
-1
@@ -1,5 +1,5 @@
|
||||
---
|
||||
Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-llvmlibc-*,-llvm-qualified-auto,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-make-unique,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-qualified-auto'
|
||||
Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-llvmlibc-*,-llvm-qualified-auto,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-make-unique,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls,-readability-convert-member-functions-to-static,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-qualified-auto'
|
||||
#
|
||||
# For a list of check options, see:
|
||||
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
||||
@@ -137,6 +137,9 @@ Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugpro
|
||||
# This is header only library, so the declaration and implementation are
|
||||
# often the same and we want to have the const in implementations.
|
||||
#
|
||||
# readability-convert-member-functions-to-static
|
||||
# Reports too many false positives
|
||||
#
|
||||
# readability-function-cognitive-complexity
|
||||
# Sometimes the large functions are needed.
|
||||
#
|
||||
|
||||
@@ -7,7 +7,13 @@ runs:
|
||||
run: mkdir build
|
||||
shell: bash
|
||||
- name: Configure
|
||||
run: cmake -LA .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_HEADERS=OFF -DBUILD_BENCHMARKS=ON -DOsmium_DEBUG=TRUE -DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include
|
||||
run: |
|
||||
cmake -LA .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DBUILD_HEADERS=OFF \
|
||||
-DBUILD_BENCHMARKS=ON \
|
||||
-DOsmium_DEBUG=TRUE \
|
||||
-DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include
|
||||
shell: bash
|
||||
working-directory: build
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ runs:
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update -q
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -yq \
|
||||
doxygen \
|
||||
libboost-dev \
|
||||
@@ -16,8 +16,5 @@ runs:
|
||||
libsparsehash-dev \
|
||||
ruby-json \
|
||||
spatialite-bin
|
||||
test "$CC" = clang-6.0 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-6.0
|
||||
test "$CC" = clang-8 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-8
|
||||
test "$CC" = clang-13 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-13
|
||||
shell: bash
|
||||
|
||||
|
||||
+109
-131
@@ -3,14 +3,13 @@ name: CI
|
||||
on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
name: [Ubuntu-18, Ubuntu-20, Ubuntu-21, Debian-9, Debian-10, Debian-11, Debian-Testing, Debian-Experimental, Fedora-34]
|
||||
name: [Ubuntu-18, Ubuntu-20, Ubuntu-22, Debian-10, Debian-11, Debian-12, Debian-Testing, Debian-Experimental, Fedora-35, Fedora-36, Fedora-37, Fedora-38]
|
||||
build_type: [Dev]
|
||||
cpp_compiler: [g++]
|
||||
cpp_version: [c++11]
|
||||
@@ -19,122 +18,136 @@ jobs:
|
||||
# Uses gcc 7.5.0, clang 6.0.0, cmake 3.10.2
|
||||
image: "ubuntu:18.04"
|
||||
ubuntu: 18
|
||||
installer: apt
|
||||
- name: Ubuntu-20
|
||||
# Uses gcc 9.3.0, clang 10.0.0, cmake 3.16.3
|
||||
image: "ubuntu:20.04"
|
||||
ubuntu: 20
|
||||
installer: apt
|
||||
- name: Ubuntu-21
|
||||
# Uses gcc 10.3.0, clang, 12.0.0, cmake 3.18.4
|
||||
image: "ubuntu:21.04"
|
||||
ubuntu: 21
|
||||
installer: apt
|
||||
- name: Debian-9
|
||||
# Uses gcc 6.3.0, clang 3.8.1, cmake 3.7.2
|
||||
image: "debian:stretch"
|
||||
installer: apt
|
||||
- name: Ubuntu-22
|
||||
# Uses gcc 12.2.0, clang 15.0.7, cmake 3.24.2
|
||||
image: "ubuntu:22.04"
|
||||
ubuntu: 22
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Debian-10
|
||||
# Uses gcc 8.3.0, clang 7.0.1, cmake 3.13.4
|
||||
image: "debian:buster"
|
||||
installer: apt
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
cpp_version: c++17
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
cpp_version: c++20
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
- name: Debian-11
|
||||
image: "debian:bullseye"
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
cpp_version: c++17
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
cpp_version: c++20
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
build_type: RelWithDebInfo
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
- name: Debian-11
|
||||
# Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4
|
||||
image: "debian:bullseye"
|
||||
installer: apt
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
CXXFLAGS: -fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer
|
||||
LDFLAGS: -fsanitize=address,undefined,integer
|
||||
- name: Debian-Testing
|
||||
# Uses gcc 10.3.0, clang 11.1.0, cmake 3.21.3
|
||||
image: "debian:testing"
|
||||
installer: apt
|
||||
CXXFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer
|
||||
LDFLAGS: -fsanitize=address,undefined
|
||||
- name: Debian-12
|
||||
# Uses gcc 12.2.0, clang 15.0.6, cmake 3.25.1
|
||||
image: "debian:bookworm"
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
cpp_version: c++17
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
cpp_version: c++20
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
cpp_version: c++17
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
cpp_version: c++20
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
build_type: RelWithDebInfo
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Debian-12
|
||||
image: "debian:bookworm"
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
CXXFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer
|
||||
LDFLAGS: -fsanitize=address,undefined
|
||||
- name: Debian-Testing
|
||||
image: "debian:testing"
|
||||
CXXFLAGS: -Wno-stringop-overread -Wno-dangling-reference
|
||||
- name: Debian-Testing
|
||||
# Uses gcc 10.3.0, clang 11.1.0, cmake 3.21.3
|
||||
image: "debian:testing"
|
||||
installer: apt
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
- name: Debian-Experimental
|
||||
# Uses gcc 11, clang 14, cmake 3.21.3
|
||||
image: "debian:experimental"
|
||||
installer: apt
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
CXXFLAGS: -Wno-stringop-overread -Wno-dangling-reference
|
||||
- name: Debian-Experimental
|
||||
# Uses gcc 11, clang 14, cmake 3.21.3
|
||||
image: "debian:experimental"
|
||||
installer: apt
|
||||
c_compiler: clang-14
|
||||
cpp_compiler: clang++-14
|
||||
- name: Fedora-34
|
||||
# Uses gcc 11.2.1, clang 12.0.1, cmake 3.20.5
|
||||
image: "fedora:34"
|
||||
installer: dnf
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
c_compiler: clang
|
||||
cpp_compiler: clang++
|
||||
- name: Fedora-35
|
||||
# Uses gcc 11.2.1, clang 12.0.1, cmake 3.20.5
|
||||
image: "fedora:35"
|
||||
installer: dnf
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Fedora-36
|
||||
# Uses gcc 12.2.0, clang 14.0.5, cmake 3.24.2
|
||||
image: "fedora:36"
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Fedora-37
|
||||
# Uses gcc 12.3.1, clang 15.0.7, cmake 3.26.4
|
||||
image: "fedora:37"
|
||||
CXXFLAGS: -Wno-stringop-overread
|
||||
- name: Fedora-38
|
||||
# Uses gcc 13.0.1, clang 16.0.5, cmake 3.26.4
|
||||
image: "fedora:38"
|
||||
CXXFLAGS: -Wno-stringop-overread -Wno-dangling-reference
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
BUILD_TYPE: ${{ matrix.build_type }}
|
||||
CXXFLAGS: ${{ matrix.CXXFLAGS }}
|
||||
LDFLAGS: ${{ matrix.LDFLAGS }}
|
||||
CC: ${{ matrix.c_compiler }}
|
||||
CXX: ${{ matrix.cpp_compiler }}
|
||||
CXXFLAGS: ${{ matrix.CXXFLAGS }}
|
||||
LDFLAGS: ${{ matrix.LDFLAGS }}
|
||||
CPP_VERSION: ${{ matrix.cpp_version }}
|
||||
WITH_PROJ: ON
|
||||
APT_LISTCHANGES_FRONTEND: none
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Prepare container (apt)
|
||||
shell: bash
|
||||
if: startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:')
|
||||
run: |
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -qq
|
||||
apt-get install -y \
|
||||
apt-get install -yq \
|
||||
clang \
|
||||
cmake \
|
||||
doxygen \
|
||||
@@ -154,16 +167,13 @@ jobs:
|
||||
ruby-json \
|
||||
spatialite-bin \
|
||||
zlib1g-dev
|
||||
shell: bash
|
||||
if: matrix.installer == 'apt'
|
||||
- name: Install compiler
|
||||
shell: bash
|
||||
run: |
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -y clang-14
|
||||
if: matrix.cpp_compiler == 'clang++-14'
|
||||
run: apt-get install -yq clang-14
|
||||
- name: Prepare container (dnf)
|
||||
shell: bash
|
||||
if: startsWith(matrix.image, 'fedora:')
|
||||
run: |
|
||||
dnf install --quiet --assumeyes \
|
||||
boost-devel \
|
||||
@@ -185,9 +195,7 @@ jobs:
|
||||
sparsehash-devel \
|
||||
spatialite-tools \
|
||||
zlib-devel
|
||||
shell: bash
|
||||
if: matrix.installer == 'dnf'
|
||||
# Use v1 of checkout because v2 doesn't work with submodules
|
||||
# Use v1 of checkout because v3 doesn't work with submodules
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
@@ -197,21 +205,23 @@ jobs:
|
||||
- uses: ./.github/actions/ctest
|
||||
|
||||
ubuntu-latest:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 40
|
||||
env:
|
||||
CC: clang-13
|
||||
CXX: clang++-13
|
||||
CC: clang-15
|
||||
CXX: clang++-15
|
||||
BUILD_TYPE: Dev
|
||||
WITH_PROJ: ON
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install new clang
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -yq clang-15
|
||||
shell: bash
|
||||
- uses: ./.github/actions/install-ubuntu
|
||||
- uses: ./.github/actions/install-protozero
|
||||
@@ -219,16 +229,27 @@ jobs:
|
||||
- uses: ./.github/actions/build
|
||||
- uses: ./.github/actions/ctest
|
||||
|
||||
macos10-dev:
|
||||
runs-on: macos-10.15
|
||||
macos:
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- "macos-11"
|
||||
- "macos-12"
|
||||
- "macos-13"
|
||||
build_type: [Dev]
|
||||
include:
|
||||
- os: "macos-12"
|
||||
build_type: Release
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
BUILD_TYPE: Dev
|
||||
BUILD_TYPE: ${{ matrix.build_type }}
|
||||
WITH_PROJ: OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-macos
|
||||
@@ -237,47 +258,17 @@ jobs:
|
||||
- uses: ./.github/actions/build
|
||||
- uses: ./.github/actions/ctest
|
||||
|
||||
macos11-dev:
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
BUILD_TYPE: Dev
|
||||
WITH_PROJ: OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-macos
|
||||
- uses: ./.github/actions/install-protozero
|
||||
- uses: ./.github/actions/cmake
|
||||
- uses: ./.github/actions/build
|
||||
- uses: ./.github/actions/ctest
|
||||
|
||||
macos11-release:
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
BUILD_TYPE: Release
|
||||
WITH_PROJ: OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-macos
|
||||
- uses: ./.github/actions/install-protozero
|
||||
- uses: ./.github/actions/cmake
|
||||
- uses: ./.github/actions/build
|
||||
- uses: ./.github/actions/ctest
|
||||
|
||||
windows-2019-minimal:
|
||||
runs-on: windows-2019
|
||||
windows-minimal:
|
||||
timeout-minutes: 40
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-windows
|
||||
@@ -289,7 +280,7 @@ jobs:
|
||||
windows-2019-full:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-windows
|
||||
@@ -301,16 +292,3 @@ jobs:
|
||||
- uses: ./.github/actions/build-windows
|
||||
- uses: ./.github/actions/ctest-windows
|
||||
|
||||
windows-2022-minimal:
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- uses: ./.github/actions/install-windows
|
||||
- uses: ./.github/actions/install-protozero
|
||||
- uses: ./.github/actions/cmake-windows
|
||||
- uses: ./.github/actions/build-windows
|
||||
- uses: ./.github/actions/ctest-windows
|
||||
|
||||
|
||||
+21
-22
@@ -3,7 +3,6 @@ name: clang-tidy
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
|
||||
clang-tidy:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -14,9 +13,9 @@ jobs:
|
||||
- image: "debian:bullseye"
|
||||
clang: 11
|
||||
- image: "debian:testing"
|
||||
clang: 12
|
||||
clang: 15
|
||||
- image: "debian:experimental"
|
||||
clang: 14
|
||||
clang: 15
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
env:
|
||||
@@ -25,29 +24,29 @@ jobs:
|
||||
CXX: clang++-${{ matrix.clang }}
|
||||
CPP_VERSION: c++11
|
||||
WITH_PROJ: ON
|
||||
APT_LISTCHANGES_FRONTEND: none
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Prepare container (apt)
|
||||
run: |
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -qq
|
||||
apt-get install -y \
|
||||
clang-${{ matrix.clang }} \
|
||||
clang-tidy-${{ matrix.clang }} \
|
||||
cmake \
|
||||
git \
|
||||
libboost-dev \
|
||||
libbz2-dev \
|
||||
libexpat1-dev \
|
||||
libgdal-dev \
|
||||
libgeos++-dev \
|
||||
liblz4-dev \
|
||||
libproj-dev \
|
||||
libsparsehash-dev \
|
||||
make \
|
||||
zlib1g-dev
|
||||
apt-get install -yq \
|
||||
clang-${{ matrix.clang }} \
|
||||
clang-tidy-${{ matrix.clang }} \
|
||||
cmake \
|
||||
git \
|
||||
libboost-dev \
|
||||
libbz2-dev \
|
||||
libexpat1-dev \
|
||||
libgdal-dev \
|
||||
libgeos++-dev \
|
||||
liblz4-dev \
|
||||
libproj-dev \
|
||||
libsparsehash-dev \
|
||||
make \
|
||||
zlib1g-dev
|
||||
shell: bash
|
||||
# Use v1 of checkout because v2 doesn't work with submodules
|
||||
# Use v1 of checkout because v3 doesn't work with submodules
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
@@ -58,7 +57,7 @@ jobs:
|
||||
shell: bash
|
||||
working-directory: build
|
||||
- name: Upload Log
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: clang-tidy-${{ matrix.clang }}-log
|
||||
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
#-----------------------------------------------------------------------------
|
||||
#
|
||||
# Configuration for YouCompleteMe Vim plugin
|
||||
#
|
||||
# https://valloric.github.io/YouCompleteMe/
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
from os.path import realpath, dirname
|
||||
|
||||
basedir = dirname(realpath(__file__))
|
||||
|
||||
# some default flags
|
||||
# for more information install clang-3.2-doc package and
|
||||
# check UsersManual.html
|
||||
flags = [
|
||||
'-Werror',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-pedantic',
|
||||
'-Wno-return-type',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-unused-variable',
|
||||
|
||||
'-std=c++11',
|
||||
|
||||
# '-x' and 'c++' also required
|
||||
# use 'c' for C projects
|
||||
'-x',
|
||||
'c++',
|
||||
|
||||
# workaround for https://github.com/Valloric/YouCompleteMe/issues/303
|
||||
# also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800618
|
||||
'-isystem',
|
||||
'/usr/lib/ycmd/clang_includes/',
|
||||
|
||||
# libosmium include dirs
|
||||
'-I%s/include' % basedir,
|
||||
'-I%s/test/include' % basedir,
|
||||
'-I%s/test/data-test/include' % basedir,
|
||||
|
||||
# include third party libraries
|
||||
'-I/usr/include/gdal',
|
||||
]
|
||||
|
||||
# youcompleteme is calling this function to get flags
|
||||
# You can also set database for flags. Check: JSONCompilationDatabase.html in
|
||||
# clang-3.2-doc package
|
||||
def FlagsForFile( filename ):
|
||||
return {
|
||||
'flags': flags,
|
||||
'do_cache': True
|
||||
}
|
||||
Vendored
+35
-1
@@ -12,6 +12,38 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
### Fixed
|
||||
|
||||
## [2.20.0] - 2023-09-20
|
||||
|
||||
### Changed
|
||||
|
||||
* Optionally allow fractional seconds in timestamps in OSM files.
|
||||
* Enable `posix_fadvise` usage on FreeBSD.
|
||||
* Make parsing PBFs a bit less picky.
|
||||
* Various small code cleanups.
|
||||
|
||||
### Fixed
|
||||
|
||||
* Don't use class template arguments on `GeometryFactory` constructor
|
||||
definition.
|
||||
|
||||
## [2.19.0] - 2023-01-19
|
||||
|
||||
### Changed
|
||||
|
||||
* Mark RapidJSON support as deprecated.
|
||||
* Update included Catch to v2.13.10.
|
||||
* Remove deprecated BoolVector class.
|
||||
* Remove deprecated NWRIdSet class.
|
||||
* Remove deprecated AssemblerConfig constructor.
|
||||
* Print start of offending string in overlong string exception.
|
||||
* Implement `set_thread_name()` on FreeBSD.
|
||||
* Some small code cleanups.
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix return type in `MembersDatabaseCommon::count_not_removed()`.
|
||||
* Make bzip2 unit tests pass on musl-based systems.
|
||||
* Fix bug in members database test case.
|
||||
|
||||
## [2.18.0] - 2022-02-07
|
||||
|
||||
@@ -1253,7 +1285,9 @@ long time. These will not be part of the next version of libosmium:
|
||||
Doxygen (up to version 1.8.8). This version contains a workaround to fix
|
||||
this.
|
||||
|
||||
[unreleased]: https://github.com/osmcode/libosmium/compare/v2.18.0...HEAD
|
||||
[unreleased]: https://github.com/osmcode/libosmium/compare/v2.20.0...HEAD
|
||||
[2.20.0]: https://github.com/osmcode/libosmium/compare/v2.19.0...v2.20.0
|
||||
[2.19.0]: https://github.com/osmcode/libosmium/compare/v2.18.9...v2.19.0
|
||||
[2.18.0]: https://github.com/osmcode/libosmium/compare/v2.17.3...v2.18.0
|
||||
[2.17.3]: https://github.com/osmcode/libosmium/compare/v2.17.2...v2.17.3
|
||||
[2.17.2]: https://github.com/osmcode/libosmium/compare/v2.17.1...v2.17.2
|
||||
|
||||
Vendored
+2
-2
@@ -39,7 +39,7 @@ set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;MinSizeRel;Dev;Cover
|
||||
project(libosmium)
|
||||
|
||||
set(LIBOSMIUM_VERSION_MAJOR 2)
|
||||
set(LIBOSMIUM_VERSION_MINOR 18)
|
||||
set(LIBOSMIUM_VERSION_MINOR 20)
|
||||
set(LIBOSMIUM_VERSION_PATCH 0)
|
||||
|
||||
set(LIBOSMIUM_VERSION
|
||||
@@ -427,7 +427,7 @@ endif()
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
message(STATUS "Looking for clang-tidy")
|
||||
find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11)
|
||||
find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-16 clang-tidy-15 clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11)
|
||||
|
||||
if(CLANG_TIDY)
|
||||
message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}")
|
||||
|
||||
+1
-2
@@ -136,8 +136,7 @@ directory, some data tests in `test/osm-testdata` and tests of the examples in
|
||||
`test/examples`. They are built by the default cmake config. Run `ctest` to
|
||||
run them. We can always use more tests.
|
||||
|
||||
Tests are run automatically using Github Actions (Linux/macOS) and Appveyor
|
||||
(Windows) services.
|
||||
Tests are run automatically using Github Actions.
|
||||
|
||||
|
||||
## Documenting the code
|
||||
|
||||
Vendored
+2
-12
@@ -7,8 +7,6 @@ A fast and flexible C++ library for working with OpenStreetMap data.
|
||||
Libosmium works on Linux, macOS and Windows.
|
||||
|
||||
[](https://github.com/osmcode/libosmium/actions)
|
||||
[](https://ci.appveyor.com/project/lonvia/libosmium-eq41p/branch/master)
|
||||
[](https://codecov.io/gh/osmcode/libosmium)
|
||||
[](https://repology.org/metapackage/libosmium)
|
||||
|
||||
Please see the [Libosmium manual](https://osmcode.org/libosmium/manual.html)
|
||||
@@ -17,9 +15,8 @@ for more details than this README can provide.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Because Libosmium uses many C++11 features you need a modern compiler and
|
||||
standard C++ library. Osmium needs at least GCC 4.8 or clang (LLVM) 3.4.
|
||||
(Some parts may work with older versions.)
|
||||
You need a C++11 compiler and standard C++ library. Osmium needs at least GCC
|
||||
4.8 or clang (LLVM) 3.4. (Some parts may work with older versions.)
|
||||
|
||||
Different parts of Libosmium (and the applications built on top of it) need
|
||||
different libraries. You DO NOT NEED to install all of them, just install those
|
||||
@@ -88,13 +85,6 @@ See the
|
||||
for instructions.
|
||||
|
||||
|
||||
## Switching from the old Osmium
|
||||
|
||||
If you have been using the old version of Osmium at
|
||||
https://github.com/joto/osmium you might want to read about the [changes
|
||||
needed](https://osmcode.org/libosmium/manual.html#changes-from-old-versions-of-osmium).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Libosmium is available under the Boost Software License. See LICENSE.
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ int main(int argc, char* argv[]) {
|
||||
try {
|
||||
const std::string input_filename{argv[1]};
|
||||
|
||||
osmium::memory::Buffer buffer{osmium::io::read_file(input_filename)};
|
||||
const osmium::memory::Buffer buffer{osmium::io::read_file(input_filename)};
|
||||
|
||||
const auto& map_factory = osmium::index::MapFactory<osmium::unsigned_object_id_type, osmium::Location>::instance();
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
try {
|
||||
std::string input_filename{argv[1]};
|
||||
std::string output_filename{argv[2]};
|
||||
const std::string input_filename{argv[1]};
|
||||
const std::string output_filename{argv[2]};
|
||||
|
||||
osmium::io::Reader reader{input_filename};
|
||||
osmium::io::File output_file{output_filename, "pbf"};
|
||||
osmium::io::Header header;
|
||||
const osmium::io::File output_file{output_filename, "pbf"};
|
||||
const osmium::io::Header header;
|
||||
osmium::io::Writer writer{output_file, header, osmium::io::overwrite::allow};
|
||||
|
||||
while (osmium::memory::Buffer buffer = reader.read()) { // NOLINT(bugprone-use-after-move) Bug in clang-tidy https://bugs.llvm.org/show_bug.cgi?id=36516
|
||||
|
||||
+8
-1
@@ -24,6 +24,11 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
SET PATH=C:/projects/bzip2.v140.1.0.6.9/build/native/bin/x64/%config%;%PATH%
|
||||
|
||||
nuget install lz4 -Version 1.3.1.2
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
SET PATH=C:/projects/lz4.1.3.1.2/build/native/bin/x64/%config%;%PATH%
|
||||
|
||||
CD libosmium
|
||||
|
||||
ECHO config^: %config%
|
||||
@@ -52,7 +57,9 @@ SET CMAKE_CMD=cmake .. -LA -G "Visual Studio 14 Win64" ^
|
||||
-DEXPAT_INCLUDE_DIR=C:/projects/expat.v140.2.2.5/build/native/include ^
|
||||
-DEXPAT_LIBRARY=C:/projects/expat.v140.2.2.5/build/native/lib/x64/%config%/libexpat%libpostfix%.lib ^
|
||||
-DBZIP2_INCLUDE_DIR=C:/projects/bzip2.v140.1.0.6.9/build/native/include ^
|
||||
-DBZIP2_LIBRARIES=C:/projects/bzip2.v140.1.0.6.9/build/native/lib/x64/%config%/libbz2%libpostfix%.lib
|
||||
-DBZIP2_LIBRARIES=C:/projects/bzip2.v140.1.0.6.9/build/native/lib/x64/%config%/libbz2%libpostfix%.lib ^
|
||||
-DLZ4_INCLUDE_DIR=C:/projects/lz4.1.3.1.2/build/native/include ^
|
||||
-DLZ4_LIBRARY=C:/projects/lz4.1.3.1.2/build/native/lib/x64/%config%/liblz4%libpostfix%.lib
|
||||
|
||||
ECHO calling^: %CMAKE_CMD%
|
||||
%CMAKE_CMD%
|
||||
|
||||
+2
-1
@@ -16,8 +16,9 @@ call C:\msys64\mingw64\bin\gem.cmd install json
|
||||
REM Workaround for problem with spatialite (see https://github.com/osmcode/libosmium/issues/262)
|
||||
copy /y C:\msys64\mingw64\bin\libreadline8.dll C:\msys64\mingw64\bin\libreadline7.dll
|
||||
|
||||
echo "Setting PROJ_LIB variable for correct PROJ.4 working"
|
||||
echo "Setting PROJ_LIB/DATA variable for correct PROJ.4 working"
|
||||
set PROJ_LIB=c:\msys64\mingw64\share\proj
|
||||
set PROJ_DATA=c:\msys64\mingw64\share\proj
|
||||
|
||||
set CXXFLAGS=-Wno-stringop-overflow
|
||||
|
||||
|
||||
+2
-2
@@ -74,8 +74,8 @@ class AmenityHandler : public osmium::handler::Handler {
|
||||
c.y += nr.lat();
|
||||
}
|
||||
|
||||
c.x /= nr_list.size();
|
||||
c.y /= nr_list.size();
|
||||
c.x /= static_cast<double>(nr_list.size());
|
||||
c.y /= static_cast<double>(nr_list.size());
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
+2
-2
@@ -122,11 +122,11 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
osmium::io::File input_file{argv[2]};
|
||||
const osmium::io::File input_file{argv[2]};
|
||||
|
||||
// Configuration for the multipolygon assembler. Here the default settings
|
||||
// are used, but you could change multiple settings.
|
||||
osmium::area::Assembler::config_type assembler_config;
|
||||
const osmium::area::Assembler::config_type assembler_config;
|
||||
|
||||
// Set up a filter matching only forests. This will be used to only build
|
||||
// areas with matching tags.
|
||||
|
||||
+2
-2
@@ -153,8 +153,8 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
// Get input and output file names from command line.
|
||||
std::string input_file_name{argv[1]};
|
||||
std::string output_file_name{argv[2]};
|
||||
const std::string input_file_name{argv[1]};
|
||||
const std::string output_file_name{argv[2]};
|
||||
|
||||
try {
|
||||
// Initialize Reader
|
||||
|
||||
+2
-2
@@ -68,7 +68,7 @@ int main(int argc, char* argv[]) {
|
||||
try {
|
||||
// The Reader is initialized here with an osmium::io::File, but could
|
||||
// also be directly initialized with a file name.
|
||||
osmium::io::File input_file{argv[1]};
|
||||
const osmium::io::File input_file{argv[1]};
|
||||
osmium::io::Reader reader{input_file};
|
||||
|
||||
// Create an instance of our own CountHandler and push the data from the
|
||||
@@ -88,7 +88,7 @@ int main(int argc, char* argv[]) {
|
||||
// (though not this one) can use huge amounts of data. So checking actual
|
||||
// memore usage is often useful and can be done easily with this class.
|
||||
// (Currently only works on Linux, not macOS and Windows.)
|
||||
osmium::MemoryUsage memory;
|
||||
const osmium::MemoryUsage memory;
|
||||
|
||||
std::cout << "\nMemory used: " << memory.peak() << " MBytes\n";
|
||||
} catch (const std::exception& e) {
|
||||
|
||||
+2
-2
@@ -40,11 +40,11 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
// Get output file name from command line.
|
||||
std::string output_file_name{argv[1]};
|
||||
const std::string output_file_name{argv[1]};
|
||||
|
||||
// If output file name is "-", this means STDOUT. Set the OPL file type
|
||||
// in this case. Otherwise take the file type from the file name suffix.
|
||||
osmium::io::File output_file{output_file_name, output_file_name == "-" ? ".opl" : ""};
|
||||
const osmium::io::File output_file{output_file_name, output_file_name == "-" ? ".opl" : ""};
|
||||
|
||||
try {
|
||||
// Create a buffer where all objects will live. Use a sensible initial
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ int main(int argc, char* argv[]) {
|
||||
// Get entity types from command line if there is a 2nd argument.
|
||||
if (argc == 3) {
|
||||
read_types = osmium::osm_entity_bits::nothing;
|
||||
std::string types = argv[2];
|
||||
const std::string types = argv[2];
|
||||
if (types.find('n') != std::string::npos) {
|
||||
read_types |= osmium::osm_entity_bits::node;
|
||||
}
|
||||
|
||||
+7
-7
@@ -165,31 +165,31 @@ int main(int argc, char* argv[]) {
|
||||
reader.close();
|
||||
|
||||
// Write out node, way, and relation offset indexes to disk.
|
||||
IndexFile nodes_idx{output_dir + "/nodes.idx"};
|
||||
const IndexFile nodes_idx{output_dir + "/nodes.idx"};
|
||||
node_index.dump_as_list(nodes_idx.fd());
|
||||
|
||||
IndexFile ways_idx{output_dir + "/ways.idx"};
|
||||
const IndexFile ways_idx{output_dir + "/ways.idx"};
|
||||
way_index.dump_as_list(ways_idx.fd());
|
||||
|
||||
IndexFile relations_idx{output_dir + "/relations.idx"};
|
||||
const IndexFile relations_idx{output_dir + "/relations.idx"};
|
||||
relation_index.dump_as_list(relations_idx.fd());
|
||||
|
||||
// Sort the maps (so later binary search will work on them) and write
|
||||
// them to disk.
|
||||
map_node2way.sort();
|
||||
IndexFile node2way_idx{output_dir + "/node2way.map"};
|
||||
const IndexFile node2way_idx{output_dir + "/node2way.map"};
|
||||
map_node2way.dump_as_list(node2way_idx.fd());
|
||||
|
||||
map_node2relation.sort();
|
||||
IndexFile node2relation_idx{output_dir + "/node2rel.map"};
|
||||
const IndexFile node2relation_idx{output_dir + "/node2rel.map"};
|
||||
map_node2relation.dump_as_list(node2relation_idx.fd());
|
||||
|
||||
map_way2relation.sort();
|
||||
IndexFile way2relation_idx{output_dir + "/way2rel.map"};
|
||||
const IndexFile way2relation_idx{output_dir + "/way2rel.map"};
|
||||
map_way2relation.dump_as_list(way2relation_idx.fd());
|
||||
|
||||
map_relation2relation.sort();
|
||||
IndexFile relation2relation_idx{output_dir + "/rel2rel.map"};
|
||||
const IndexFile relation2relation_idx{output_dir + "/rel2rel.map"};
|
||||
map_relation2relation.dump_as_list(relation2relation_idx.fd());
|
||||
} catch (const std::exception& e) {
|
||||
// All exceptions used by the Osmium library derive from std::exception.
|
||||
|
||||
@@ -47,10 +47,10 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
try {
|
||||
// The input file, deduce file format from file suffix.
|
||||
osmium::io::File input_file{argv[1]};
|
||||
const osmium::io::File input_file{argv[1]};
|
||||
|
||||
// The output file, force XML OSM file format.
|
||||
osmium::io::File output_file{argv[2], "osm"};
|
||||
const osmium::io::File output_file{argv[2], "osm"};
|
||||
|
||||
// Initialize Reader for the input file.
|
||||
// Read only changesets (will ignore nodes, ways, and
|
||||
|
||||
+7
-7
@@ -67,8 +67,8 @@ public:
|
||||
IndexAccess(const IndexAccess&) = delete;
|
||||
IndexAccess& operator=(const IndexAccess&) = delete;
|
||||
|
||||
IndexAccess(IndexAccess&&) = delete;
|
||||
IndexAccess& operator=(IndexAccess&&) = delete;
|
||||
IndexAccess(IndexAccess&&) noexcept = delete;
|
||||
IndexAccess& operator=(IndexAccess&&) noexcept = delete;
|
||||
|
||||
virtual ~IndexAccess() noexcept = default;
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
~IndexAccessDense() noexcept override = default;
|
||||
|
||||
void dump() const override {
|
||||
index_type index{this->fd()};
|
||||
const index_type index{this->fd()};
|
||||
|
||||
for (std::size_t i = 0; i < index.size(); ++i) {
|
||||
if (index.get(i) != TValue{}) {
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
}
|
||||
|
||||
bool search(const osmium::unsigned_object_id_type& key) const override {
|
||||
index_type index{this->fd()};
|
||||
const index_type index{this->fd()};
|
||||
|
||||
try {
|
||||
TValue value = index.get(key);
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
~IndexAccessSparse() noexcept override = default;
|
||||
|
||||
void dump() const override {
|
||||
index_type index{this->fd()};
|
||||
const index_type index{this->fd()};
|
||||
|
||||
for (const auto& element : index) {
|
||||
std::cout << element.first << " " << element.second << "\n";
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
using element_type = typename index_type::element_type;
|
||||
index_type index{this->fd()};
|
||||
|
||||
element_type elem{key, TValue{}};
|
||||
const element_type elem{key, TValue{}};
|
||||
const auto positions = std::equal_range(index.begin(),
|
||||
index.end(),
|
||||
elem,
|
||||
@@ -347,7 +347,7 @@ int run(const IndexAccess<TValue>& index, const Options& options) {
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
// Parse command line options.
|
||||
Options options{argc, argv};
|
||||
const Options options{argc, argv};
|
||||
|
||||
// Open the index file.
|
||||
const int fd = ::open(options.filename(), O_RDWR);
|
||||
|
||||
+2
-2
@@ -27,11 +27,11 @@ int main(int argc, char* argv[]) {
|
||||
try {
|
||||
// The Reader is initialized here with an osmium::io::File, but could
|
||||
// also be directly initialized with a file name.
|
||||
osmium::io::File input_file{argv[1]};
|
||||
const osmium::io::File input_file{argv[1]};
|
||||
osmium::io::Reader reader{input_file};
|
||||
|
||||
// OSM data comes in buffers, read until there are no more.
|
||||
while (osmium::memory::Buffer buffer = reader.read()) {
|
||||
while (const osmium::memory::Buffer buffer = reader.read()) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ int main(int argc, char* argv[]) {
|
||||
try {
|
||||
// The Reader is initialized here with an osmium::io::File, but could
|
||||
// also be directly initialized with a file name.
|
||||
osmium::io::File input_file{argv[1]};
|
||||
const osmium::io::File input_file{argv[1]};
|
||||
osmium::io::Reader reader{input_file};
|
||||
|
||||
// Initialize progress bar, enable it only if STDERR is a TTY.
|
||||
osmium::ProgressBar progress{reader.file_size(), osmium::isatty(2)};
|
||||
|
||||
// OSM data comes in buffers, read until there are no more.
|
||||
while (osmium::memory::Buffer buffer = reader.read()) {
|
||||
while (const osmium::memory::Buffer buffer = reader.read()) {
|
||||
// Update progress bar for each buffer.
|
||||
progress.update(reader.offset());
|
||||
}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
// Create a tile at this location. This will also internally use the
|
||||
// Mercator projection and then calculate the tile coordinates.
|
||||
const osmium::geom::Tile tile{uint32_t(zoom), location};
|
||||
const osmium::geom::Tile tile{static_cast<uint32_t>(zoom), location};
|
||||
std::cout << "Tile: zoom=" << tile.z << " x=" << tile.x << " y=" << tile.y << "\n";
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace osmium {
|
||||
|
||||
// Now create the Area object and add the attributes and tags
|
||||
// from the relation.
|
||||
bool okay = create_area(out_buffer, relation, members);
|
||||
const bool okay = create_area(out_buffer, relation, members);
|
||||
if (okay) {
|
||||
out_buffer.commit();
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -124,15 +124,6 @@ namespace osmium {
|
||||
|
||||
AssemblerConfig() noexcept = default;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @deprecated Use default constructor and set values afterwards.
|
||||
*/
|
||||
explicit AssemblerConfig(ProblemReporter* pr, bool d = false) :
|
||||
problem_reporter(pr),
|
||||
debug_level(d) {
|
||||
}
|
||||
|
||||
}; // struct AssemblerConfig
|
||||
|
||||
} // namespace area
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -332,10 +332,10 @@ namespace osmium {
|
||||
if (!way.nodes().empty() && way.is_closed() && !way.tags().empty()) {
|
||||
const auto d = std::count_if(way.tags().cbegin(), way.tags().cend(), std::cref(filter()));
|
||||
if (d > 0) {
|
||||
osmium::tags::KeyFilter::iterator way_fi_begin(std::cref(filter()), way.tags().cbegin(), way.tags().cend());
|
||||
osmium::tags::KeyFilter::iterator way_fi_end(std::cref(filter()), way.tags().cend(), way.tags().cend());
|
||||
osmium::tags::KeyFilter::iterator area_fi_begin(std::cref(filter()), area_tags.cbegin(), area_tags.cend());
|
||||
osmium::tags::KeyFilter::iterator area_fi_end(std::cref(filter()), area_tags.cend(), area_tags.cend());
|
||||
const osmium::tags::KeyFilter::iterator way_fi_begin(std::cref(filter()), way.tags().cbegin(), way.tags().cend());
|
||||
const osmium::tags::KeyFilter::iterator way_fi_end(std::cref(filter()), way.tags().cend(), way.tags().cend());
|
||||
const osmium::tags::KeyFilter::iterator area_fi_begin(std::cref(filter()), area_tags.cbegin(), area_tags.cend());
|
||||
const osmium::tags::KeyFilter::iterator area_fi_end(std::cref(filter()), area_tags.cend(), area_tags.cend());
|
||||
#ifdef __cpp_lib_robust_nonmodifying_seq_ops
|
||||
if (!std::equal(way_fi_begin, way_fi_end, area_fi_begin, area_fi_end)) {
|
||||
#else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace osmium {
|
||||
|
||||
void create_rings_simple_case() {
|
||||
auto count_remaining = m_segment_list.size();
|
||||
for (slocation& sl : m_locations) {
|
||||
for (const slocation& sl : m_locations) {
|
||||
const NodeRefSegment& segment = m_segment_list[sl.item];
|
||||
if (!segment.is_done()) {
|
||||
count_remaining -= add_new_ring(sl);
|
||||
@@ -671,7 +671,7 @@ namespace osmium {
|
||||
std::cerr << " Trying to merge " << open_ring_its.size() << " open rings (try_to_merge)\n";
|
||||
}
|
||||
|
||||
std::vector<location_to_ring_map> xrings = create_location_to_ring_map(open_ring_its);
|
||||
const auto xrings = create_location_to_ring_map(open_ring_its);
|
||||
|
||||
auto it = xrings.cbegin();
|
||||
while (it != xrings.cend()) {
|
||||
@@ -825,7 +825,7 @@ namespace osmium {
|
||||
|
||||
find_inner_outer_complex();
|
||||
ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment());
|
||||
bool ring_min_is_outer = !outer_ring;
|
||||
const bool ring_min_is_outer = !outer_ring;
|
||||
if (debug()) {
|
||||
std::cerr << " Open ring is " << (ring_min_is_outer ? "outer" : "inner") << " ring\n";
|
||||
}
|
||||
@@ -924,7 +924,7 @@ namespace osmium {
|
||||
|
||||
// Now find all the rest of the rings (ie not starting at split locations)
|
||||
if (count_remaining > 0) {
|
||||
for (slocation& sl : m_locations) {
|
||||
for (const slocation& sl : m_locations) {
|
||||
const NodeRefSegment& segment = m_segment_list[sl.item];
|
||||
if (!segment.is_done()) {
|
||||
count_remaining -= add_new_ring_complex(sl);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace osmium {
|
||||
|
||||
const char* role_name() const noexcept {
|
||||
static const std::array<const char*, 4> names = {{"unknown", "outer", "inner", "empty"}};
|
||||
return names[int(m_role)];
|
||||
return names[static_cast<int>(m_role)];
|
||||
}
|
||||
|
||||
const osmium::Way* way() const noexcept {
|
||||
@@ -327,9 +327,9 @@ namespace osmium {
|
||||
|
||||
if ((d > 0 && na >= 0 && na <= d && nb >= 0 && nb <= d) ||
|
||||
(d < 0 && na <= 0 && na >= d && nb <= 0 && nb >= d)) {
|
||||
const double ua = double(na) / d;
|
||||
const double ua = static_cast<double>(na) / static_cast<double>(d);
|
||||
const vec i = p0 + ua * (p1 - p0);
|
||||
return osmium::Location{int32_t(i.x), int32_t(i.y)};
|
||||
return osmium::Location{static_cast<int32_t>(i.x), static_cast<int32_t>(i.y)};
|
||||
}
|
||||
|
||||
return osmium::Location{};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -86,16 +86,16 @@ namespace osmium {
|
||||
int64_t m_num;
|
||||
#endif
|
||||
|
||||
int64_t m_sum;
|
||||
int64_t m_sum = 0;
|
||||
|
||||
public:
|
||||
|
||||
explicit ProtoRing(NodeRefSegment* segment) noexcept :
|
||||
m_min_segment(segment),
|
||||
m_min_segment(segment)
|
||||
#ifdef OSMIUM_DEBUG_RING_NO
|
||||
m_num(next_num()),
|
||||
, m_num(next_num())
|
||||
#endif
|
||||
m_sum(0) {
|
||||
{
|
||||
add_segment_back(segment);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace osmium {
|
||||
}
|
||||
|
||||
if (y_range_overlap(s1, s2)) {
|
||||
osmium::Location intersection{calculate_intersection(s1, s2)};
|
||||
const osmium::Location intersection{calculate_intersection(s1, s2)};
|
||||
if (intersection) {
|
||||
++found_intersections;
|
||||
if (m_debug) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -89,12 +89,12 @@ namespace osmium {
|
||||
|
||||
// scale vector
|
||||
constexpr inline vec operator*(double s, const vec& v) noexcept {
|
||||
return vec{int64_t(s * v.x), int64_t(s * v.y)};
|
||||
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
|
||||
}
|
||||
|
||||
// scale vector
|
||||
constexpr inline vec operator*(const vec& v, double s) noexcept {
|
||||
return vec{int64_t(s * v.x), int64_t(s * v.y)};
|
||||
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
|
||||
}
|
||||
|
||||
// equality
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -75,15 +75,15 @@ namespace osmium {
|
||||
void set_object(gdalcpp::Feature& feature) {
|
||||
const char t[2] = {osmium::item_type_to_char(m_object_type), '\0'};
|
||||
feature.set_field("obj_type", t);
|
||||
feature.set_field("obj_id", int32_t(m_object_id));
|
||||
feature.set_field("nodes", int32_t(m_nodes));
|
||||
feature.set_field("obj_id", static_cast<int32_t>(m_object_id));
|
||||
feature.set_field("nodes", static_cast<int32_t>(m_nodes));
|
||||
}
|
||||
|
||||
void write_point(const char* problem_type, osmium::object_id_type id1, osmium::object_id_type id2, osmium::Location location) {
|
||||
gdalcpp::Feature feature{m_layer_perror, m_ogr_factory.create_point(location)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", double(id1));
|
||||
feature.set_field("id2", double(id2));
|
||||
feature.set_field("id1", static_cast<double>(id1));
|
||||
feature.set_field("id2", static_cast<double>(id2));
|
||||
feature.set_field("problem", problem_type);
|
||||
feature.add_to_layer();
|
||||
}
|
||||
@@ -176,7 +176,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", int32_t(way.id()));
|
||||
feature.set_field("id1", static_cast<int32_t>(way.id()));
|
||||
feature.set_field("id2", 0);
|
||||
feature.set_field("problem", "way_in_multiple_rings");
|
||||
feature.add_to_layer();
|
||||
@@ -192,7 +192,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", int32_t(way.id()));
|
||||
feature.set_field("id1", static_cast<int32_t>(way.id()));
|
||||
feature.set_field("id2", 0);
|
||||
feature.set_field("problem", "inner_with_same_tags");
|
||||
feature.add_to_layer();
|
||||
@@ -208,7 +208,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("id1", int32_t(way.id()));
|
||||
feature.set_field("id1", static_cast<int32_t>(way.id()));
|
||||
feature.set_field("id2", 0);
|
||||
feature.set_field("problem", "duplicate_way");
|
||||
feature.add_to_layer();
|
||||
@@ -229,7 +229,7 @@ namespace osmium {
|
||||
try {
|
||||
gdalcpp::Feature feature{m_layer_ways, m_ogr_factory.create_linestring(way)};
|
||||
set_object(feature);
|
||||
feature.set_field("way_id", int32_t(way.id()));
|
||||
feature.set_field("way_id", static_cast<int32_t>(way.id()));
|
||||
feature.add_to_layer();
|
||||
} catch (const osmium::geometry_error&) {
|
||||
// XXX
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -125,8 +125,8 @@ namespace osmium {
|
||||
if (value_length > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM tag value is too long"};
|
||||
}
|
||||
add_size(append_with_zero(key, osmium::memory::item_size_type(key_length)));
|
||||
add_size(append_with_zero(value, osmium::memory::item_size_type(value_length)));
|
||||
add_size(append_with_zero(key, static_cast<osmium::memory::item_size_type>(key_length)));
|
||||
add_size(append_with_zero(value, static_cast<osmium::memory::item_size_type>(value_length)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,8 +142,8 @@ namespace osmium {
|
||||
if (value.size() > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM tag value is too long"};
|
||||
}
|
||||
add_size(append(key.data(), osmium::memory::item_size_type(key.size()) + 1));
|
||||
add_size(append(value.data(), osmium::memory::item_size_type(value.size()) + 1));
|
||||
add_size(append(key.data(), static_cast<osmium::memory::item_size_type>(key.size()) + 1));
|
||||
add_size(append(value.data(), static_cast<osmium::memory::item_size_type>(value.size()) + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,8 +240,8 @@ namespace osmium {
|
||||
if (length > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM relation member role is too long"};
|
||||
}
|
||||
member.set_role_size(osmium::string_size_type(length) + 1);
|
||||
add_size(append_with_zero(role, osmium::memory::item_size_type(length)));
|
||||
member.set_role_size(static_cast<osmium::string_size_type>(length) + 1);
|
||||
add_size(append_with_zero(role, static_cast<osmium::memory::item_size_type>(length)));
|
||||
add_padding(true);
|
||||
}
|
||||
|
||||
@@ -330,16 +330,16 @@ namespace osmium {
|
||||
if (length > osmium::max_osm_string_length) {
|
||||
throw std::length_error{"OSM user name is too long"};
|
||||
}
|
||||
comment.set_user_size(osmium::string_size_type(length) + 1);
|
||||
add_size(append_with_zero(user, osmium::memory::item_size_type(length)));
|
||||
comment.set_user_size(static_cast<osmium::string_size_type>(length) + 1);
|
||||
add_size(append_with_zero(user, static_cast<osmium::memory::item_size_type>(length)));
|
||||
}
|
||||
|
||||
void add_text(osmium::ChangesetComment& comment, const char* text, const std::size_t length) {
|
||||
if (length > std::numeric_limits<osmium::changeset_comment_size_type>::max() - 1) {
|
||||
throw std::length_error{"OSM changeset comment is too long"};
|
||||
}
|
||||
comment.set_text_size(osmium::changeset_comment_size_type(length) + 1);
|
||||
add_size(append_with_zero(text, osmium::memory::item_size_type(length)));
|
||||
comment.set_text_size(static_cast<osmium::changeset_comment_size_type>(length) + 1);
|
||||
add_size(append_with_zero(text, static_cast<osmium::memory::item_size_type>(length)));
|
||||
add_padding(true);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace osmium {
|
||||
|
||||
public:
|
||||
|
||||
GeometryFactory<TGeomImpl, TProjection>() :
|
||||
GeometryFactory() :
|
||||
m_projection(),
|
||||
m_impl(m_projection.epsg()) {
|
||||
}
|
||||
@@ -175,7 +175,7 @@ namespace osmium {
|
||||
* Constructor for default initialized projection.
|
||||
*/
|
||||
template <typename... TArgs>
|
||||
explicit GeometryFactory<TGeomImpl, TProjection>(TArgs&&... args) :
|
||||
explicit GeometryFactory(TArgs&&... args) :
|
||||
m_projection(),
|
||||
m_impl(m_projection.epsg(), std::forward<TArgs>(args)...) {
|
||||
}
|
||||
@@ -185,7 +185,7 @@ namespace osmium {
|
||||
* projection is moved into the GeometryFactory.
|
||||
*/
|
||||
template <typename... TArgs>
|
||||
explicit GeometryFactory<TGeomImpl, TProjection>(TProjection&& projection, TArgs&&... args) :
|
||||
explicit GeometryFactory(TProjection&& projection, TArgs&&... args) :
|
||||
m_projection(std::move(projection)),
|
||||
m_impl(m_projection.epsg(), std::forward<TArgs>(args)...) {
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -47,6 +47,9 @@ namespace osmium {
|
||||
/**
|
||||
* A geometry factory implementation that can be used with the
|
||||
* RapidJSON (https://github.com/miloyip/rapidjson) JSON writer.
|
||||
*
|
||||
* @deprecated The RapidJSON support will be removed in a future
|
||||
* version of libosmium.
|
||||
*/
|
||||
template <typename TWriter>
|
||||
class RapidGeoJSONFactoryImpl {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace osmium {
|
||||
std::string out;
|
||||
out.reserve(str.size() * 2);
|
||||
|
||||
for (char c : str) {
|
||||
for (const char c : str) {
|
||||
out += lookup_hex[(static_cast<unsigned int>(c) >> 4U) & 0xfU];
|
||||
out += lookup_hex[ static_cast<unsigned int>(c) & 0xfU];
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
This file is part of Osmium (https://osmcode.org/libosmium).
|
||||
|
||||
Copyright 2013-2022 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
Copyright 2013-2023 Jochen Topf <jochen@topf.org> and others (see README).
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user