Compare commits

...

2962 Commits

Author SHA1 Message Date
6ab6564d42
fix arch on normal build
Some checks failed
Build and Publish Docker Image / publish (debian) (release) Failing after 21s
Build and Publish Docker Image / publish (alpine) (release) Failing after 3h14m36s
2025-02-15 14:29:51 -05:00
513966056b
remove 2 32bit unsupported arch
Some checks failed
Build and Publish Docker Image / publish (alpine) (release) Failing after 1h38m5s
Build and Publish Docker Image / publish (debian) (release) Failing after 22s
2025-02-15 12:28:08 -05:00
2c91c0c259
update image name
Some checks failed
Build and Publish Docker Image / publish (alpine) (release) Failing after 1m49s
Build and Publish Docker Image / publish (debian) (release) Failing after 21s
2025-02-15 12:21:44 -05:00
Matt Robinson
c59ad69d6a
Correct Docker FromAsCasing warning (#7064) 2025-02-10 19:22:09 +01:00
Alexander Farber
61464fc2bd
Fix no member named 'construct' in 'optional<type-parameter-0-0 &>' error in sol.hpp with Clang 19 (#7098) 2025-01-25 07:09:37 +00:00
Alexander Farber
6f235cca15
Use libtbb-dev/libtbb12 packages in Dockerfile-debian, sort packages alphabetically in both Dockerfiles (#7095)
* - Use libtbb-dev in builder stage and libtbb12 package in the runstage instead of building oneTBB v2021.12.0 from source code
- Remove wget package from builder stage, because it is not used
- Uppercase "FROM ... as" -> "FROM ... AS" to silence a "docker build" warning
- Sort packages alphabetically and put them on separate lines for easier comparison

* - Fix the warning "FromAsCasing: 'as' and 'FROM' keywords' casing do not match"
- Sort packages alphabetically and put them on separate lines for easier comparison

* Revert  -Wno-stringop-overflow

* Update the link to multi staged builds in the comment

* Update alpine:3.20.0 -> alpine:3.20.5
2025-01-12 16:28:56 +00:00
Siarhei Fedartsou
3614af7f64
Use std::string_view for key type in json::Object (#7062) 2024-11-03 18:23:23 +01:00
Siarhei Fedartsou
48e8382785
Remove unused bearing::get function (#7040)
* Remove unused bearing::get function

* Remove unused bearing::get function

* Remove unused bearing::get function

* Remove unused bearing::get function
2024-10-20 19:46:49 +02:00
Frédéric Rodrigo
becfd8a56d
Add optional support of cargo bike exclusion and width to bicyle profile (#7044) 2024-10-01 15:19:44 +03:00
Siarhei Fedartsou
4f1c62a768
Bump version of protozero to 1.7.1 (#6999) 2024-09-28 20:35:20 +02:00
Siarhei Fedartsou
09a716a9e5
Bump osmium to version 2.20.0 (#6997) 2024-09-28 20:35:05 +02:00
Siarhei Fedartsou
676f6d4704
Use std::popcount instead of __builtin_popcount (#7026) 2024-09-28 20:34:39 +02:00
Siarhei Fedartsou
f636dbfd44
Use std::countl_zero instead of __builtin_clzll (#7025) 2024-09-28 20:34:23 +02:00
Siarhei Fedartsou
5f67e715af
Add std::vector<...>::reserve in ContiguousInternalMemoryDataFacadeBase::GetOverridesThatStartAt (#7024) 2024-09-28 20:33:33 +02:00
Siarhei Fedartsou
203314b1aa
Remove unused middle_nodes_table vector (#7012) 2024-08-03 22:32:37 +02:00
Siarhei Fedartsou
e5e25a1aca
Configure self-hosted runner for benchmarks job (#6975) 2024-07-26 21:19:47 +02:00
Siarhei Fedartsou
84f12c7c6d
Add NodeJs bindings benchmarks (#7004) 2024-07-26 19:36:43 +02:00
Siarhei Fedartsou
7802f86bd6
Measure peak RAM in benchmarks (#6995) 2024-07-25 21:27:37 +02:00
Siarhei Fedartsou
43afec3b39
Move flatbuffers non-generated files back to include/engine/api/flatbuffers/ (#6996) 2024-07-13 13:43:56 +02:00
Dennis Luxen
2da7ca5338
Route pedestrians over highway=platform (#6993) 2024-07-12 20:12:19 +02:00
Dennis Luxen
8ae9abaa63
Fix parsing on feature files on other gherkin parser (#6992) 2024-07-12 17:35:44 +02:00
Siarhei Fedartsou
d3638ace59
Use thread_local instead of boost::thread_specific_ptr (#6991) 2024-07-11 23:53:22 +02:00
Siarhei Fedartsou
c2f877eb9d
Remove unused MapStorage and GenerationArrayStorage (#6990) 2024-07-11 23:10:14 +02:00
Siarhei Fedartsou
825132eec7
Bump flatbuffers to v24.3.25 version (#6968) 2024-07-10 20:44:36 +02:00
Dennis Luxen
7436835244
Remove corech options, redundant tests (#6989)
* Remove corech options, redundant tests

* Small fix
2024-07-10 16:28:07 +02:00
Siarhei Fedartsou
5e6fdda16b
Add NOTE: label to comment in stale.yml (#6987) 2024-07-09 21:27:46 +02:00
Siarhei Fedartsou
f5598efcff
Add .reserve(...) to assembleGeometry function (#6983) 2024-07-09 20:12:47 +02:00
Siarhei Fedartsou
ab771c6142
Do not trigger stale bot on each PR (#6986) 2024-07-09 19:58:03 +02:00
Siarhei Fedartsou
f1510b758d
Increase number of GitHub operations allowed in stale bot (#6985) 2024-07-09 19:32:03 +02:00
Siarhei Fedartsou
4930d2ef05
Use clang 18/17/16 instead of 15/14/13 (#6978) 2024-07-03 20:02:44 +02:00
Siarhei Fedartsou
57b792c768
Get rid of boost::optional leftovers (#6977) 2024-07-02 22:37:09 +02:00
Siarhei Fedartsou
d0ed29adb7
Use Link Time Optimisation whenever possible (#6967) 2024-06-30 21:07:49 +02:00
Siarhei Fedartsou
bdc6ed8a53
Use struct instead of tuple to define UnpackedPath (#6974) 2024-06-29 21:34:43 +02:00
Siarhei Fedartsou
93c0e1dab3
Micro performance optimisation in map matching (#6976) 2024-06-29 19:59:08 +02:00
Siarhei Fedartsou
cacb1b23f9
Fix calculation of best ops/sec in benchmarks (#6973) 2024-06-29 10:31:23 +02:00
Siarhei Fedartsou
0e17869e21
Re-use priority queue in StaticRTree (#6952) 2024-06-25 18:58:48 +02:00
Siarhei Fedartsou
5a48ce85b3
Use tmpfs for running benchmarks (#6966) 2024-06-25 17:49:41 +02:00
Siarhei Fedartsou
7d72dfebf7
Optimise encodePolyline function (#6940) 2024-06-22 20:04:32 +02:00
Siarhei Fedartsou
3d01d96036
Avoid reallocations in base64 encoding (#6951) 2024-06-22 08:50:18 +02:00
Siarhei Fedartsou
e8da3d9231
Calculate confidence interval for benchmark measurements (#6950) 2024-06-21 21:43:27 +02:00
Siarhei Fedartsou
d9ce9cf780
Get rid of unused Boost dependencies (#6960) 2024-06-21 19:04:34 +02:00
Siarhei Fedartsou
3285ce3b2f
Configure stale bot (#6963) 2024-06-21 08:51:56 +02:00
Dennis Luxen
f1eabc3ecc
Replace boost::filesystem with std (#6432) 2024-06-20 21:44:28 +02:00
knowname
c3f2a6cdb9
Add CI job for building Alpine-based Docker image (#6959) 2024-06-20 09:08:57 +02:00
knowname
97f676d5a3
add alpine dockerfile (#6958) 2024-06-19 14:15:23 +02:00
Siarhei Fedartsou
7ffc08be28
Bump versions of TBB, Expat and Lua installed via Conan (#6957) 2024-06-19 07:46:56 +02:00
Siarhei Fedartsou
feb9389436
Apply micro-optimisation for Table & Trip APIs (#6949) 2024-06-15 18:57:26 +02:00
Siarhei Fedartsou
a0eda3e7d7
Apply micro-optimisation for Route API (#6948) 2024-06-15 18:56:40 +02:00
Siarhei Fedartsou
7652f6ca6b
Apply micro-optimisation for Match API (#6945) 2024-06-14 16:04:19 +02:00
Siarhei Fedartsou
aa4e6b1cf3
Apply micro-optimisation for Nearest API (#6944) 2024-06-13 18:18:36 +02:00
Siarhei Fedartsou
de2f392960
Avoid copy of intersection in totalTurnAngle (#6938) 2024-06-10 22:40:37 +02:00
Siarhei Fedartsou
0188d2bccd
Use std::unordered_map::emplace instead of operator[] when producing JSONs (#6936) 2024-06-10 21:29:31 +02:00
Siarhei Fedartsou
054161fc7e
Avoid copy of vectors in MakeRoute function (#6939) 2024-06-10 20:06:43 +02:00
Siarhei Fedartsou
89435aa87f
Add new randomized benchmarks (#6929) 2024-06-09 17:03:24 +02:00
Siarhei Fedartsou
0cbb23abe1
Fix Windows CI: update conan.cmake and disable unit tests as temporary workaround for OOM issues (#6930) 2024-06-09 09:24:02 +02:00
Siarhei Fedartsou
a2915f78c5
Make e2e benchmarks more stable (#6927) 2024-06-08 22:27:12 +02:00
Siarhei Fedartsou
99cb17aed3
Fix bugprone-unused-return-value clang-tidy warning (#6934) 2024-06-08 14:33:24 +02:00
Siarhei Fedartsou
8fd8d0c24a
Fix performance-noexcept-move-constructor clang-tidy warning (#6933) 2024-06-08 08:33:54 +02:00
Siarhei Fedartsou
c57b0d28b0
Fix performance-noexcept-swap clang-tidy warning (#6931) 2024-06-07 16:18:10 +02:00
Siarhei Fedartsou
523ee762f0
Upgrade to clang-tidy 18 (#6919) 2024-06-06 22:20:38 +02:00
Siarhei Fedartsou
feeed75cf1
Add simple benchmarks for osrm-* tools (#6925) 2024-06-06 21:01:34 +02:00
Siarhei Fedartsou
c7ee1a59eb
Implement end to end benchmark (#6910) 2024-06-05 21:39:10 +02:00
Dennis Luxen
2725202771
Use Lemire's fast check whether to escape a JSON string (#6923) 2024-05-31 19:58:57 +02:00
Siarhei Fedartsou
42fafdcdfe
Use custom struct instead of std::pair in QueryHeap (#6921) 2024-05-31 07:06:58 +02:00
Siarhei Fedartsou
c8de759cd6
Use std::string_view::starts_with instead of boost::starts_with (#6918) 2024-05-30 21:55:25 +02:00
Siarhei Fedartsou
fb9d1cefcc
Get rid of boost::math::constants::* and M_PI in favor of std::numbers (#6916) 2024-05-30 19:40:56 +02:00
Dennis Luxen
a9b1bd88d3
Remove all core-CH left-overs (#6920)
* Remove all core-CH left-overs

* Fix formatting

* Update CHANGELOG.md
2024-05-30 17:13:44 +02:00
Siarhei Fedartsou
1ff096ac5c
Make constants in PackedVector constexpr (#6917) 2024-05-30 15:12:42 +02:00
Dennis Luxen
0ea757ed02
Remove unused header file (#6913) 2024-05-29 09:13:13 +02:00
Dennis Luxen
42cbca0ff0
Move Sol2 to canonical path (#6912) 2024-05-28 21:23:51 +02:00
Siarhei Fedartsou
c1ed73126d
Use std::variant instead of mapbox::util::variant (#6903) 2024-05-28 18:52:49 +02:00
Siarhei Fedartsou
01b1673c8a
Fix CCache usage in GitHub Actions (#6911) 2024-05-28 08:43:23 +02:00
Siarhei Fedartsou
d4dc297f75
Add CI job with GCC 14 (#6905) 2024-05-27 09:31:13 +02:00
Siarhei Fedartsou
9aaab7a53f
Enable readability-container-contains clang-tidy check (#6909) 2024-05-27 08:33:26 +02:00
Siarhei Fedartsou
1a6f4c44e7
Fix performance-type-promotion-in-math-fn clang-tidy warning (#6908) 2024-05-27 08:33:05 +02:00
Siarhei Fedartsou
163a2cfe3c
Bump rapidjson version (#6906) 2024-05-27 08:31:59 +02:00
Siarhei Fedartsou
667fd198ac
Use the latest Debian version in Dockerfile (#6904) 2024-05-27 08:30:44 +02:00
Siarhei Fedartsou
b7a990d0b5
Use C++20 (#6877) 2024-05-25 18:25:13 +02:00
Dennis Luxen
8306ed8ae3
Remove superflous iostreams include from header files (#6901) 2024-05-25 09:17:45 +02:00
Dennis Luxen
640df69aa1
Remove dead CRC32 processor code (#6900) 2024-05-24 22:43:03 +02:00
Siarhei Fedartsou
8b48e2ccc6
Bump mapbox/variant to version 1.2.0 (#6898) 2024-05-24 20:39:45 +02:00
Dennis Luxen
babdced52f
Replace GCC-specific attribute with [[nodiscard]] attribute (#6899) 2024-05-24 20:34:04 +02:00
Siarhei Fedartsou
21607e0cb2
Optimise getNetworkDistance in MLD even more (#6884) 2024-05-23 20:46:13 +02:00
Dennis Luxen
24646aada9
Remove outdated warnings (#6894) 2024-05-23 19:39:00 +02:00
Dennis Luxen
51b74a99aa
Avoid copy of std::function-based callback in path unpacking (#6895)
* Avoid copy of std::function-based callback in path unpacking

* Fix formatting

* Update CHANGELOG.md
2024-05-23 18:51:51 +02:00
Dennis Luxen
ed5003b502
Upgrade CI actions to latest versions (#6893)
* Upgrade actions

* Update remaining actions

* Update CHANGELOG.md

* Update CHANGELOG.md
2024-05-23 14:40:47 +02:00
Dennis Luxen
46dc660801
Replace boost::hash by std::hash (#6892)
* Replace boost::hash by std::hash

* Fix formatting

* Update CHANGELOG.md
2024-05-23 14:35:56 +02:00
Siarhei Fedartsou
73fb53cf36
Add benchmark for route (#6890) 2024-05-23 14:27:43 +02:00
Mugr Rex
efe6840d08
Replace boost::optional with std::optional (#6611) 2024-05-22 14:58:07 +02:00
Siarhei Fedartsou
d259848456
Optimise R-tree queries in the case of map matching (#6881) 2024-05-20 12:32:40 +02:00
Siarhei Fedartsou
8a82d3929c
Improve map matching benchmark (#6885) 2024-05-20 11:15:55 +02:00
Siarhei Fedartsou
89fce286a7
Fix benchmark script for the case if PR has empty description (#6887) 2024-05-20 09:16:53 +02:00
Siarhei Fedartsou
11c7ddc84d
Fix failing gcc-13 based CI jobs (#6886)
* Attempt to fix failing CI on gcc-13 jobs

* Attempt to fix failing CI on gcc-13 jobs

* Attempt to fix failing CI on gcc-13 jobs

* Attempt to fix failing CI on gcc-13 jobs

* Attempt to fix failing CI on gcc-13 jobs
2024-05-19 19:30:24 +02:00
Siarhei Fedartsou
54e50a67a8
Add benchmarks comparison job (#6880) 2024-05-14 17:14:59 +02:00
Bart Louwers
c00c157479
Replace dead link with archive.org link (#6882) 2024-05-14 11:49:49 +02:00
Siarhei Fedartsou
ee8e0f890a
Optimise path distance calculation in MLD map matching (#6876) 2024-05-11 16:30:43 +02:00
Dennis Luxen
1e2ffee97c
Update Makefile: fix typo (#6878) 2024-05-11 09:13:17 +02:00
Michael Bell
ffc39b8ad2
Clarify use of forcing routing steps (#6866)
The change clarifies the conditions for forcing routing steps and
simplifies the codebase to support it.

- Makes explicity  the search runtime condition for forcing a routing
step. Namely, the node is a source of the forward and reverse searches,
and it's one of the pre-identified nodes that requires a step to
be forced.
- Consolidate the two lists of force nodes into one. Not only is there
no algorithmic value in separating the nodes by geometric direction,
the  improvements to via-routes with u-turns mean atleast one of these
lists will be empty for any search.
- Rename 'force loop' to 'force step'. This moves the code away
from the original CH-specific language for checking for self-loops
in the case where this condition is met. MLD does not have loops.

Additional cucumber tests are added to cover the logic related to
negative search weights and forcing routing steps on via-route
paths.
2024-05-10 22:00:24 +01:00
Dennis Luxen
70969186f6
Migrate GCC CI jobs to run on GCC 11, 12, and 13 (#6865) 2024-05-10 20:38:32 +02:00
Dennis Luxen
dff76d31d5
Remove dead code branches (#6875) 2024-05-10 20:21:41 +02:00
Siarhei Fedartsou
3254686933
Use M1 runner to build arm64 macOS builds (#6868) 2024-05-08 21:08:11 +02:00
Siarhei Fedartsou
a6dfff725b
Configure GitHub Actions concurrency (#6870) 2024-05-08 10:06:04 +02:00
Dennis Luxen
10237b8761
Update vendored vtzero dependency to v1.1.0 (#6871) 2024-05-07 22:19:48 +02:00
Dennis Luxen
79de092bb2
Upgrade fmt dependency to v10.2.1 (#6869)
* Put fmt into version agnostic subdir

* Add fmt to dependency update script

* Remove manually added fmt

* Squashed 'third_party/fmt/' content from commit e69e5f977

git-subtree-dir: third_party/fmt
git-subtree-split: e69e5f977d458f2650bb346dadf2ad30c5320281
2024-05-07 20:55:55 +02:00
Dennis Luxen
82aa369db3
Remove dead code modernization script (#6863) 2024-05-06 19:09:10 +02:00
Dennis Luxen
0583582772
Remove include that breaks compilation for Boost v1.85.0 (#6856)
* Remove include that breaks compilation for Boost v1.85.0

* Update CHANGELOG.md

* Fix typo

* Fix issues found by newer clang-tidy version

* Add include to boost filesystem to satisfy Windows compiler
2024-05-06 18:52:40 +02:00
Dennis Luxen
99809e105c
Upgrade clang compiler in CI builds (#6861) 2024-05-06 18:12:17 +02:00
Dennis Luxen
6d361ced41
Set Windows build to quiet (#6862)
The normal flag generates 290 megabytes of log output for a regular build. Setting it to quiet will reduce this and still print errors.
2024-05-06 17:31:58 +02:00
Dennis Luxen
790fa901c7
Remove stale AppVeyor files (#6860)
* Drop left-overs from deprecated AppVeyor CI build

* Update CHANGELOG.md
2024-05-06 13:48:24 +02:00
Dennis Luxen
7f9d591ab7
Upgrade clang-format to version 15 (#6859) 2024-05-06 09:14:46 +02:00
Michael Bell
b503e96a98
Remove force-loop checks for routes with u-turns (#6858)
Each leg of a via-route supporting u-turns does not need to consider
force-loops. Negative weight checks are sufficient to prevent
incorrect results when waypoints are on the same edge.
2024-05-05 21:56:01 +01:00
Dennis Luxen
d691af4860
Remove outdated/deprecated CMake policy (#6854) 2024-05-05 22:08:40 +02:00
Dennis Luxen
befd9dc5ae
Merge pull request #6857 from DennisOSRM/upgrade_js_dependencies
Drop support for NodeJS <= v16
2024-05-05 20:29:16 +02:00
Dennis Luxen
4968d7f9d9 Disable codecov.io upload run since it consistently fails 2024-05-05 16:40:21 +02:00
Dennis Luxen
c26f0612d1 Fix typo 2024-05-05 15:24:56 +02:00
Dennis Luxen
de41299eda Update CHANGELOG.md 2024-05-05 15:03:12 +02:00
Dennis Luxen
c37bbfd07a Migrate GitHub actions from {16, 18} to {28, 20} 2024-05-05 15:01:41 +02:00
Dennis Luxen
0fd1fb2904 Update minimum NodeJS dependency to 18 2024-05-05 14:51:56 +02:00
Matthew Wigginton Bhagat-Conway
7ebd21f39e
pass flags into process_segment (#6658)
* pass flags into process_segment

---------

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-04-06 09:27:42 +01:00
Michael Bell
8ef366e061
Add support for opposite approach request parameter (#6842)
* Added approach on the opposite side of the road.

* Additional test and docs coverage for opposite approach

---------

Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
2024-04-03 19:59:15 +01:00
rezashokry
367933fc1a
Fix manuever overrides finding bug (#6739)
* sort manuever overrides vector after partition

---------

Co-authored-by: rshokri <reza.shokri@tapsi.cab>
Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-03-24 21:48:28 +00:00
Damiaan Twelker
c28ba66039
Increment feature id in tile speed layer (#6726)
* actually increment feature id in tile speed layer

---------

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-03-24 21:23:36 +00:00
Michael Bell
d0e3e2af23
Extract prerelease/build information from package semver (#6839)
* Extract prerelease/build information from package semver

Currently we only extract the major.minor.patch identifiers from
the semver label stored in package.json.

This leads to version information in executables incorrectly
reporting a release version is running on prereleases and special builds.

This commit is a quickfix to extract this information and report it
in version strings.

CMake regex parsing is not sophisticated enough to handle the full semver
regex, so we might need to explore other CMake modules if we want to
strictly parse the label.
2024-03-24 18:33:07 +00:00
martin
8526cc7d45
Replace deprecated std::is_pod (#6717)
* Replace deprecated std::is_pod
2024-03-17 11:49:55 +00:00
Trivikram Kamat
016440fc7e
Remove unused AWS SDK for JavaScript v2 (#6730) 2024-03-17 11:37:51 +00:00
Monday
6e77d53946
Correctly handle compressed traffic signals (#6724)
Unidirectional traffic signal segments are currently not compressed.
This means traffic signals which are not on turns can be missed and
not applied the correct penalty.

This commit changes this behaviour to correctly handle the graph
compression. Additional tests are added to ensure there is no
regression for other cases (turns, restrictions).

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-03-17 11:32:10 +00:00
Frédéric Rodrigo
99875b4d24
Set Maxspeed for Philippines (#6776) 2024-03-16 11:35:25 +00:00
Michael Bell
c315a586f7
Delete .github/ISSUE_TEMPLATE/question.md (#6827)
With Discussions now enabled, remove the question issue template to encourage Q&A interaction in the more appropriate place.
2024-03-15 09:35:09 +00:00
Daniel Spasojevic
69c38401bc
Update osrm-backend-docker link to point to github hosted repo (#6831) 2024-03-15 10:29:39 +01:00
Michael Bell
e219eb9442
Pin Conan revisions correctly (#6828)
* Pin Conan revisions correctly

Conan dependencies are not pinned correctly. This means we're
pulling in a newer onetbb recipe that no longer has a shared
library option.

Following other examples of how to pin revisions with cmake
for conan v1, we correctly pin the expected revisions.

Longer term we should look into
- upgrading to conan v2
- defining the conan config separately from cmakelists.txt
- understanding the need for disabling onetbb shared library support

but for the purposes of reviving CI, this will be sufficient.

* Fix macos CI builds
2024-03-15 09:27:59 +00:00
Daniel Patterson
31e31a63d0
Fix some compilation issues on modern macOS systems (#6709)
* Fix various compiler warnings generated by Apple clang 15, and workaround some boost 1.8 bugs

* Fix formatting.
2023-10-12 23:04:39 +02:00
danieldegroot2
b437ce5b33
Update debug_way.lua (#6713) 2023-10-12 23:03:35 +02:00
Frédéric Rodrigo
5723eaaa6a
Added motorway speed limits for Bulgaria (original fix by pl71) (#6698) 2023-09-13 22:01:36 +02:00
Frédéric Rodrigo
0f7b86b099
Install data directory (geojson files) like the profiles directory (#6699) 2023-09-13 22:01:06 +02:00
fenwuyaoji
14dcf91812
add keepalive_timeout flag (#6674)
* add keepalive_timeout flag
2023-08-30 19:06:39 +01:00
Lasse Liehu
d234c7246c
Don't route on proposed ways (#6615) 2023-08-20 10:17:30 +01:00
Whytro
3f9347cfb2
Fix operator overload on RouteParameters (#6646)
* Fix operator overload on RouteParameters
2023-08-19 21:48:15 +01:00
Michael Bell
db7946d762
Add support for disabling feature datasets (#6666)
This change adds support for disabling datasets, such that specific
files are not loaded into memory when running OSRM. This enables users
to not pay the memory cost for features they do not intend to use.

Initially, there are two options:
- ROUTE_GEOMETRY, for disabling overview, steps, annotations and waypoints.
- ROUTE_STEPS, for disabling steps only.

Attempts to query features for which the datasets are disabled will
lead to a DisabledDatasetException being returned.
2023-08-04 18:43:37 +01:00
Michael Bell
522d0f066e
Add 'load directly' mode to default Cucumber test suite (#6664)
Currently `npm test` runs the Cucumber suite with a matrix
configuration for selecting the algorithm (CH, MLD) and data loading
(shared-memory, mmap) options.

However, there is a third data loading option, 'load directly',
which is to directly load the datasets into the osrm-routed process memory.

The code paths for each data loading option are distinct:

Storage::Run + SharedMemoryAllocator
MMapMemoryAllocator
ProcessMemoryAllocator

This commit adds direct data loading as part of the Cucumber
configuration matrix.

This will ensure optional dataset support can be added without any
regressions.
2023-08-01 09:24:51 +01:00
Michael Bell
3bb82ce1e2
Minor fixes (#6655)
* Ensure required file check in osrm-routed is correctly enforced.

The storage module had a stricter check. This keeps the IOConfig
check in sync.

* Correct HTTP docs to reflect summary output dependency on steps parameter.

There is no summary parameter.

* npm audit fix
2023-07-18 20:23:23 +01:00
Debarshi Kundu
62e11fd5db
Corrected README with 'echo' command (#6638) 2023-06-13 10:07:15 +02:00
Brad Smith
503d558e90
Fix building on OpenBSD (#6637)
Only utilize librt if its presence is detected.
2023-06-06 07:04:51 +02:00
Lasse Liehu
af59a9cfae
Fix build with GCC 13 (#6632)
Building with GCC 13 failed because for example std::int32_t
was not found. Porting guide [1] suggested to add explicit includes
for <cstdint> if necessary, so did just that.

[1]: https://gcc.gnu.org/gcc-13/porting_to.html
2023-05-31 07:53:04 +02:00
Whytro
72da455185
Allow -1.0 as unlimited for default_radius value (#6599) 2023-05-31 07:52:35 +02:00
Al
0ca913132a
Added block_counter variable to a preprocessor check, minor bug. (#6596) 2023-04-16 23:22:30 +02:00
Nils
134da91fa8
keep libosrm* (#6602) 2023-04-15 16:27:51 +02:00
Whytro
d51631401e
Add support for a default_bearing_radius flag (#6575) 2023-03-24 16:49:33 +01:00
Matthew Wigginton Bhagat-Conway
d6afe91d8f
print tracebacks and line numbers for Lua runtime errors (#6564)
* print tracebacks and line numbers for Lua runtime errors

* revert format changes

* update changelog with lua traceback, #6564

* revert using protected_function for old GetStringListFromFunction and source_function #6564

* add unit test for line numbers in tracebacks, #6564

* apply clang-format (#6564)

* remove unused test helper function, #6564

* suppress leaksanitizer warnings in extract-tests, #6564

When the extractor encounters a lua runtime error, some osmium objects are not freed. In production this doesn't matter because these errors bring down OSRM. In the tests we catch them to ensure they occur, and the leaksanitizer flags them.
2023-03-23 19:18:58 +01:00
Pratik Rajput
192d077ada
Addressing grammatical nits and fixing typo in testing.md (#6550) 2023-03-15 17:16:51 +01:00
Samuel Brucksch
82b73ed9ab
fix oneway handling in get_forward_backward_by_key (#6569) 2023-03-09 17:48:15 +01:00
Jingchen Ye
0e7c3d8ad4
Move TarjanSCC from extractor to util (#6562) 2023-03-09 17:47:28 +01:00
Pratik Rajput
a63ba91c8f
Fix typo in api.md (#6567)
* Fix typo in api.md

Signed-off-by: Pratik <pratikrajput1199@gmail.com>
Co-authored-by: Siarhei Fedartsou <siarhei.fedartsou@gmail.com>
2023-03-09 17:10:42 +01:00
Patrick Fitzgerald
51e04209e3
Fixing discord link (#6536) 2023-02-10 15:28:34 +01:00
Pratik Rajput
56ed2cb196
Fixed typo in profiles.md (#6538) 2023-02-10 15:28:02 +01:00
zephyr
ebd9ab4548
fix(json_render): json_render is not accurate enough for extremely sm… (#6531) 2023-02-02 18:58:25 +01:00
Siarhei Fedartsou
376282d946
Update README.md (#6529) 2023-01-29 09:56:02 +01:00
Pratik Rajput
53295760ac
Fixed typo and grammatical mistakes in developing.md (#6520) 2023-01-28 00:22:29 +01:00
Jeremiah
e590dae5f6
Fix boost header deprecation warning (#6515) 2023-01-21 08:47:05 +01:00
Samuel Brucksch
d9df33dd0a
fix typo (#6491) 2023-01-11 00:46:42 +01:00
Dennis Luxen
95c4523987
Merge pull request #6480 from Project-OSRM/nested_namespace
Nested namespace
2022-12-21 18:27:13 +01:00
Dennis Luxen
26987f9049 Fix conditionally built tool 2022-12-21 15:52:09 +01:00
Dennis Luxen
7c06726a35 Fix formatting 2022-12-20 18:00:11 +01:00
Dennis Luxen
d7c44f0bc0 Merge remote-tracking branch 'origin/master' into nested_namespace 2022-12-11 10:25:13 +01:00
Dennis Luxen
a4aa153ba4 Use nested namespace
It's a mechanical change to modernize the code base
2022-12-11 10:17:17 +01:00
Dennis Luxen
1204b746d5
Merge pull request #6477 from Project-OSRM/update_cmakelists
Update CMakeLists
2022-12-11 10:15:41 +01:00
Dennis Luxen
076cbd7018
Merge pull request #6479 from Project-OSRM/dl_fix_cmake_warning
Fix CMake warning
2022-12-11 10:15:33 +01:00
Dennis Luxen
afd340da44
Merge pull request #6478 from Project-OSRM/dluxen_less_dependencies
Less dependencies by inner sourcing cheap-ruler
2022-12-11 10:15:14 +01:00
Dennis Luxen
898cbe8da4 Install PkgConfig on Docker build image 2022-12-10 21:50:24 +01:00
Dennis Luxen
16c6f23791 Fix CMake warning
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (Lua).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake-3.24/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
  cmake/FindLua.cmake:39 (include)
  CMakeLists.txt:571 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
2022-12-10 20:50:32 +01:00
Dennis Luxen
612ca82a06 Fix formatting 2022-12-10 20:01:16 +01:00
Dennis Luxen
1215062e4c Port the used bits from CheapRuler, drop dependencies 2022-12-10 19:54:51 +01:00
Dennis Luxen
5292172770 One more place where version is listed 2022-12-10 18:58:25 +01:00
Dennis Luxen
6e5f0d74bd Use cmake 3.18 instead of 3.20 because of debian support 2022-12-10 18:50:37 +01:00
Dennis Luxen
5bab68c737 Update CMakeLists
- remove GOLD linker special case handling
- bump minimum cmake version to 3.20
- simplify LTO detection
- remove outdated way to check for compiler flags
- remove outdated compiler version gates (rely on CXX version)
- remove outdated Apple platform handling
- disable compiler-specific CXX extensions
- require boost 1.70 in all builds
- remove unused variable
2022-12-10 18:25:58 +01:00
Dennis Luxen
152a52bc1a
Merge pull request #6444 from Project-OSRM/dl_using_keyword
[CPP17] Modernize: Replace typedef with using statements
2022-12-10 18:14:43 +01:00
Dennis Luxen
c605b1db38 Fix typo 2022-12-10 16:28:03 +01:00
Dennis Luxen
f4189d9487 Fix formatting 2022-12-10 16:08:22 +01:00
Dennis Luxen
f983d626ac Merge remote-tracking branch 'origin/master' into dl_using_keyword 2022-12-10 16:02:53 +01:00
Siarhei Fedartsou
73b2a86a95
Move vector in CSVFilesParser instead copying it (#6470) 2022-12-03 17:53:56 +01:00
Siarhei Fedartsou
2044398dfd
Add CI job which builds OSRM with gcc 12 (#6455) 2022-11-28 16:29:43 +01:00
Siarhei Fedartsou
095b726a92
Use <boost/iterator/function_output_iterator.hpp> instead of deprecated <boost/function_output_iterator.hpp> (#6458) 2022-11-16 21:09:54 +01:00
Siarhei Fedartsou
18dcd27a9b
Use node-api instead of NAN (#6452) 2022-11-16 15:44:36 +01:00
Frédéric Rodrigo
a1b3efe260
Remove at:urban maxspeed, partial revert of 2bbb347f57 (#6450) 2022-11-11 21:52:54 +01:00
Siarhei Fedartsou
6d10523440
Upgrade to clang-tidy 15 (#6439) 2022-11-06 22:45:35 +01:00
Frédéric Rodrigo
2bbb347f57
Car profile, add new specific country speed limit at:urban, ca-on:rural and es:trunk (#6443) 2022-11-06 21:27:03 +01:00
Siarhei Fedartsou
5f82d0c9ba
Get rid of unused functions in util/json_util.hpp (#6446) 2022-11-06 21:13:04 +01:00
Dennis Luxen
aeaf5e0735
Merge pull request #6433 from Project-OSRM/replace_boost_stringref
Replace boost::string_ref with std::string_view
2022-11-06 15:54:18 +01:00
Siarhei Fedartsou
8a186e6f49
Remove C++14 references from README and package.json (#6438) 2022-11-06 15:20:47 +01:00
Dennis Luxen
2ea168c26c
Merge pull request #6445 from Project-OSRM/dl_drop_gcc7
Drop GCC7 support
2022-11-06 15:08:14 +01:00
Dennis Luxen
a12625afac Drop GCC7 support 2022-11-06 13:33:10 +01:00
Dennis Luxen
8bff55cd85 [CPP17] Modernize: Replace typedef with using statements 2022-11-06 13:21:45 +01:00
Dennis Luxen
bb4fd93fab Fix formatting 2022-11-06 12:26:37 +01:00
Dennis Luxen
b13820f520 Use std::back_inserter 2022-11-06 12:19:32 +01:00
Dennis Luxen
fc12b6c365
Merge pull request #6441 from Project-OSRM/python2_deprecation 2022-11-06 08:21:16 +01:00
Dennis Luxen
cb515ba42f Merge remote-tracking branch 'origin/master' into replace_boost_stringref 2022-11-05 17:31:06 +01:00
Dennis Luxen
634e7fe392 Merge remote-tracking branch 'origin/master' into python2_deprecation 2022-11-05 17:29:57 +01:00
Siarhei Fedartsou
6ab8728807
Apply workaround for Conan installation issue on CI (#6442) 2022-11-05 16:56:16 +01:00
Siarhei Fedartsou
0ae5190937
Fix npm audit warnings in NPM package (#6437) 2022-11-04 12:19:39 +01:00
Dennis Luxen
a1c1fefd6e Fix formatting, pass by value 2022-11-04 11:49:54 +01:00
Dennis Luxen
6fa7bd8abd Upgrade check_tackinfo.py to Python3 2022-11-04 11:47:40 +01:00
Dennis Luxen
7359d6a21b Merge remote-tracking branch 'origin/master' into replace_boost_stringref 2022-11-04 11:43:41 +01:00
Dennis Luxen
5dda33fa88 More efficient toLower implementation 2022-11-04 11:42:37 +01:00
Dennis Luxen
5280ca4e16 Pass string_view by value 2022-11-04 11:41:02 +01:00
Dennis Luxen
2c02d4e5ab Update CHANGELOG.md 2022-11-01 12:10:48 +01:00
Siarhei Fedartsou
54d486ae12
Drop support of Node 12 & 14 (#6431) 2022-11-01 08:23:08 +01:00
Siarhei Fedartsou
afe34456b9
Delete CloudFormation templates (#6435)
There is no need in them - it seems they were needed to manage some Mapbox S3 bucket which we have no access to anyway.
2022-10-31 13:22:13 +01:00
Dennis Luxen
2f75d6f22b
Merge pull request #6429 from Project-OSRM/less_boost_unordered
Replace boost::unordered_{map/set} with std, also remove code duplication
2022-10-30 22:17:48 +01:00
Dennis Luxen
85e6a854aa Fix missing includes (on Windows) 2022-10-30 22:08:29 +01:00
Dennis Luxen
12f49d6f24 Stray whitespace 2022-10-30 20:11:36 +01:00
Dennis Luxen
7149547645 Fix formatting 2022-10-30 20:10:09 +01:00
Dennis Luxen
565959b389 Remove util/string_view header 2022-10-30 20:01:46 +01:00
Dennis Luxen
5c9d0d152c Remove usage of StringView typedef 2022-10-30 19:53:26 +01:00
Dennis Luxen
274dcc58a5 Remove superflous std::hash specialization 2022-10-30 19:21:06 +01:00
Dennis Luxen
d06b23d819 More fixes 2022-10-30 14:08:17 +01:00
Dennis Luxen
91e9623b31 Fix formatting 2022-10-30 14:06:19 +01:00
Dennis Luxen
0021ccef59 Replace boost::string_ref with std::string_view 2022-10-30 13:59:59 +01:00
Dennis Luxen
061f0a1f14 Fix includes 2022-10-30 11:43:28 +01:00
Dennis Luxen
60e283312c
Fix typo historgram -> histogram (#6427) 2022-10-30 08:34:00 +01:00
Dennis Luxen
f97e18d285 Fix formatting 2022-10-29 23:01:38 +02:00
Dennis Luxen
7b73b977ff Replace boost::unordered_{map/set} with std, also remove code duplication 2022-10-29 22:57:14 +02:00
Michael Bell
5d468f2897
Make edge metrics strongly typed (#6421)
This change takes the existing typedefs for weight, duration and
distance, and makes them proper types, using the existing Alias
functionality.

Primarily this is to prevent bugs where the metrics are switched,
but it also adds additional documentation. For example, it now
makes it clear (despite the naming of variables) that most of the
trip algorithm is running on the duration metric.

I've not made any changes to the casts performed between metrics
and numeric types, they now just more explicit.
2022-10-28 15:16:12 +01:00
Siarhei Fedartsou
16685d0de9
Add link to Discord server (#6422) 2022-10-26 11:22:28 +02:00
Siarhei Fedartsou
82897791d1
Update actions/cache to v3 (#6420) 2022-10-24 00:52:15 +02:00
Michael Bell
9ad432c5b2
Fix adding traffic signal penalties during compression (#6419)
Weight and duration penalties are flipped in the lambda function
that applies penalties from traffic signals.

Duration is in deciseconds, whilst weight is multipled by
10^weight_precision, with weight_precision being 1 by default.

Therefore, for default routability profile, the penalties end up
being the same, hence why no tests picked this up.

If distance weight is used however, it will incorrectly apply an
additional penalty to the weight, and not add the traffic signal
delay to the duration in the routing graph.

To confuse things further, in some API responses the values are
correct because they use geometry data instead, but it's still
possible that a sub-optimal route was selected.

However, given the distance weight is in meters, and the additional
penalty per traffic light would be 20, it's unlikely this would
have changed the routing results.

In any case, we correct the function to apply the arguments correctly.
2022-10-23 14:59:12 +01:00
Siarhei Fedartsou
c1d2c15995
Handle snapping parameter for all plugins in NodeJs bindings, but not for Route only (#6417) 2022-10-22 16:49:35 +02:00
Siarhei Fedartsou
fb1bb7a15b
Fix annotations=true handling in NodeJS bindings & libosrm (#6415) 2022-10-19 08:35:18 +02:00
Siarhei Fedartsou
d65e8c7d1e
Fix bindings compilation on latest Node (#6416) 2022-10-18 21:59:39 +02:00
Michael Bell
5e5f1f4add
5.27.1 release (#6409)
* Bookkeeping for 5.27.1 release

* Reset for next release
2022-10-14 23:04:41 +01:00
Siarhei Fedartsou
9d160a9b5d
Revert back to using custom HTTP parser instead of Boost.Beast (#6407) 2022-10-14 14:37:33 +02:00
Siarhei Fedartsou
d143de597d
Fix bug with large HTTP requests leading to Bad Request in osrm-routed. (#6403) 2022-10-13 16:53:49 +02:00
Siarhei Fedartsou
4026ed54c0
Add support for surface=metal,grass_paver,woodchips in bicyle profile (#6395) 2022-10-11 11:09:56 +02:00
Daniel J. H
895e4bf6d5
Adds cucumber scenario for u turn restrictions at intersection (#4484) 2022-10-10 22:27:27 +02:00
Michael Bell
cb90d587be
Release 5.27 (#6392)
* Bookkeeping for 5.27.0 release.

* Prep rc.1

* Final 5.27 release tag

* Reset for next release
2022-10-10 17:54:01 +01:00
Michael Bell
284e110f2e
Actually match the tag naming conventions (#6393)
Wasn't matching on release candidates, nor any of the previous special tags convention.
2022-10-06 22:08:36 +01:00
Michael Bell
ac1edc7675
Prepare scoped Node package (#6386)
In case we're not able to get access to the unscoped credentials.
Scoped packages are also the recommended approach for projects
managed by a team of developers.
2022-10-06 21:05:51 +01:00
Siarhei Fedartsou
7be9039f53
Get rid of Mason (#6387) 2022-10-06 14:13:12 +02:00
Siarhei Fedartsou
52b516e943
Use clang-format from CI base image (#6391) 2022-10-06 12:50:31 +02:00
Nils
f3c03307cb
Add conanbuildinfo.json (#6388) 2022-10-04 18:08:41 +02:00
Siarhei Fedartsou
9a4b4648f4
Improve performance of JSON rendering (#6380) 2022-10-03 21:43:51 +02:00
Michael Bell
41fd947ebd
Update docs to reflect recent build and dependency changes (#6383) 2022-10-02 19:55:59 +01:00
Michael Bell
e328031661
Add issue templates for bug reporting, features, and questions. (#6385)
Primarily to educate bug reporters that demo site != default settings,
but also to help organise and auto-assign new issues.
2022-10-02 17:45:35 +01:00
Michael Bell
b7daa7e641
Gracefully handle no-turn intersections in guidance processing. (#6382)
Badly constructed OSM intersections can create OSRM intersection
views that have no valid turns.
The guidance code for segregated intersections tries to look
ahead to the second intersection to ensure lanes are  announced
intuitively.
Currently, OSRM assumes there are always turns at the second
intersection that we should consider. This commit corrects
this assumption so that it can now handle badly constructed
OSM intersections with no turns.
2022-10-01 14:35:08 +01:00
Siarhei Fedartsou
21888334dd
Do not generate intermediate .osrm file in osrm-extract. (#6354) 2022-09-30 14:29:10 +02:00
Siarhei Fedartsou
395cc6e9df
Add timestamps for logs (#6375) 2022-09-30 14:28:52 +02:00
Siarhei Fedartsou
902bfc7806
Refactor CMake code related to compiler warnings, enable some additional warnings (#6355) 2022-09-30 11:42:36 +02:00
Siarhei Fedartsou
3c5d99b4cb
Improve performance of map matching via getPathDistance optimization (#6378) 2022-09-29 22:27:19 +02:00
Michael Bell
ef8f3d7508
Ensure u-turn exists in intersection view (#6376)
Due to some rather complex logic that tries to calculate intersection
angles by looking further up the road, it's possible to return
an intersection view that is missing a u-turn - something which
is assumed to exist in later guidance calculations.

We apply a fix here by ensuring the u-turn is always included in
the returned view.
2022-09-27 13:49:12 +01:00
Louis
660cea8fcc
Bicycle surface speeds (#6212) 2022-09-23 17:54:55 +02:00
Siarhei Fedartsou
be353630d5
Fix a couple of warnings found by PVS Studio (#6372) 2022-09-22 23:28:12 +02:00
Siarhei Fedartsou
9b834810d5
Build Node bindings on Windows (#6334)
Extends CI to build NodeJS bindings for Windows.
2022-09-20 20:43:13 +01:00
Siarhei Fedartsou
1c65ea2194
Configure cross-compilation for Apple Silicon (#6360)
Adds support for Apple Silicon binaries for NodeJS bindings.
2022-09-17 13:00:53 +01:00
Siarhei Fedartsou
96f5780f06
Update CI to use clang-tidy 14 (#6353) 2022-08-31 23:39:47 +02:00
Siarhei Fedartsou
c003ac1055
Pin revisions of Conan dependencies (#6351) 2022-08-31 09:59:53 +02:00
Siarhei Fedartsou
9a638f3568
Optimize RestrictionParser performance (#6344) 2022-08-30 21:08:52 +02:00
Siarhei Fedartsou
2cf957148b
Support floats for speed value in traffic updates CSV (#6327) 2022-08-30 15:34:46 +02:00
Michael Bell
b17cbb4c47
Support OSM traffic signal directions (#6153)
Currently OSRM parses traffic signal nodes without consideration
for the direction in which the signal applies. This can lead
to duplicated routing penalties, especially when a forward and backward
signal are in close proximity on a way.

This commit adds support for directed signals to the extraction and
graph creation. Signal penalties are only applied in the direction
specified by the OSM tag.

We add the assignment of traffic directions to the lua scripts,
maintaining backwards compatibility with the existing boolean
traffic states.

As part of the changes to the internal structures used for tracking
traffic signals during extraction, we stop serialising/deserialising
signals to the `.osrm` file. The traffic signals are only used by
`osrm-extract` so whilst this is a data format change, it will not
break any existing user processes.
2022-08-30 10:36:49 +01:00
Siarhei Fedartsou
d8b358e810
Use apt-get to install Clang on CI (#6345) 2022-08-30 10:25:53 +02:00
Siarhei Fedartsou
b4142cf1a2
Add Flatbuffers support to NodeJS bindings (#6338) 2022-08-29 22:01:26 +02:00
Siarhei Fedartsou
06719be2b1
Use Lua 5.4 in Docker image (#6346) 2022-08-29 00:03:03 +02:00
Siarhei Fedartsou
18e5faa113
Remove Appveyor status from README.md (#6347) 2022-08-28 23:59:09 +02:00
Siarhei Fedartsou
a46241e45c
Add Node docs for exclude and skip_waypoints options (#6342) 2022-08-28 21:56:09 +02:00
Michael Bell
bfb74c2dad
Fix snapping target locations to ways used in turn restrictions (#6339)
Currently there is an edge-case in the turn restriction implementation,
such that routes can not be found if the target input location snaps
to a way used in a (multi) via restriction.

With the addition of snapping input locations to multiple ways, we
can now also snap to the "duplicate" edges created for the restriction graph,
thereby fixing the problem.
This is achieved by adding the duplicate restriction edges to the
geospatial search RTree.

This does open up the possibility of multiple paths representing exactly
the same route - one using the original edge as a source, the other
using the duplicate restriction graph edge as source. This is fine,
as both edges are represented by the same geometry, so will generate
the same result.
2022-08-27 15:59:44 +01:00
|so
3d5db4511c
Update http.md (#6150)
Fix the typos and some basic grammar mistakes

Co-authored-by: Siarhei Fedartsou <siarhei.fedartsou@gmail.com>
2022-08-27 15:59:02 +01:00
Michael Bell
d74e7b66bd
Support snapping to multiple ways at an input location (#5953)
This PR improves routing results by adding support for snapping to
multiple ways at input locations.

This means all edges at the snapped location can act as source/target
candidates for routing search, ensuring we always find the best route,
and not the one dependent on the edge selected.
2022-08-27 11:36:20 +01:00
Siarhei Fedartsou
bb18a2b428
Fix TBB in case of Conan + NodeJS build (#6333) 2022-08-26 17:09:52 +02:00
Michael Bell
c204360aa0
Fix HTTP compression precedence (#6331)
There is a bug in the deflate compression. Therefore, we do not want
to select this in the default choice for HTTP response compression.
Instead we revert back to the previous precedence, selecting gzip as
the priority.
2022-08-25 17:49:35 +01:00
Siarhei Fedartsou
df3c553f4f
Remove redundant nullptr check. (#6326) 2022-08-25 00:01:56 +02:00
Siarhei Fedartsou
91895604c9
Migrate to modern TBB version (#6300) 2022-08-24 18:13:49 +02:00
Michael Bell
a98074a051
Improvements to maneuver override processing (#6215)
This change unblocks the osrm-extract debug build, which is
currently failing on a maneuver override assertion.

The processing of maneuver overrides currently has three issues
- It assumes the via node(s) can't be compressed (the failing assertion)
- It can't handle via-paths containing incompressible nodes
- It doesn't interop with turn restriction on the same path

Turn restrictions and maneuver overrides both use the same
from-via-to path representation.
Therefore, we can fix these issues by consolidating their
structures and reusing the path representation for
turn restrictions, which already is robust to the above
issues.

This also simplifies some of the codebase by removing maneuver
override specific path processing.

There are ~100 maneuver overrides in the OSM database, so the
impact on processing and routing will be minimal.
2022-08-24 16:19:24 +01:00
Siarhei Fedartsou
8e74b7af9d
Enable performance-move-const-arg clang-tidy check (#6319) 2022-08-23 19:03:41 +02:00
Michael Bell
869b3fae82
Bump CI complete job to ubuntu-22.04 (#6323)
18.04 is being deprecated.
2022-08-22 20:55:28 +01:00
Maciej Bukczynski
32fb8607e4
Add node_osrm support for skip_waypoints parameter (#6060) 2022-08-22 21:47:47 +02:00
Lev Dragunov
928867c520
Add data_version field to responses of all plugins. (#5387) 2022-08-22 21:07:32 +02:00
Michael Bell
972a848094
Lazily generate optional route path data (#6045)
Currently route results are annotated with additional path information,
such as geometries, turn-by-turn steps and other metadata.

These annotations are generated if they are not requested or returned
in the response.
Datasets needed to generate these annotations are loaded and available
to the OSRM process even when unused.

This commit is a first step towards making the loading of these datasets
optional. We refactor the code so that route annotations are only
generated if explicitly requested and needed in the response.

Specifically, we change the following annotations to be lazily generated:
- Turn-by-turn steps
- Route Overview geometry
- Route segment metadata

For example. a /route/v1 request with
steps=false&overview=false&annotations=false
would no longer call the following data facade methods:
- GetOSMNodeIDOfNode
- GetTurnInstructionForEdgeID
- GetNameIndex
- GetNameForID
- GetRefForID
- GetTurnInstructionForEdgeID
- GetClassData
- IsLeftHandDriving
- GetTravelMode
- IsSegregated
- PreTurnBearing
- PostTurnBearing
- HasLaneData
- GetLaneData
- GetEntryClass

Requests that include segment metadata and/or overview geometry
but not turn-by-turn instructions will also benefit from this,
although there is some interdependency with the step instructions
- a call to GetTurnInstructionForEdgeID is still required.
Requests for OSM annotations will understandably still need to
call GetOSMNodeIDOfNode.

Making these changes unlocks the optional loading of data contained in
the following OSRM files:
- osrm.names
- osrm.icd
- osrm.nbg_nodes (partial)
- osrm.ebg_nodes (partial)
- osrm.edges
2022-08-22 12:59:20 +01:00
Michael Bell
3cfd0e8334
Complete support for no_entry and no_exit turn restrictions (#5988)
The internal representation of turn restrictions expects only one
`from` way and only one `to` way.

`no_entry` and `no_exit` turn restrictions can have multiple `from` and
`to` ways respectively. This means they are not fully supported by
OSRM's restriction parser.

We complete support for these turn restriction types by parsing all
ways and converting a valid restriction with multiple `from`/`to` members
into multiple internal restrictions.
2022-08-22 12:58:16 +01:00
Michael Bell
b4b1aea567
Add support for non-round-trips with a single fixed endpoint (#6050)
Currently /trip supports finding round-trip routes where only the
start or end location is fixed. This PR extends this feature to
non-round-trip requests.

We do this by a new table manipulation that simulates non-round-trip
fixed endpoint requests as a round-trip request.
2022-08-22 12:56:47 +01:00
Rafael Guglielmetti
e3c7995b00
Add missing files in exception message (#5360) 2022-08-22 08:32:25 +02:00
Michael Bell
7f014bd616 Clarify identifier types used in data facade
The data facade interface contains numerous methods for looking up
datapoints by identifiers.
Many of the parameters use the NodeID or EdgeID types. However, these two
identifier types are used for representing three different contexts:

1. Node-based graph edges and nodes
2. Edge-based graph edges and nodes
3. Packed geometries

Consider the use of identifier parameters in these examples:

---

GetWeightPenaltyForEdgeID(const EdgeID id)  <- edge-based edge

GetUncompressedForwardWeights(const EdgeID id) <- packed geometry

IsLeftHandDriving(const NodeID id) <- edge-based node

GetBearingClass(const NodeID node) <- node-based node

---

This mixing of contexts within the same interface makes it
difficult to understand the relationships and dependencies between
the OSRM datasets.

For 1. and 2. we continue to use the NodeID and EdgeID types, but
change the interface parameter names to identify them as
edge-based or node-based graph properties.

For 3. we define a new type definition, PackedGeometryID.

These changes are to aid with readability. A next step would be
to strongly type these definitions, leveraging the Alias template
already used for OSM identifiers.
2022-08-21 21:37:39 +02:00
Siarhei Fedartsou
e872f1d6c3
Do not use deprecated Callback::Call overload in Node bindings (#6318) 2022-08-20 17:27:14 +01:00
Siarhei Fedartsou
47e5591ed8
Use the latest node on CI (#6317) 2022-08-20 17:16:05 +01:00
Joonas Paalasmaa
9d4dd2595e
Remove references to project-osrm.wolt.com (#6314)
At Wolt, we are cleaning up subdomains under wolt.com, and project-osrm.wolt.com will go offline soon.
2022-08-20 17:14:38 +01:00
Siarhei Fedartsou
aadc088084
Fix distance calculation consistency. (#6315)
Consolidate great circle distance calculations to use cheap ruler library.
2022-08-19 22:31:40 +01:00
Siarhei Fedartsou
8f0cd5cf7b
Migrate Windows CI to GitHub Actions. (#6312)
It is quite difficult to maintain current Windows CI, because it uses pre-compiled dependencies stored on wolt.com server and there is low chance to find someone who is able to update it.
2022-08-19 18:49:09 +01:00
Siarhei Fedartsou
624fea6d33
Add smoke test for Docker image (#6313)
* Add smoke test for Docker image
2022-08-19 11:32:55 +01:00
Siarhei Fedartsou
9688e48ad1
Update libosmium to 2.18.0. Fix problem with Docker image build. (#6303) 2022-08-16 18:26:21 +01:00
Siarhei Fedartsou
51a8486375
Fix performance issues after migration to sol2 3.3.0 (#6304)
* Fix performance issues after migration to sol2 3.3.0
2022-08-15 23:10:56 +01:00
Siarhei Fedartsou
440c00064e
Remove EXACT from find_package if using Conan (#6299)
* Remove EXACT from find_package if using Conan
2022-08-15 21:21:01 +01:00
Patrick Niklaus
e5450e8c68
Remove highway=bicycle safety bonus (#6296)
* Remove highway=bicycle safety bonus

This removes a bonus for a road class that doesn't exist (cycleway would
be correct), but the code was buggy since safety_bonus is nil and caused
an arithmetic exception. We only caught this 4 (!) years later since
recently a way was tagged with highway=bicycle and made it in our OSM
data leading to preprocessing failures.
2022-08-15 21:14:37 +01:00
Siarhei Fedartsou
f19247a7ca
Pass osm_node_ids by reference in osrm::updater::Updater class (#6298) 2022-08-15 21:12:58 +01:00
Siarhei Fedartsou
e7185b4bcb
Use Boost.Beast to parse HTTP request (#6294) 2022-08-02 21:12:05 +01:00
Siarhei Fedartsou
00816722dd
Configure Undefined Behaviour Sanitizer (#6290) 2022-08-01 22:40:26 +01:00
Siarhei Fedartsou
589becbfec
Use Conan instead of Mason to install code dependencies (#6284)
* Use Conan instead of Mason to install code dependencies
2022-08-01 21:21:20 +01:00
Siarhei Fedartsou
4e8ee288d9
Migrate to C++17. Update sol2 to 3.3.0. (#6279)
* Migrate to C++17. Update sol2 to 3.3.0.
2022-07-31 00:56:17 +01:00
Siarhei Fedartsou
204fdaff6e
Fix bug with reading Set values from Lua scripts. (#6285)
* Fix bug with reading Set values from Lua scripts.

* Add test for foot profile named-road suffixes

Co-authored-by: Michael Bell <michael@mjjbell.com>
2022-07-30 23:14:06 +01:00
Siarhei Fedartsou
1a3d0f7c20
Update macOS CI image to macos-11 (#6286)
* Update macOS CI image to macos-11
2022-07-30 13:40:21 +01:00
Siarhei Fedartsou
06b1b980bb
Enable even more clang-tidy checks (#6273) 2022-07-04 21:46:59 +01:00
Siarhei Fedartsou
19d2ec56b8
Configure CMake to not build flatbuffers tests and samples (#6274)
* Do not build flatbuffers tests and samples
2022-07-03 23:59:54 +01:00
Siarhei Fedartsou
3d2db20777
Enable more clang-tidy checks. (#6270)
* Enable more clang-tidy checks
2022-06-30 14:32:12 +01:00
Siarhei Fedartsou
59953172e8
Configure clang-tidy job on CI (#6261) 2022-06-28 00:14:28 +01:00
John Doe
79d4363d59
Enable arm docker build (#6172)
This issue enables dockerX for multi-arch docker image building. 
Resulting images can be run on x86 and arm processors (for example aws graviton).
2022-03-08 20:02:11 +00:00
John Doe
662a8d0a12
Split build command into two layers (#6175)
* Split build command into two layers

Co-authored-by: nurikk <ainur@yojee.com>
2022-02-16 21:18:28 +00:00
Yuriy Chernyshov
f2e284623e
Do not depend on ADL 2022-01-10 11:28:43 +00:00
Nikolay Mikov
c0b79a8d0e Remove set(CMAKE_OSX_ARCHITECTURES "x86_64") on MacOS 2022-01-09 22:01:34 +00:00
Michael Bell
1e70b645e4 Fix generation of NodeJS API documentation
NodeJS API docs are out of sync with NodeJS C++ wrapper documentation
due to the doc build breaking back in #4043.

The commit fixes the Node dev dependencies such that `npm run docs`
works again and re-enables the check in CI.
2021-12-23 11:10:39 +00:00
Michael Bell
04c2167c2d Fix for_each_indexed util function
- Fix typo in util function name for_each_indexed.
- Use the overloaded functions for_each_indexed and for_each_pair
  with a container argument where possible to improve readability.
2021-12-22 23:40:06 +00:00
Michael Bell
2c81083406 Fix CI 32-bit build
A recent change to the Ubuntu Focal CI worker - either a CMake upgrade,
or default installation of the libexpat-dev library - leads to the
32-bit expat library to not be found by CMake.

FindPackage(EXPAT) finds the library via pkg-config, so the fix is
to explicitly include the i386 pkg-config directory in the
PKG_CONFIG_PATH environment variable list.
2021-12-22 23:25:19 +00:00
Michael Bell
472cce6742 Fix Mason CMake installation
During the CI migration to Github Actions, a bug was introduced
such that Mason CMake is not being added to the PATH environment
variable correctly, so it defaults to the CMake installed in the
OS environment.

Simple fixing the typo fails as the Mason CMake version requires
libssl 1.0 as a dependency, whilst the Ubuntu Focal runners are
on the newer libssl 1.1. Therefore, we also bump the Mason
CMake version to 3.21.2.
2021-12-22 23:25:19 +00:00
Denis Chapligin
ff1af413d6
Merge pull request #6156 from mloskot/ml/fix-msvc-19-28-static-const-member
Fix MSVC 19.28+ issue with ByEdgeOrByMeterValue::by_edge and ByEdgeOrByMeterValue::by_meter definitions
2021-11-13 23:29:08 +02:00
Mateusz Łoskot
ffa4256ad3
Run clang-format to fix formatting 2021-11-12 19:06:33 +01:00
Mateusz Łoskot
3da45c1d92
Fix MSVC 19.28+ issue with ByEdgeOrByMeterValue::by_edge and ByEdgeOrByMeterValue::by_meter definitions
This is a workaround for discrepancy between MSVC 19.27 and 19.28
about static const member definition
https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338

We can not use C++17 inline variable as a workaround suggested
in the issue report linked above, because the sol2 does not
seem to compile in C++17 mode:

    third_party/sol2/sol2/sol.hpp: error C2039: 'object_type': is not a member of...
2021-11-12 17:37:19 +01:00
Daniel Patterson
d5cd702242
Enable all unit tests (#5248)
* Add missing profile name to library extract test.

* Support both tzid and TZID properties on timezone geometry.  Improve validation of timezone polygons.

* Missing tzid property wasn't a geojson validation issue, shouldn't have been tested there.

* Use filesystem glob to loop over all test executables so we don't miss any in the future.

Co-authored-by: Michael Bell <michael@mjjbell.com>
2021-10-22 22:10:25 +01:00
Torben Hørup
b120c971a0
Make osrm-routed optional (#6144)
* Make osrm-routed optional

* Updated changelog

* require boost 1.60

* Update CMakeLists.txt

* Update CHANGELOG.md

Co-authored-by: Michael Bell <michael@mjjbell.com>
2021-10-08 17:06:55 +01:00
Michael Bell
eb3bf5cfe3 Upgrade Ubuntu CI builds to use 20.04
Moves Linux CI builds to the latest Ubuntu LTS.
- Bumps the GCC matrix to versions {7,8,9,10,11}, making 9 the default
for testing non-standard builds.
- Bump Node matrix to {12,14,16,LTS,latest} now that 10 is EOL.
- Fixes to CI builds due to library changes on newer distro.
2021-09-30 22:51:12 +01:00
Michael Bell
56a427f839 Upgrade Boost to 1.70, fix inefficient connection handling
A request to osrm-routed can be assigned to a thread which
is currently busy processing another request, even when there
are other threads/cores available. This unnecessarily delays
the response, and can make requests appear to hang when
awaiting CPU intensive requests to finish.

The issue looks like a bug in Boost.Asio multithreaded
networking stack.

osrm-routed server implementation is
heavily influenced by the HTTP server 3 example in the
Boost.Asio docs. By upgrading to Boost 1.70 and updating the
server connections to match the example provided in the 1.70
release, the problem is resolved.

The diff of the changes to the Boost.Asio stack are
vast, so it's difficult to identify the exact cause. However
the implementation change is to push the strand of execution
into the socket (and timer) objects, which suggests it could
fix the type of threading issue we are observing.
2021-09-30 22:51:12 +01:00
Torben Hørup
73a2b91251
Add GH actions script for docker image (#6138)
* Add GH actions script for docker image

* Updated Changelog
2021-09-30 19:45:15 +01:00
Torben Hørup
34877482e6
Use github actions badge in README.md (#6136) 2021-09-27 12:40:28 +01:00
Daniel Patterson
b739658681
Reset for next release. 2021-09-21 14:50:45 -07:00
Michael Bell
37cfc7f99d
Revert "Executables use hyphens" (#6131)
This reverts commit 5bf3c7b659.
2021-09-21 13:28:01 -07:00
Michael Bell
2d1e620429
Fix test cache to consider MLD executable changes (#6129)
* Fix test cache to consider MLD executable changes

Currently the test cache is not invalidated if changes to
osrm-partition or osrm-customize executables. This is problematic
when these executables make breaking changes to the data format.

We fix this by including both in the list of executables that
can invalidate the test cache.

* Executables use hyphens
2021-09-21 12:35:34 -07:00
Michael Bell
f6349a7fbe
Fix metric offset overflow for large MLD partitions (#6124)
Each MLD cell has source and destination nodes.
MLD is keeping a |source| x |destination| sized table
for various metrics (distances, durations, etc) from each
source to all destinations in a cell.

It stores all of the values for a metric in one large array, with
an offset for each cell to find its values. The offset is currently
limited to 32 bit values, which overflows on very large graphs
(e.g. Planet OSM).

We fix this by changing the offsets to be uint64_t types.
2021-09-21 19:25:30 +01:00
Michael Bell
f1f96166c5
Fix MLD level mask generation to support 64-bit masks. (#6123)
The generation of level masks for compactly storing partition cells
supports sizes that can be stored in 64 bits.

The current implementation fails if the total bit sum is 64 bits
exactly. A bit shift mechanism is used that is undefined when the
shift size is equal to the bit size of the underlying type. This
generates an incorrect mask value.

We fix this by adding a special case for a 64 bit offset. Given this
code is called at most |level| times, there will be no effect on
performance. We also update the assertions to reflect 64 bit masks
are now supported.
2021-09-21 18:09:38 +01:00
Ömer Faruk Özdemir
8e100ea1a0
Update api.md (#6054)
* Update api.md

alternatives_count was missing in this document,

Copied from here:
https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#waypoint-object
2021-09-04 12:33:10 +01:00
Michael Bell
f1a6056953 Immediately close bad connections to prevent file exhaustion
osrm-routed does not immediately clean up a keep-alive connection
when the client closes it. Instead it waits for five seconds
of inactivity before removing.

Given a setup with low file limits and clients opening and
closing a lot of keep-alive connections, it's possible for
osrm-routed to run out of file descriptors whilst it waits for
the clean-up to trigger.

Furthermore, this causes the connection acceptor loop to exit.
Even after the old connections are cleaned up, new ones
will not be created. Any new requests will block until the
server is restarted.

This commit improves the situation by:

- Immediately closing connections on error. This includes EOF errors
indicating that the client has closed the connection. This releases
resources early (including the open file) and doesn't wait for the
timer.

- Log when the acceptor loop exits. Whilst this means the behaviour
can still occur for reasons other than too many open files,
we will at least have visibility of the cause and can investigate further.
2021-09-04 01:55:36 +01:00
Michael Bell
d413d0639d Fix Boost link flags in pkg-config file.
In newer versions of cmake, FindBoost uses Imported Targets for library
component variables, rather than file paths to the Boost libraries.

cmake uses these targets when linking (e.g. target_link_library) and
knows how to correctly substitute the values. However, the OSRM
pkg-config file that we generate doesn't do this, and ends up writing
the actual target symbols, hence the errors trying to link Boost::<component>.

To fix this for newer cmake versions, we create an intermediate configure step
that references the linker files for the imported targets. This is followed
by a generate step that performs the correct substitution.
See this thread for more details: https://cmake.org/pipermail/cmake/2018-December/068812.html

This is backwards compatible to the existing min cmake version (3.1).
However, building using cmake 3.1 fails with a package.json parsing error,
so this commit also bumps the min version to 3.2.
2021-09-03 23:49:32 +01:00
Michael Bell
9884684701 Fix generation of inefficient MLD partitions
Duplicate restriction nodes in the edge-based-graph are currently
not in included in a mapping (.osrm.cnbg_to_ebg) from
node-based-graph edges to edge-based-graph nodes.
This mapping is used by the MLD partitioner to assign EBG nodes
to partitions.

The omission from the mapping means all restriction nodes are
included in a special 'invalid' partition. This special partition
will break the geolocation properties of the multi-level hierarchy.
The partition and its super levels will have a large number of
border nodes and very few internal paths between them.

Given the partitioner is the only consumer of the mapping, we fix
the issue by including the duplicate restriction nodes in the mapping,
so that they are correctly assigned to a partition.

This has measurable improvement on MLD routing.
For a country-sized routing network, the fix reduces routing and table
request computation time by ~2% and ~6% respectively.
2021-09-03 22:48:10 +01:00
Michael Bell
0911691008 Fix changelog entry 2021-09-03 18:35:01 +02:00
Michael Bell
971f0d3fe2 Format unit_tests 2021-09-03 18:35:01 +02:00
Michael Bell
eb0c089574 Replace Travis with Github Actions for CI builds
Replace Travis for continuous integration with Github Actions.
The Github Actions pipeline is functionally equivalent, with
all the same build permutations supported.
Whilst the Github Actions offering is broadly equivalent to
Travis, a few changes have been made as part of the migration.

- The 'core' and 'optional' Travis stages have been consolidated
into one build matrix. This is due to the current inability in
Github Actions to share build steps between jobs, so this avoids
having to duplicate the steps.
Optional stage jobs will now run in parallel with core jobs,
but they still remain optional in the sense that they don't fail
the build.

- A number of existing Github Action plugins are used to replace
functionality provided by Travis or other tools:
Node setup, caching, Codecov, publishing release artifacts.

- Linux builds are updated to build on Ubuntu 18.04.
MacOS builds are updated to run on 10.15. Similar to the
Travis Xenial upgrade attempt, some changes are required due
to underlying platform and compiler upgrades. This means some
Node 10 toolchains will no longer be supported.

Whilst there is opportunity to upgrade some dependencies and
make the CI steps more idiomatic, I've left this for future changes
and just focussed on functional replication.
2021-09-03 18:35:01 +02:00
Mateusz Konieczny
8af4f700f7 fix link in the changelog 2021-09-03 11:14:22 +02:00
Patrick Niklaus
155ca8b1f1 Update src/server/api/url_parser.cpp
Co-authored-by: Michael Bell <moke.byll@gmail.com>
2021-09-03 10:55:53 +02:00
Patrick Niklaus
03001ff90a Fix ranges 2021-09-03 10:55:53 +02:00
Patrick Niklaus
ba4e7bfa11 Add changelog entry 2021-09-03 10:55:53 +02:00
Patrick Niklaus
38df7d5e05 Fix the URL parser for special chars in profile 2021-09-03 10:55:53 +02:00
ijleesw
dca35dcc86 Add support for lua5.4 in FindLua.cmake 2021-07-20 23:21:49 +01:00
Matt Riggott
f7478ba80f
Process maxspeed tag before surface, smoothness, and tracktype tags (#6002)
* Handle maxspeed tags before surface and smoothness tags

Let's say we have a tertiary road with the following tags:

   highway=tertiary
   maxspeed=60
   surface=gravel
   smoothness=intermediate

While the maxspeed tag tells us the legal speed limit, the surface and
smoothness tags have much more effect on the real-world speed of a car.
We should process the maxspeed tags first, and then update the road's
forwards/backwards speeds according to any surface and smoothness tags.
For our hypothetical road the process in the car.lua profile now goes
like this:

1. Get default speed from profile (tertiary = 40 on line 150 of car.lua)
2. Change speed to 60 using maxspeed tag (WayHandlers.maxspeed function
   in way_handlers.lua, lines 434-447)
3. Change speed to 40 using surface tag (WayHandlers.surface function
   in way_handlers.lua, lines 360-363)
4. Check speed according to smoothness tag --- but because it's higher
   than the speed according to the surface tag, leave the speed
   unchanged (WayHandlers.surface function again, lines 368-371)

<ec36319232/profiles/car.lua (L150)>
<ec36319232/profiles/lib/way_handlers.lua (L354-L372)>

Note in step 3 above the speed's only changed from 60kph to 40kph
because it's a lower value. If the surface speed was higher than than
the previous value, the speed would remain unchanged. Another example:

   highway=tertiary
   maxspeed=60
   surface=compacted
   smoothness=intermediate

Here, although the profile's speed for compacted is 80, it would stay at
the lower value of 60 (see way_handlers.lua, lines 360-363).

<ec36319232/profiles/lib/way_handlers.lua (L360-L363)>
2021-06-03 17:56:57 +01:00
Daniel Patterson
ec36319232
Reset main branch after release. 2021-05-17 14:59:48 -07:00
Daniel Patterson
051e931091
Final 5.25 release prep. 2021-05-17 14:57:10 -07:00
Daniel Patterson
3a029d476c
Try pushing tag again. 2021-05-17 14:16:35 -07:00
Daniel Patterson
d97fe2322d
Prep 5.25.0-rc.1 2021-05-17 12:15:04 -07:00
Michael Bell
baca7b70f1
Use Github Releases for hosting node binaries (#6030)
* Use Github Releases for hosting node binaries

Replaces S3 hosting of node binaries with Github Releases.
`node-pre-gyp publish` works exclusively with S3, so upload step
is now performed by the Travis deployment provider.

The behaviour for the package user should not change.
When building a new version tag, Travis will create a release for the
tag if it does not already exist.

* Switch to the osrm-release-automation machine account rather than personal credentials.

Co-authored-by: Daniel Patterson <danpat@danpat.net>
2021-05-17 11:54:08 -07:00
Michael Bell
50f5a753ea Increase PackedOSMIDs size to 34 bits
OSM node 2^33 was created in early April 2021. This and all
subsequently created IDs will be overflowing OSRM node storage
which only support 33 bit IDs.
Bump the number of bits to 34 to double node ID capacity. This
is a breaking change to the data format as it alters the layout
of .osrm.nbg_nodes.
2021-04-24 23:41:02 +01:00
Michael Bell
4ac827a849 Remove redundant loading of .osrm.cell_metrics
When using process memory, MLD cell metrics are loaded twice from
.osrm.cell_metrics - once when loading static data, and again when
loading updatable data. The former appears to be the mistake,
as .osrm.cell_metrics is only listed in `GetUpdatableFiles`.
2021-04-24 21:19:27 +01:00
Mandeep Sandhu
def699dafd
Remove hardcoded access keys from travis config (#6012) 2021-04-15 22:29:40 -07:00
Michael Bell
41dda32546
Merge pull request #5999 from mjjbell/mbell/barrier_kerb
Add kerb barrier exception to default car profile
2021-03-31 20:24:42 +01:00
Michael Bell
8d3ebc64dc Add kerb barrier exception to default car profile
OSM data contains many mistakes that tag kerbs as highway barriers
when instead they are only describing highway crossings.

This PR updates the default car profile to handle these mistakes
and unblock routing on the affected highways.
2021-03-31 01:17:19 +01:00
Michael Bell
c15b02ecf6
Merge pull request #5994 from wangyoucao577/bugfix/correct-doc
Fix valid field type in doc
2021-03-26 16:32:03 +00:00
Jay Zhang
480807500b docs: changelog 2021-03-26 00:28:08 +00:00
Jay Zhang
e2de71bdcf docs: fix valid field type 2021-03-26 00:25:26 +00:00
Daniel Patterson
574060418a
Update node-pre-gyp to fix Node 12/14 installation problems in some environments. (#5991) 2021-03-23 10:11:46 -07:00
Daniel Patterson
9d81eb327a
Reset master versioning for next release. 2021-01-28 10:31:49 -08:00
Daniel Patterson
677598a8d8
Blank commit to trigger TravisCI. 2021-01-28 09:03:40 -08:00
Daniel Patterson
781a2ad0f8
Release 5.24.0 2021-01-28 06:11:02 -08:00
Karen Shea
a613375460
Validate source/destination indices correctly in nodejs support (#5595)
* validate source/destination indices correctly

Co-authored-by: Denis Chapligin <denis.chaplygin@wolt.com>
Co-authored-by: Daniel Patterson <danpat@danpat.net>
2021-01-28 06:02:01 -08:00
Richard Fairhurst
960269f95a
Merge pull request #5131 from themylogin/master
Fix turn.roads_on_the_left and turn.roads_on_the right for two-way roads
2021-01-28 14:00:17 +00:00
Dane Springmeyer
ed7b1baacc
Don't bundle node-pre-gyp (#5520)
Bundling node-pre-gyp was only needed for node v4 and earlier.

Remove it to avoid errors like:

> npm ERR! enoent ENOENT: no such file or directory, rename '/home/circleci/project/node_modules/node_or_tools/node_modules/abbrev' -> '/home/circleci/project/node_modules/node_or_tools/node_modules/.abbrev.DELETE'

More context: https://github.com/mapbox/node-pre-gyp/issues/260#issuecomment-407222286
2021-01-27 09:19:32 -08:00
Daniel Patterson
d4e7b3d60b
Cleanup node dependencies. (#5945)
* Cleanup node dependencies.
2021-01-27 09:17:15 -08:00
Michael Bell
bd3eb6591e
Undo libosrm API break by adding old interface as method overload (#5861)
Removes the breaking libosrm API change by adding the old interface to
the new. This does not introduce any new breaks.

The downside of this is that it allows for multiple ways to
return JSON responses.
2021-01-27 09:14:44 -08:00
themylogin
b0b8069ab0 clang-format 2021-01-27 13:12:20 +01:00
themylogin
d9d873903f Account merged edges when processing turn legs 2021-01-27 10:53:48 +01:00
themylogin
e7acc9df76 Fix turn.roads_on_the_left and turn.roads_on_the right for two-way roads #5128 2021-01-27 10:53:00 +01:00
Denis Chapligin
b6557b8cac
Merge pull request #5927 from OgreTransporter/master
Bugfix Lua 5.4 not working
2021-01-21 15:23:39 +02:00
Denis Chapligin
a05d7a8f73
Merge pull request #5926 from mjjbell/mbell/parameter_improvements
Reduce copying in API parameter constructors
2021-01-21 15:22:26 +02:00
Transporter
35ff807e1d Bugfix Lua 5.4 not working 2021-01-07 10:48:59 +01:00
Michael Bell
e554624438 Reduce copying in API parameter constructors
When using non-default constructors for the API parameter classes,
vector arguments like coordinates and hints are copied at least once
(twice when passed as lvalue arguments).

Enable perfect forwarding of BaseParameter arguments and
pass-by-value in the constructor that uses the argument. This
ensures we copy at most once (zero for rvalue arguments).
2021-01-06 23:15:35 +00:00
Michael Bell
58ba3fc84f
Avoid copying ManyToMany table results (#5923)
Regardless of any copy elision on the returned pair value, the
duration and distance results are always copied.

Fix this by passing rvalue references to std::make_pair.
2021-01-04 08:46:51 -08:00
Denis Chapligin
dddf83db7b
Merge pull request #5908 from systemed/debug_way
Profile debug script which fetches a way from OSM
2020-12-21 20:14:37 +02:00
Michael Bell
5266ac1635
Add support for multiple via-way restrictions (#5907)
Currently OSRM only supports turn restrictions with a single via-node or one
via-way. OSM allows for multiple via-ways to represent longer and more
complex restrictions.

This PR extends the use of duplicate nodes for representng via-way turn
restrictions to also support multi via-way restrictions. Effectively, this
increases the edge-based graph size by the number of edges in multi via-way
restrictions. However, given the low number of these restrictions it
has little effect on total graph size.

In addition, we add a new step in the extraction phase that constructs
a restriction graph to support more complex relationships between restrictions,
such as nested restrictions and overlapping restrictions.
2020-12-20 13:59:57 -08:00
Denis Chapligin
eb1d399f3b
Merge pull request #5894 from xlaussel/avoid_samelookup_in_heap_map
Avoid samelookup in heap map
2020-12-20 22:17:49 +02:00
Andrey Gurevich
6bf68fb0c6
Update http.md (#5914)
Looks like a mistake in the description of Table api
2020-12-20 08:39:35 -08:00
Alin Mindroc
33b2a193f9
Fix node14 compilation issues (#5918)
* Use Nan:: getters and setters for node 12/14 compatibility
* Drop support for publishing node 8 bindings, add publishing support for node 12, 14

Co-authored-by: Daniel Patterson <danpat@danpat.net>
2020-12-19 15:37:01 -08:00
systemed
158d260cbb Mention new script in changelog 2020-12-15 12:51:28 +00:00
systemed
83b17e664c Update comments 2020-12-15 12:49:52 +00:00
xlaussel
89a9bc9d70 Undo changes to package-json.com :
Revert to master version
2020-12-14 08:38:31 +01:00
Denis Chapligin
b0a4ad92c4
Merge pull request #5887 from dburnsii/upgrade_libsol2_v2.20.6
Upgrade libsol2 v2.20.6
2020-12-13 22:55:44 +02:00
systemed
9a20e8e614 Profile debug script to fetch a way from OSM 2020-12-10 11:02:04 +00:00
Desone Burns II
af5efd2abb Merge branch 'master' of github.com:Project-OSRM/osrm-backend into upgrade_libsol2_v2.20.6 2020-12-03 16:50:35 -07:00
Desone Burns II
9ae9a1f6d7 Fix table checks 2020-12-03 16:42:57 -07:00
Denis Chapligin
370081ec14
Merge pull request #5903 from bxl-forever/maxspeed-brussels
Update car.lua - new maxspeed default speed for Brussels, Belgium
2020-12-03 11:22:42 +02:00
bxl-forever
d340f4eabc
Update car.lua - new maxspeed default speed for Brussels, Belgium
Those new speeds apply by law as from Jan. 1, 2021 within the entire Brussels-Capital Region, one of the 3 regions of Belgium.
2020-12-02 13:32:12 +01:00
Desone Burns II
0e10b94d38 Merge branch 'master' of github.com:Project-OSRM/osrm-backend into HEAD 2020-12-01 19:24:11 -07:00
Desone Burns II
1a5e5df6bd Use table lookup as boolean 2020-12-01 19:23:10 -07:00
Denis Chapligin
18a0f6c1f8
Merge pull request #5891 from mloskot/ml/check-indexed-data-for-empty-values
Avoid dereferencing iterators over empty indexed data values
2020-12-01 15:26:58 +02:00
Desone Burns II
8510d6850a Cast string to number in Lua 2020-11-30 17:25:35 -07:00
Desone Burns II
566cf785f5 Initialize empty Lua object 2020-11-30 14:13:18 -07:00
xlaussel
687a3cdfbe Merge branch 'master' into avoid_samelookup_in_heap_map 2020-11-26 21:29:27 +01:00
Daniel Patterson
50d9632ed7
Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10

* Reformat using clang-format-10.0.09
2020-11-26 07:21:39 -08:00
xlaussel
f376225080 Changed code failing when compiling asserts 2020-11-25 13:25:04 +01:00
xlaussel
fcb7dd2a21 format code 2020-11-25 12:42:01 +01:00
xlaussel
aa06029801 References removed for extracted heapNode: could lead to bugs because the same was sometimes modified after when relaxing outgoing edges 2020-11-25 11:22:30 +01:00
Desone Burns II
1ce573ef35 Fix lua nil for MacOS 2020-11-24 08:26:24 -07:00
Desone Burns II
cf13a9714d clang-format-3.8 changed files 2020-11-24 08:06:26 -07:00
xlaussel
8697a6b14a Changes and corrections before change request
Cucumber successfull
2020-11-24 12:43:08 +01:00
xlaussel
9a32722634 other improvements.
Variable renaming with better names
2020-11-24 11:05:11 +01:00
Desone Burns II
24d0af6faf clang-format changed file 2020-11-23 17:12:13 -07:00
Desone Burns II
b1646622e6 Changed nil test to empty test 2020-11-23 17:07:10 -07:00
xlaussel
697c2ff88d other improvements.
Variable renaming with better names
2020-11-23 23:11:41 +01:00
xlaussel
e181cb325c other improvements.
Variable renaming with better names
2020-11-23 23:10:22 +01:00
xlaussel
41af9615cd Improvements 2020-11-23 23:00:27 +01:00
xlaussel
13067844ee Changes made 2020-11-23 22:33:08 +01:00
Desone Burns II
ca68518763 Remove context from get_nodes call 2020-11-23 13:24:44 -07:00
Desone Burns II
f6065de494 Added nil check to table conversion 2020-11-23 13:21:55 -07:00
Mateusz Łoskot
58fbda0483
Avoid dereferencing iterators over empty indexed data values
It seems the values can be empty even if size of blocks
is non-zero (e.g. blocks.size()==1)
2020-11-23 21:21:35 +01:00
Desone Burns II
e693b8963a Remove unsigned 0 comparison 2020-11-19 17:15:17 -07:00
Desone Burns II
5b6e82fa9c Revert "Copy nodes to lua table"
This reverts commit a7a088d416.
2020-11-19 17:14:38 -07:00
Desone Burns II
a7a088d416 Copy nodes to lua table 2020-11-19 15:39:31 -07:00
Desone Burns II
43b920bfb5 Merge branch 'master' of https://github.com/Project-OSRM/osrm-backend into upgrade_libsol2_v2.20.6 2020-11-18 17:11:02 -07:00
Desone Burns II
deacc8fb5c Update to sol2 v2.20.6 2020-11-18 17:01:43 -07:00
Denis Chapligin
a3f1c2afb0
Merge pull request #5882 from mjjbell/mbell/windows_contractor
Fix osrm-contract, tests, on Windows
2020-11-18 14:33:57 +02:00
Denis Chapligin
7e4fbaf4a8
Merge pull request #5884 from dburnsii/upgrade_libosmium_v2.15.6
Upgrade libosmium to v2.15.6
2020-11-18 10:41:28 +02:00
Desone Burns II
dfc1bfc27e Upgrade libosmium to v2.15.6 2020-11-17 14:59:06 -07:00
Michael Bell
96acdaf0d5 Fix osrm-contract, tests, on Windows
As part of graph contraction, node renumbering leads to
in-place permuting of graph state, including boolean vector elements.

std::vector<bool> returns proxy objects when referencing individual
bits. To correctly swap bool elements using MSVC, we need to explicitly
apply std::vector<bool>::swap.

Making this change fixes osrm-contract on Windows.

We also correct failing tests and other undefined behaviours
(mainly iterator access outside boundaries) highlighted by MSVC.
2020-11-15 14:22:26 +00:00
Denis Chapligin
98fd17589d
Merge pull request #5868 from wangyoucao577/feature/unify-turn-index-dump
Unify .osrm.turn_penalties_index dump same with turn_weight_penalties/turn_duration_penalties
2020-11-10 11:20:55 +02:00
Denis Chapligin
21444ce7cb
Merge pull request #5878 from mjjbell/mbell/fix_windows_partition
Fix bit-shift overflow in MLD partition step for Windows builds
2020-11-09 11:43:14 +02:00
Michael Bell
b840c0be95 Fix bit-shift overflow in MLD partition step for Windows builds
For very large graphs, generation of MLD level masks fail on Windows
due to bit shift overflow of unsigned long values.

Correct by using unsigned long long literals, which are 64 bit on
all major systems.
2020-11-08 03:51:11 +00:00
Jay Zhang
17eb39d0a9 fix: clangformat 2020-10-26 01:19:17 +00:00
Jay Zhang
c090457f1f docs: changelog 2020-10-23 09:48:21 +00:00
Jay Zhang
7d28b7aa3a feat: unify turn_penalties_index dump same with turn_weight_penalties and turn_duration_penalties 2020-10-23 09:38:56 +00:00
Guannan Du
1ba8aba466
Fix Issue#5864 build errors on mac OS (#5865)
* Fix Issue#5864 build errors on mac OS

Co-authored-by: Guannan Du <guannan.du@Guannans-MacBook-Pro-2.local>
2020-10-21 07:00:55 -07:00
Denis Chapligin
9f80f6d64d
Merge pull request #5859 from akashihi/protozeroupdate
Updated bundled protozero to v1.7.0
2020-10-20 10:45:32 +03:00
Denis Chaplygin
a8362d75b5 Updated bundled protozero to v1.7.0 2020-10-16 10:28:48 +03:00
Daniel Patterson
df3ed43d70
Reset master for next version. 2020-10-14 14:10:33 -07:00
Daniel Patterson
c021cea770
Prepare 5.23.0 release 2020-10-14 14:08:23 -07:00
Daniel Patterson
628784eb7d
Prepare 5.23.0-rc.2 2020-10-08 20:14:10 -06:00
Daniel Patterson
440fb61f8f
Merge branch 'master' into 5.23 2020-10-08 16:27:25 -06:00
Michael Bell
f87a324633
Fix crash in MLD alternative search if source or target are invalid (#5851)
In situations where there is not a valid source or target phantom
node (e.g. when snapping to an edge with a zero weight), a
heap assertion will fail in the MLD alternative search code.

We fix this by checking for empty heaps before proceeding with
the search.
2020-10-08 15:27:02 -07:00
Daniel Patterson
2222ee6a67
Prepare 5.23.0-rc.1 2020-10-07 16:21:00 -06:00
Michael Bell
e033e0b553
Fix table result when source and destination on same one-way segment (#5828)
Fixes #5788

Table queries where source and destination are phantom nodes
on the same one-way segment can fail to find valid routes.

This is due to a bug in the MLD table generation for the
special case where the query can be simplified to a
one-to-many search.
If the destination is before the source on the one-way segment,
it will fail to find a route.

We fix this case by not marking the node as visited at the start,
so that valid paths to this node can be found later in the search.

We also remove redundant initialization for the source
node as the same actions are performed by a search step.
2020-10-07 14:58:13 -07:00
Daniel Patterson
c24f917dcf
Cleanup changelog in master to match current release state. 2020-10-07 14:58:38 -06:00
Denis Chapligin
1e98ae7efe
Merge pull request #5849 from akashihi/leftfeature
Driving side property added to driving_side.geojson
2020-10-06 19:07:12 +03:00
Denis Chaplygin
55b3260cc3 Driving side property added to driving_side.geojson 2020-10-06 09:01:22 +03:00
Daniel Patterson
3451d1ec82
Lock access to facade_factory in data_watchdog to avoid accessing destructed object (#5844)
* Wrap access to facade_factory in a shared lock so it doesn't get changed partway through access which leads to a crash.
2020-09-30 18:45:44 -07:00
Michael Bell
4799b46eeb
Incorrect error message when unable to snap all input coordinates (#5846)
In cases where we are unable to find a phantom node for an input
coordinate, we return an error indicating which coordinate failed.

This would always refer to the coordinate with index equal to the
number of valid phantom nodes found.

We fix this by instead returning the first index for which a
phantom node could not be found.
2020-09-30 18:44:22 -07:00
Denis Chapligin
f6b313e958
Merge pull request #5836 from fofanov/mbell/remove_future
Remove unused future
2020-09-30 18:23:00 +03:00
Michael Bell
d3ab6f1fca Remove unused future
The serialization of the compressed node based graph was changed in
c410c2 to no longer be asynchronous.

This removes the unused future object.
2020-09-22 23:01:06 +01:00
Denis Chapligin
523d9e9c05
Merge pull request #5824 from alistairwoodcock/nodejs-doc-table-annotations
Annotations was missing as part of the table documentation
2020-09-10 10:29:01 +03:00
Alistair Woodcock
8e81034bb2 Annotations was missing as part of the table documentation 2020-09-10 09:23:25 +10:00
Denis Chapligin
4a47267455
Merge pull request #5821 from slavanap/master
Make MMapMemoryAllocator map files in read-only (O_RDONLY) mode
2020-09-09 14:09:31 +03:00
Vyacheslav Napadovsky
f545f2293e Make MMapMemoryAllocator map files in read-only (O_RDONLY) mode. Mapping with O_RDWR will cause copy_up across Docker layers. 2020-09-09 00:51:42 +03:00
Denis Chapligin
78160c0fe4
Merge pull request #5813 from woltapp/tbbdeprecation
Partially fixes use of deprecated TBB features
2020-09-08 11:17:32 +03:00
Denis Chapligin
a35961ca6a
Merge pull request #5814 from woltapp/boostdeprecation
Removed references to obsolete Boost.Test headers.
2020-09-08 11:12:38 +03:00
Denis Chaplygin
933e36190f
Removed catching of obsolete tbb:captured_exception, as TBB now supports C++ native std::exception_ptr inter-thread exception passing mechanism. 2020-09-04 09:33:43 +03:00
Denis Chaplygin
03d9e7a8ce
Deprecated tbb::task_scheduler_init replaced with std::thread and tbb::global_control 2020-09-04 09:33:43 +03:00
Denis Chaplygin
7e24dcfd0a
Removed references to obsolete Boost.Test headers. 2020-09-02 13:16:44 +03:00
Denis Chapligin
cdce2af1c9
Merge pull request #5536 from leighghunt/master
Updating extent of Hong Kong in list of left-hand drive countries
2020-09-02 11:48:36 +03:00
Leigh Hunt
3116734bec Merge branch 'master' of github.com:Project-OSRM/osrm-backend 2020-09-02 09:52:01 +12:00
Denis Chapligin
4d6272b030
Merge pull request #5569 from rdvelazquez/master
Update kCellsAtMostSameBy comment
2020-08-21 12:07:27 +03:00
Denis Chapligin
a7993eebac
Merge pull request #5760 from woltapp/nostxxl
Removed STXXL support.
2020-08-20 13:19:53 +03:00
Denis Chaplygin
2d0b2ca987
Removed STXXL support. 2020-08-20 11:54:02 +03:00
Lev Dragunov
699ca2bbd0
Merge pull request #5758 from woltapp/gcc10
Fixes signed/unsigned comparision spotted by gcc10.
2020-08-20 10:59:23 +03:00
Denis Chapligin
8b40c594be
Merge pull request #5784 from OgreTransporter/bugfix-cmaketbb-5782
Bugfix TBB linking #5782
2020-08-19 12:39:00 +03:00
Denis Chapligin
909570fd7f
Merge pull request #5711 from wingyplus/fix-debug-example
Fix profiles/debug_example.lua cannot interprete by lua
2020-08-19 11:15:06 +03:00
Denis Chapligin
df9fda177d
Merge pull request #5384 from wangyoucao577/clean-comments
correct comments for "compress edge if it crosses a traffic signal"
2020-08-18 17:21:23 +03:00
Jay Zhang
d2e7e6e9e6 improve comment description 2020-08-12 15:18:58 +08:00
Denis Chapligin
b9ebe0c369
Merge pull request #5628 from wangyoucao577/feature/disable-debug-log-compile-time-control
Control release mode debug logging output by ENABLE_DEBUG_LOGGING option
2020-08-11 10:27:27 +03:00
Jeroen Hoek
cd4e6a1fe3
Fix broken path in documentation (#5636)
Replaces references to
`include/extractor/guidance/road_classification.hpp` with
`include/extractor/road_classification.hpp`.

The latter is included in the project.
2020-08-10 08:50:15 -07:00
dburnsii
5cac188711
Update profiles.md (#5795)
Fixed a small typo
2020-08-07 13:44:32 -07:00
Jay Zhang
b7fa2c5981 docs: update changelog 2020-07-29 06:02:19 +00:00
Jay Zhang
106082f6f8 feat: add ENABLE_DEBUG_LOGGING option to control debug logging output 2020-07-29 06:00:47 +00:00
Jay Zhang
36d34073da Revert "chore: remove compile time debug log control"
This reverts commit 1ada466081.
2020-07-29 05:10:12 +00:00
Denis Chapligin
57ed232423
Merge pull request #5783 from OgreTransporter/bugfix-lua-5781
Bugfix Lua 5.4 not working
2020-07-28 15:52:58 +03:00
Denis Chapligin
24f12c9d1b
Merge pull request #5732 from lukasz-jagielski-bolt/lkj/compile_with_node_12
Try to fix node 12 compilation issues
2020-07-28 14:42:04 +03:00
Denis Chapligin
bdf2222f6a
Merge pull request #5729 from akashihi/builddataatwolt
Moved test data files to Wolt provided hosting.
2020-07-28 09:43:40 +03:00
Denis Chaplygin
220ad9fe8c
JS tests temporarily disabled as they fail with OOM. 2020-07-23 11:27:58 +03:00
Denis Chaplygin
ae6326719a
Removed CONSTEXPR requirement for a boost, as we need at least c++14 for rest of the code. 2020-07-23 11:27:58 +03:00
Denis Chaplygin
0503a2fcd3
Appveyor build now uses dependency files hosted at Wolt. 2020-07-23 11:27:57 +03:00
Denis Chaplygin
219f2c3aa9
Added windows dependencies building manual. 2020-07-23 11:27:57 +03:00
Denis Chaplygin
493e821b93
Monaco test map moved to the git repository. 2020-07-23 11:27:56 +03:00
Transporter
9c3eeffe2c Bugfix TBB linking #5782
The query if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug) only works if you call CMake explicitly with the build configuration Debug. But if you generate Debug and Release all libraries are linked to the release version.
2020-07-16 19:14:48 +02:00
Transporter
526191256c Bugfix Lua 5.4 not working #5781
In Lua 5.4 the function lua_resume now has an extra parameter. This out parameter returns the number of values on the top of the stack that were yielded or returned by the coroutine (in previous versions, those values were the entire stack.). The constant LUA_ERRGCMM was removed. Errors in finalizers are never propagated; instead, they generate a warning.
2020-07-16 19:08:37 +02:00
Łukasz Jagielski
9861faa456 nodejs: user worker thread friendly initialization 2020-07-07 09:01:52 +02:00
Denis Chaplygin
919fe74c40
Fixes signed/unsigned comparision spotted by gcc10.
Fixed by moving assertion to the actual point where signed values are used.
2020-06-17 13:18:21 +03:00
张庚昕
365121dac4
add generate_hints parameter info to document (#5754) 2020-06-11 06:43:03 -07:00
Łukasz Jagielski
cbec111eb6 include/nodejs/node_osrm.hpp: clang-format 2020-05-12 15:16:38 +02:00
Łukasz Jagielski
7d369b9ab9 Try to fix node 12 compilation issues 2020-05-05 23:34:26 +02:00
Thanabodee Charoenpiriyakij
2c13f2f735 Fix profiles/debug_example.lua cannot interprete by lua
After run `lua5.1 profiles/debug_example.lua`, I got result:

```
lua5.1: debug_example.lua:41: attempt to call field 'way_function' (a nil value)
stack traceback:
        debug_example.lua:41: in main chunk
        [C]: ?
```

This is because Debug has not way_function in the module. This changes
change it to process_way and it's works!!
2020-04-09 16:05:37 +07:00
Lev Dragunov
15f0ca8dda
Merge pull request #5608 from mariusre/http_parsing_fix
made whitespace between Header-key and value otional
2019-12-18 11:32:00 +03:00
Marius Rescheleit
d59ecb321e
added complete link to issue 2019-12-11 13:28:57 +01:00
Lev Dragunov
404ebb1898
Merge pull request #5624 from arnekaiser/patch-1
Update profiles.md
2019-12-10 10:23:18 +03:00
Jay Zhang
11b0a2e02a docs: update change log 2019-12-09 23:19:37 +08:00
Jay Zhang
1ada466081 chore: remove compile time debug log control 2019-12-09 17:53:28 +08:00
Arne
973722d0ec
Update profiles.md 2019-12-05 17:17:31 +01:00
Marius Rescheleit
ca5d17adab
Update CHANGELOG.md 2019-12-03 12:21:53 +01:00
Lev Dragunov
68dcab7c15
Merge pull request #5622 from jdhoek/bug/bicycle_use_sidepath
Bicycle: treat use_sidepath as no access
2019-12-02 14:32:30 +03:00
Jeroen Hoek
92406da194 Bicycle: treat use_sidepath as no access
Fixes #5557.
2019-12-01 18:34:58 +01:00
marius
6d8cf826d7 modified FSM so that the whitespace between header-key and value is optional 2019-11-19 18:30:21 +01:00
Lev Dragunov
48be5a5622
Merge pull request #5604 from jdesgats/fix-guidance-so
fix: install the osrm_guidance library
2019-11-19 14:41:21 +03:00
Julien Desgats
46ab931c64 fix: install the osrm_guidance library
In the case of a shared object compilation, the resulting binaries need
that library. It was not installed along the others, leading to failures
when running osrm-extract.

Fixes #5603
2019-11-15 10:32:27 +00:00
Lev Dragunov
0b139ff05d
Merge pull request #5572 from Tomonobu3110/tomo_less_memory
Reduce memory usage for raster source handling.
2019-11-14 12:58:59 +03:00
Tomonobu Saito
9da6cf8764 add: comment for RasterCache class 2019-11-13 11:01:07 +09:00
Tomonobu Saito
ee177efe41 fix: remove unused include / add const for necessity portion 2019-11-08 16:15:38 +09:00
Tomonobu Saito
fd0f1b60bb fix by revier comments 2019-11-06 11:06:29 +09:00
Tomonobu Saito
9c1c842b79 update CHANGELOG.md 2019-10-10 12:26:13 +09:00
Tomonobu Saito
17f32f4ca1 fix coding format 2019-10-09 13:35:19 +09:00
Tomonobu Saito
542c3ba872 Add singletone class RasterCache to handle global cache data. 2019-10-09 13:02:59 +09:00
Tomonobu Saito
f36707d1fb revert file mode to 664 2019-10-04 17:39:05 +09:00
Tomonobu Saito
a587b14006 destruct static vector and unorderd_map when last RasterContainer is destructed. 2019-10-04 17:30:35 +09:00
Tomonobu Saito
f9ee74d78e Add x range check to avoid data corruption. 2019-10-04 16:47:31 +09:00
Tomonobu Saito
eef072234e update delim chars 2019-10-04 15:14:20 +09:00
Tomonobu Saito
a9fce74e63 remove unused code (debug code) 2019-10-04 14:02:57 +09:00
Tomonobu Saito
432d49e23d bugfix: support multiple delimitor. 2019-10-04 13:50:13 +09:00
Tomonobu Saito
e4aaf07879 remove unused lines 2019-10-03 17:24:42 +09:00
Tomonobu Saito
d316ff9d41 Improvement of raster source loading to reduce consumed memory size. 2019-10-03 16:44:27 +09:00
Ryan Velazquez
921c2f9482
Update kCellsAtMostSameBy comment 2019-10-02 07:12:42 -04:00
Tomonobu Saito
62c8b70f78 use boost::filesystem::file_size() to get the file size (instead of seeking the file). 2019-10-02 19:04:01 +09:00
Lev Dragunov
f520379419
Merge pull request #5566 from akashihi/flatbuffernosoptional
Flatbuffers is not a boost::optional friendly
2019-10-02 11:12:19 +03:00
Tomonobu.Saito (Desktop PC)
d8d9ac8686 Add assert to check memory allocation 2019-10-02 15:47:16 +09:00
Denis Chaplygin
016c77a4de Flatbuffers is not a boost::optional friendly 2019-10-01 17:26:10 +03:00
Lev Dragunov
0205cbc578
Merge pull request #5561 from peoplestom/pessimistic_move
Removed un-needed calls to std::move
2019-10-01 17:12:39 +03:00
Tom Peoples
28895373fb Fixed flatbufferbuiler copy issues.
Compiling under gcc9.1 we get copy issues.
It appears we shouldn't pass builder classes by value, only ref.
2019-10-01 21:54:00 +10:00
Tom Peoples
018a9bc804 Removed un-needed calls to std::move
These calls were throwing a pessimistic move error and stopping compilation.
2019-09-26 17:55:19 +10:00
Lev Dragunov
71433c67b1
Merge pull request #5556 from akashihi/skipwaypoints
Skipwaypoints
2019-09-26 10:33:43 +03:00
Denis Chaplygin
d25a530942 Added cucumber test for skip_waypoint feature 2019-09-23 11:38:33 +03:00
Denis Chaplygin
a6097cdc01 Changelog updated 2019-09-17 17:56:27 +03:00
Denis Chaplygin
50a1c8a08d Added flatbuffers support to Table service cucumber tests 2019-09-17 17:42:52 +03:00
Denis Chaplygin
6214f16552 Updated http API documentation with skip_waypoints. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
e97ec13064 Formatted the sources 2019-09-17 17:42:52 +03:00
Denis Chaplygin
fa5567e669 Added unit tests for 'skip waypoints' on Trip/Match services 2019-09-17 17:42:52 +03:00
Denis Chaplygin
a9d4e28e38 Added unit test for flatbuffers serialization of Match/Trip responses. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
a5127539eb Added unit tests of 'skip_waypoints' option to the Nearest/Route/Table services. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
660c0cc602 Implemented 'skip_waypoints' for the 'Table' service. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
600f48e15a Implemented 'skip_waypoints' support in 'Route', 'Trip', 'Match' services. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
1b47242a58 Implemented 'skip_waypoints' for the 'Nearest' service.
It actually makes no sence, as the only output on the 'Nearest' service
is a list of wypoints. On the other hand it can be used now as a simple
health check.
2019-09-17 17:42:52 +03:00
Denis Chaplygin
10c1b38139 Added new base parameter 'skip_waypoints' 2019-09-17 17:42:52 +03:00
Lev Dragunov
81071b5af9
Merge pull request #5546 from akashihi/keepaliveclear
clear input/output buffers during keepalive clean-up procedure.
2019-09-10 19:01:42 +03:00
Denis Chaplygin
746b2e94a0 Formatted the code 2019-09-10 15:50:13 +03:00
Denis Chaplygin
43f60bc69c We should check, is connections is still open and gracefully return on connection closed by remote. 2019-09-10 14:32:16 +03:00
Denis Chaplygin
145974bc92 clear input/output buffers during keepalive clean-up procedure.
Should fix #5545
2019-09-09 11:20:47 +03:00
Leigh Hunt
c9bd9a967c
Update driving_side.geojson
Removing copy/paste error
2019-09-04 12:49:41 +12:00
Leigh Hunt
3c607a4570
Update driving_side.geojson
Completely overwriting with latest version from https://github.com/openstreetmap/iD/pull/6827, as per @danpat's suggestion.
2019-09-04 12:48:15 +12:00
Leigh Hunt
6dfcfcb105
Adding entry to change log for #5535 2019-09-03 16:52:30 +12:00
Leigh Hunt
e701243641
Updating extent of Hong Kong
Might be a little rough around Sha Tau Kok
2019-09-03 16:45:50 +12:00
Lev Dragunov
f1a4b70a56
Merge pull request #5513 from akashihi/flatbuffers
Flatbuffers support added
2019-08-29 13:11:24 +03:00
Lev Dragunov
df60947794
Merge pull request #5528 from akashihi/nokeepaliveduplicates
connection's reply needs to be reset before handling next request on …
2019-08-29 12:56:27 +03:00
Denis Chaplygin
cd7229ba06 connection's reply needs to be reset before handling next request on same connection. 2019-08-28 17:22:07 +03:00
Denis Chaplygin
624724031d flatbuffers javascript libraries excluded from linting, as it makes no sene to lint generated code. 2019-08-26 15:29:27 +03:00
Denis Chaplygin
0be87c73cf Fixed typo in flatbuffers: longitute -> longitude. 2019-08-26 14:31:51 +03:00
Denis Chaplygin
b8182dd7ff Replaced 'in' and 'out' at the flatbuffers 'instersection' object
with 'in_bearing' and 'out_bearing' to get flatbuffers schema javascript friendly.

Added a cucumber test for flatbuffers support.
2019-08-26 14:03:29 +03:00
Denis Chaplygin
80e1abba0c Added setting 'data_version' to all flatbuffers response functions. 2019-08-26 11:09:38 +03:00
Denis Chaplygin
ce71e08ef1 Added tests for Nearest/Table/Route flatbuffers serialization. 2019-08-26 11:09:38 +03:00
Denis Chaplygin
97270ae473 Fixed nested offsets inside of the flatbuffers structure 2019-08-26 11:09:38 +03:00
Denis Chaplygin
a9c187c99b Updated changelog entry 2019-08-26 11:09:38 +03:00
Denis Chaplygin
ff46e98d21 Library example now shows, how to use different output formats. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
a196e67e1a Vendored flatbuffers headers should be installed with the libosrm 2019-08-26 11:08:56 +03:00
Denis Chaplygin
1a259ccca0 base_result is a part of public API now, so it needs to be installed 2019-08-26 11:08:56 +03:00
Denis Chaplygin
2a1593fe05 Flatbuffers now uses floats instead of double. We do not use that precision anyway and it make output much smaller. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
5888894787 Added short flatbuffers introduction. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
73f544d4da Slightly changed the serialization order. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
889c82516f Set flatbuffers root type and removed unneded array for rows/cols 2019-08-26 11:08:56 +03:00
Denis Chaplygin
306c047c14 Generalized flatbuffers response generation in 'Route','Trip','Match' services. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
533f1ffc6b Inlined routes and waypoints, as all services are using at least one of those object, so there is no need for another one level of indirection. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
a44a75b211 Unit tests are compatible with new plugin API. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
e26a5cc392 Added flatbuffers compatibility to the Node 2019-08-26 11:08:56 +03:00
Denis Chaplygin
90191c9f34 Added flatbuffers output support to the 'Match' service 2019-08-26 11:08:56 +03:00
Denis Chaplygin
b7e9e5f2c0 Added flatbuffers output support to the 'Trip' service. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
13287d9970 Optimizing FB schema:
* Replaced Response union with nullable fields
* "Ok" code replaced with a boolean and a separate structure for a error code and message.
* Inlined geometry, thus removing one layer of indirection.
2019-08-26 11:08:56 +03:00
Denis Chaplygin
affa8a4653 Added flatbuffers output support to the 'Route' service. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
9d7a74445d Added flatbuffers output support to the 'Nearest' service. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
acd3e81ab4 Removed ineffectivness in the serialization schema. Positions are
structs now and distance/duration matrices are just arrays.
2019-08-26 11:08:56 +03:00
Denis Chaplygin
ea111129dd Added full flatbuffers support to the Table service 2019-08-26 11:08:56 +03:00
Denis Chaplygin
7ddda105a3 Added flatbuffers support to the PluginBase::Error
This changes BREAKS osrm.
2019-08-26 11:08:56 +03:00
Denis Chaplygin
56406e80ce Added flatbuffer support to the server request handler. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
75aadb0f3f Passed ResultT down to engine plugins, so now they can form replies in different formats. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
f6f86b2a52 Added flatbuffers schema. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
3f34c8d88c Flatbuffers library added to the list of third party libraries. 2019-08-26 11:08:56 +03:00
Denis Chaplygin
59a83bd537 Added output format parser to the other services.
Same as for Route service, you can now specify either json or flatbuffers
as output format for the other services (except Tile service, where it
makes no sense).
2019-08-26 11:08:56 +03:00
Denis Chaplygin
59ca7840f4 Added output format parser to the Route service.
It is possible now to choose between json and flatbuffers (not yet implemented) output format.
Only route service is supported atm.
2019-08-26 11:08:56 +03:00
Lev Dragunov
88979d0d86
Merge pull request #5518 from akashihi/keepalive
Keepalive
2019-08-23 14:52:08 +03:00
Denis Chaplygin
2462826c20 Added changelog entry. 2019-08-23 13:07:17 +03:00
Denis Chaplygin
9efcab2108 Receive timeout should only be active for a second and
following requests on a keep-alive connections.
2019-08-23 12:21:54 +03:00
Denis Chaplygin
4fbf58adb3 Documented HTTP server 'keep-alive' support 2019-08-23 12:21:54 +03:00
Denis Chaplygin
a7b7d77e1f Formatted the code. 2019-08-23 12:21:54 +03:00
Denis Chaplygin
22550d078f Added timeout handling for keep-alive operations. 2019-08-23 12:21:54 +03:00
Denis Chaplygin
a0582a3e68 Added keep-alive support to the http server. 2019-08-23 12:21:54 +03:00
Denis Chaplygin
92c7b6fbd1 Added 'Connection' header extraction. 2019-08-23 12:21:54 +03:00
Lev Dragunov
86aebc0812
Merge pull request #5471 from stastnypremysl/master
Solving problem with g++8 and boost libs:
2019-05-28 17:45:06 +03:00
Přemysl Šťastný
b4f849adaa Solved this warning:
In file included from /home/travis/build/Project-OSRM/osrm-backend/include/storage/shared_data_index.hpp:4,
                 from /home/travis/build/Project-OSRM/osrm-backend/include/engine/datafacade/contiguous_block_allocator.hpp:4,
                 from /home/travis/build/Project-OSRM/osrm-backend/include/engine/datafacade/contiguous_internalmem_datafacade.hpp:5,
                 from /home/travis/build/Project-OSRM/osrm-backend/include/engine/plugins/nearest.hpp:5,
                 from /home/travis/build/Project-OSRM/osrm-backend/src/engine/plugins/nearest.cpp:1:
/home/travis/build/Project-OSRM/osrm-backend/include/storage/shared_datatype.hpp:102:26: warning: inline function ‘virtual void* osrm::storage::BaseDataLayout::GetBlockPtr(void*, const string&) const’ used but never defined
     virtual inline void *GetBlockPtr(void *base_ptr, const std::string &name) const = 0;
2019-05-28 12:45:47 +02:00
Přemysl Šťastný
d964d368aa added g++8 to travis; -Wno-cast-function-type flag added because https://github.com/nodejs/nan/issues/807 2019-05-28 12:44:48 +02:00
Přemysl Šťastný
38700e207e Solving problem with g++8 and new boost libs:
osrm-backend/src/storage/io_config.cpp:18:89: error: call of overloaded ‘is_regular_file(<brace-enclosed initializer list>)’ is ambiguous
         if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()}))
                                                                                         ^
In file included from /usr/local/include/boost/filesystem.hpp:17,
                 from /home/premy/packages/osrm-backend/include/storage/io_config.hpp:8,
                 from /home/premy/packages/osrm-backend/src/storage/io_config.cpp:1:
/usr/local/include/boost/filesystem/operations.hpp:473:8: note: candidate: ‘bool boost::filesystem::is_regular_file(const boost::filesystem::path&)’
   bool is_regular_file(const path& p)  {return is_regular_file(detail::status(p));}
        ^~~~~~~~~~~~~~~
In file included from /usr/local/include/boost/filesystem.hpp:17,
2019-05-28 12:43:27 +02:00
Lev Dragunov
817aeace55
Merge pull request #5417 from TehNrd/node-js-docs
Update nodejs api docs with dataset_name parameter
2019-05-27 15:13:16 +03:00
Lev Dragunov
501e866992
Merge pull request #5389 from gojuno/max_height_decrease
Decrease max height to 2 meters
2019-05-27 14:57:19 +03:00
Jason Venable
f2724e9e63 Update nodejs api docs with dataset_name parameter 2019-03-29 10:36:34 -04:00
Ilya Zverev
2820853fb6 Update changelog 2019-03-04 13:30:10 +03:00
Ilya Zverev
f5ebe8bc3b Update comment 2019-03-04 13:27:16 +03:00
Ilya Zverev
98294e3ddd Decrease max height to 2 meters 2019-03-04 13:23:17 +03:00
Jay Zhang
ce33f1ae98 correct comments 2019-03-01 22:33:44 +08:00
RhinoDevel
e86d93760f Table distances & durations work with MLD, too (v5.22.0) (#5377) 2019-02-26 08:41:33 -08:00
Ilya Zverev
a1e5061799 Decrease default car weight to 2 tons (#5371)
* Decrease default car weight to 2 tons
* Add a link to PR to the change log
2019-02-20 10:19:18 -08:00
Daniel Patterson
2c7c18fd24 Fix bug in snapping=any when bearings or radiuses are supplied. 2019-02-15 20:42:30 -08:00
Raf Czlonka
5ddbb25237 Use an environment variable instead of command substitution (#5364)
`$PWD` is already there so use it instead of running `pwd(1)` in a subshell each time.
2019-02-15 15:47:05 -08:00
Raf Czlonka
9ba60d0d5c Quote command line options which may contain special characters (#5362)
I.e. the example commands fail if $PWD contains a space character.
2019-02-15 08:59:02 -08:00
Daniel Patterson
4f0ec785f6
Configurable snapping behaviour (#5361) 2019-02-14 17:14:50 -08:00
Kajari Ghosh
02b50458b0 Update taginfo.json (#5356) 2019-02-07 14:55:57 -08:00
Daniel Patterson
0a556fe450
Fix changelog. 2019-02-04 16:15:19 -08:00
Daniel Patterson
f2f167c95d
Allow routing past barrier=arch. (#5352) 2019-02-04 16:14:43 -08:00
Lev Dragunov
8b45ff7a18
Store metadata about original OSM data, and return it in the API response, if available. 2019-01-30 15:31:56 -08:00
Daniel Patterson
4c665b24d9
Add optional builds for lts and node version aliases. This will give us a heads up when new Node (#5347)
versions break bindings, and might automagically get us support for new versions if it "just works".
2019-01-30 12:17:04 -08:00
Daniel Patterson
381d492a8f
Add waypoints parameter to viaroute API (#5345)
* Add silent waypoints to viaroute API.
2019-01-24 16:19:59 -08:00
Daniel Patterson
e250c83c21 Add BUILD_CONCURRENCY argument so that we can limit concurrency on Docker Hub (and thus reduce peak memory need for build) 2019-01-17 16:16:44 -08:00
Andrii Dmytrenko
e2e326d15e Fix cpack config by pointing to a correct LICENSE file 2019-01-17 09:45:11 -08:00
Daniel Patterson
4abca85474 Downgrade to debian:stretch-slim to ensure stable environment for building. 2019-01-11 16:46:28 -08:00
Daniel Patterson
2c78d862a3
Reset master for next release. 2018-12-18 16:25:51 -07:00
Daniel Patterson
b1451a7421
Release 5.21.0 2018-12-18 16:17:34 -07:00
Daniel Patterson
da1c251144
Prep 5.21.0-rc.1 2018-12-15 21:43:10 -07:00
Daniel Patterson
1eab7b41d1 Update CHANGELOG. 2018-12-15 21:07:06 -07:00
Daniel Patterson
1dca8ae76a Correct invalid tests - these captured the incorrect behaviour, the matrices should've been symmetrical (a->o == o->a for these cases) 2018-12-15 21:07:06 -07:00
Daniel Patterson
002e86863d Add test to ensure forward/reverse snapping distances are correct, and fix some tests that were incorrect due to the bug. 2018-12-15 21:07:06 -07:00
Daniel Patterson
1d82b01816 Count reverse offset from the back of the geometry, not the front. 2018-12-15 21:07:06 -07:00
Frédéric Rodrigo
714719c377 Lua maxspeed parsing refactoring (#5144)
* Lua maxspeed parsing refactoring
2018-12-14 21:58:07 -07:00
Huyen Chau Nguyen
77b4fbb69c Fix maxspeed to consider source:maxspeed tags (#5217)
* In Belgium the maximum speed in rural areas is 70 in the region Flanders
* parse maxspeed using source:maxspeed and maxspeed:type tags
* add changelog
* make maxspeed:advisory more important than maxspeed
* add test for source:maxspeed
2018-12-14 21:42:44 -07:00
Matt Riggott
11fde865f7 Document switch to Debian base images (#5281)
* Document switch to Debian base images
2018-12-14 21:36:09 -07:00
Salim KAYABASI
717406043a Remove unused Node binary publishing, and upgrade build environment.
Upgrades the build environment to Node 10, which let's us pull down some security fixes in package dependencies that were unfixed in Node 4.

Also removes Node 4 and 6 binary publishing which were almost never used (20 downloads out of 50,000).

Fixes https://github.com/Project-OSRM/osrm-backend/issues/5312
2018-12-14 21:34:48 -07:00
Daniel Patterson
1ef85c57cc Upgrade CI environment to Node 10, remove builds for < Node 8
Remove yarn, npm is fast now, and comes with node.
Synchronize package-lock.json and package.json
2018-12-14 14:56:21 -07:00
Daniel Patterson
d0180517a8
Merge branch 'master' of github.com:Project-OSRM/osrm-backend 2018-12-14 11:54:00 -07:00
Daniel Patterson
520b7ebbb6
Remove 5.20 build trigger from master branch - should only exist on release branches. 2018-12-14 11:53:48 -07:00
Dinesh Weerapurage
2caba96076 using libboost 1.67 in both build and run stages (#5311)
* using libboost 1.67 in both build and run stages, added execution permision for /opt
2018-12-14 11:51:05 -07:00
Daniel Patterson
81bc2f41a6
When matching, ignore 'is_startpoint' propert, snap to any edge (#5297)
Includes all edges in the rtree, but adds an `is_startpoint` flag to each.  Most plugin behaviour remains unchanged (non-startpoint edges aren't used as snapping candidates), but for map matching, we allow snapping to any edge.  This fixes map-matching across previously non-is_startpoint edges, like ferries, private service roads, and a few others.
2018-12-13 17:10:32 -07:00
Daniel Patterson
06e010b4d0 Include information on estimates in table response (#5259)
* Revert "Remove estimated_cells value in the response."

This reverts commit 364e35af06.

* Update changelog.

* fix linting

* adjust fallback_speed check

* change [].includes to [].indexOf !== -1 for compatibility with node 4

* change param name

* more cuke tests

* fix formatting
2018-12-11 12:21:57 -05:00
Kajari Ghosh
92d3ce789b
Fix scale_factor bug (#5303)
* check for scale_factor != 1

* changelog
2018-12-10 17:11:08 -05:00
Kajari Ghosh
01ca32c81c
Fix fallback speed validity checks (#5300)
* fix fallback_speeds check to only accept values > 0

* add invalid_fallback_speed
2018-12-10 14:53:30 -05:00
Kajari Ghosh
2e17f3010a
Add a multiplier to the matrix (#5298)
* add a multiplier to the matrix

* add rounding

* remove scale_factor restrictions

* clamp for overflow error

* update check to match error message

* enforce clamping on < 0 and increase test coverage

* add an invalid scale_factor value to node tests

* increase test coverage

* changelog
2018-12-10 13:41:44 -05:00
Kajari Ghosh
c4238c4ed6
Backport-v5.20.0 (#5301)
* Prepare RC.1

* Bump version.

* remove destination/sources length <= coordinates length check (#5289)

* Add node 10 builds to travis (#5246)

* Add node 10 builds to travis

* Add changelog

* bump version to rc5

* Fix fallback_speed vector access (#5291)

* add failing cuke test

* correctly access durations vector

* changelog

* one more cuke test

* bump rc version

* 5.20.0

* remove line from changelog about commit that isn't actually in here

* update CHANGELOG and osrm version in package.json for v5.20.0

* bump to restart appveyor
2018-12-10 11:27:13 -05:00
Kajari Ghosh
3d781e6f28
Fix fallback_speed vector access (#5291)
* add failing cuke test

* correctly access durations vector

* changelog

* one more cuke test
2018-12-05 00:41:06 -05:00
Daniel Paz-Soldan
4976233cff Add node 10 builds to travis (#5246)
* Add node 10 builds to travis

* Add changelog
2018-12-04 14:13:49 -05:00
Kajari Ghosh
98ea2a0b09
remove destination/sources length <= coordinates length check (#5289) 2018-12-04 13:35:26 -05:00
Dinesh Weerapurage
f978900ab0 adding a debian based docker image 2018-11-08 12:03:35 +01:00
Daniel Patterson
8b6580128b
Merge pull request #5255 from Project-OSRM/danpat_snapped_distance_everywhere
Return 'distance' in all waypoints for all APIs
2018-11-02 15:36:27 -07:00
Daniel Patterson
4dde9c7bbe
Include distance from input to snapped for all waypoints, not just on the nearest service. 2018-11-02 15:30:52 -07:00
Daniel Patterson
973837207b
Merge pull request #5257 from Project-OSRM/danpat_table_noroute_estimate
Use estimates for NoRoute in table requests
2018-11-02 01:41:50 -07:00
Daniel Patterson
364e35af06
Remove estimated_cells value in the response. 2018-11-02 01:08:59 -07:00
Daniel Patterson
985ab58f45
Add feature to fill null table entries with as-the-crow-flies estimates. 2018-11-02 01:07:24 -07:00
Daniel Patterson
cb1db646f2
Merge pull request #5251 from Project-OSRM/danpat_cache_distances
Pre-calculate distance values
2018-10-30 16:14:47 -07:00
Daniel Patterson
a67c4bf84d
Calculating durations is unavoidable due to tie-breaking minimums, but we can avoid accumulating distances if they're not requested. 2018-10-30 15:41:06 -07:00
Daniel Patterson
498259b220
Replace dynamic distance calculation for table plugin with pre-calculated distances on shortcuts, avoiding unpacking cost.
Adds approx 10% to total data size.  Speeds up large table requests by 2 orders of magnitude.

Co-authored-by: Kajari Ghosh <ghoshkaj@gmail.com>
2018-10-30 15:41:06 -07:00
Daniel Patterson
5327f8da4e
Timer script should error properly if something goes wrong, and print out what happened. 2018-10-30 15:41:06 -07:00
Daniel Patterson
802ccfb497
Merge pull request #5252 from Project-OSRM/danpat_pin_yarn
Pin Yarn to 1.11.1 so it works with Node4
2018-10-30 15:40:19 -07:00
Daniel Patterson
ec369d560a
Pin Yarn to 1.11.1 so it works with Node4 (https://github.com/yarnpkg/yarn/pull/6409#issuecomment-429181371) 2018-10-30 15:38:55 -07:00
Daniel Patterson
535647e439
Merge pull request #5242 from Project-OSRM/ghoshkaj_mmaperize
Support directly mmap-ing datafiles
2018-10-29 11:58:26 -07:00
Daniel Patterson
954121634f
Merge branch 'master' into ghoshkaj_mmaperize 2018-10-29 09:52:50 -07:00
Daniel Patterson
594a45e7e0
Re-use msinttypes bundled with RapidJSON when compiling on Windows. (#5249) 2018-10-29 09:51:56 -07:00
Daniel Patterson
96c7b47afe
Document new mmap_memory option in NodeJS API 2018-10-27 00:12:17 -07:00
Daniel Patterson
b7e7d32361
Expose new --mmap switch (mmap_memory: true in NodeJS), and run test suite in this mode, as well as shared memory mode. 2018-10-26 23:54:00 -07:00
Daniel Patterson
2f9cb44368
mmap tarfiles directly when mmapping is enabled, instead of copying data into separate mmapped block
Co-authored-by: Kajari Ghosh <ghoshkaj@gmail.com>
2018-10-26 23:53:59 -07:00
Daniel Patterson
d80318f8ea
Match serialized bit-packing for vector<bool> to match in-memory layout for vector_view<bool> so that data can be directly mmapped. 2018-10-26 23:53:50 -07:00
Daniel Paz-Soldan
b1791d1ab3 Fix anchor links in api docs (#5235) 2018-10-16 09:23:29 -07:00
Yota Toyama
a53da9095a Fix table node API docs (#5204) 2018-10-01 16:45:05 +03:00
Kajari Ghosh
72e03f9af9
update changelog after 5.19 release (#5203) 2018-09-11 00:34:40 -04:00
Kajari Ghosh
5597415f28
Revert "Improve speed of Map Matching" (#5196)
* Revert "Update changelog"

This reverts commit 9b779c704f.

* Revert "Fix formating"

This reverts commit 5bd7d04fe3.

* Revert "Fix bug in computation of distance offset for phantom node"

This reverts commit 0f78f7b2cc.

* Revert "Adjust text cases for flightly different matching due to rounding"

This reverts commit 8473be69d2.

* Revert "Round network distance to deci-meter to retain previous behavior"

This reverts commit c0124f7d77.

* Revert "Preserve heap state in map matching"

This reverts commit b630b4e32a.

* Revert "Use distance functions from many to many"

This reverts commit 89fabc1b9c.

* Revert "Use FCC algorithm for map matching distance calculation"

This reverts commit a649a8a5cf.
2018-09-06 12:05:28 -04:00
Jie
5476f6ab27 Fix GDB not work for osrm-routed on Linux (#5157)
As I mentioned in the issue #5156, I met below issue on my Win10+WSL(Ubuntu) env:
The remote debugger (VSCode on Win10, gdb on Ubuntu 18.04 LTS) works well from the beginning of the main() function. But when I step over the code pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask); (src/tools/routed.cpp(289)), below breakpoints can not work and displayed unverified breakpoint.

Then I found that gdb breakpoint need at least SIGTRAP, SIGSTOP to work (Please refer to [how debugger works](http://www.alexonlinux.com/how-debugger-works) for more details), but all signals are blocked in the source code until server initialized done.

In my understanding, block all signals DO NOT make sense for this osrm-routed process. Only several signals (SIGINT, SIGQUIT, SIGTERM) are expected to wait. So I made the change and it works well for me then.
2018-09-05 16:23:48 -07:00
Daniel Patterson
0971f06193 Add option to node bindings to return result as a pre-generated JSON string (this avoids a lot of overhead, and moves JSON string rendering out of the main event loop). 2018-09-05 15:09:13 -07:00
Daniel Patterson
85515f063a Render floating point numbers to string using Grisu2 algorithmt instead of stdlib to speed up JSON generation. 2018-09-05 14:20:47 -07:00
Daniel Patterson
69d7825542 Increase allowed shared memory regions to 512 from ~120 2018-09-05 11:48:02 -07:00
Patrick Niklaus
9b779c704f Update changelog 2018-08-02 12:19:24 +02:00
Patrick Niklaus
5bd7d04fe3 Fix formating 2018-08-02 12:19:24 +02:00
Patrick Niklaus
0f78f7b2cc Fix bug in computation of distance offset for phantom node 2018-08-02 12:19:24 +02:00
Patrick Niklaus
8473be69d2 Adjust text cases for flightly different matching due to rounding 2018-08-02 12:19:24 +02:00
Patrick Niklaus
c0124f7d77 Round network distance to deci-meter to retain previous behavior 2018-08-02 12:19:24 +02:00
Patrick Niklaus
b630b4e32a Preserve heap state in map matching 2018-08-02 12:19:24 +02:00
Patrick Niklaus
89fabc1b9c Use distance functions from many to many 2018-08-02 12:19:24 +02:00
Patrick Niklaus
a649a8a5cf Use FCC algorithm for map matching distance calculation 2018-08-02 12:19:24 +02:00
Frédéric Rodrigo
f928956584 Support maxlength and maxweight in car profile 2018-07-11 18:33:30 +02:00
Frédéric Rodrigo
7ff68792d7 Add helper for maxlength into measure.lua 2018-07-11 18:33:30 +02:00
Frédéric Rodrigo
3088dd0342 Better and flexible weight parsing in measure.lua 2018-07-11 18:33:30 +02:00
Frédéric Rodrigo
d2590989f5 Default maxspeed for fr:rural is now 80km/h 2018-07-11 17:54:46 +02:00
Antoine Giret
3a7b377586 Update profiles.md 2018-06-27 14:27:17 +02:00
Michael Krasnyk
82b5648c97 Don't collapse segregated intersections at roundabout exits, #5114 2018-06-21 15:24:03 +02:00
Antoine Giret
1628a3c4d5 Update profiles.md 2018-06-07 15:43:06 +02:00
Matthias Gilch
e5d8319c43 Removed unused variable
The variable name_data_mutex is declared in a block but never used
within this block. So I've removed the variable.
2018-06-02 22:49:30 +02:00
MichalPP
06699132eb allow routing over barrier=some_tag 2018-05-29 16:56:15 +02:00
MichalPP
918e794d6a change barrier_whitelist to barrier blacklist
change barrier_whitelist to barrier blacklist  in foot profile
fix #5067 and #3890 and #4823
2018-05-29 16:56:15 +02:00
MichalPP
8dd8ee1fc2 blacklisting barriers allow routing
blacklisting barriers allow routing over barrier=some_tag
2018-05-28 17:21:08 +02:00
MichalPP
c3d0efda93 change barrier_whitelist to barrier_blacklist 2018-05-28 17:21:08 +02:00
Patrick Niklaus
3b4e2e83ef Fix excluding nodes for one to all query 2018-05-08 15:50:25 +00:00
Patrick Niklaus
c459530cb6 Address PR comments 2018-05-08 15:50:25 +00:00
Kajari Ghosh
2a15e6dec8 Add support for annotations=distances in MLD
This commit brings feature parity with CH for the `table` pluging.
2018-05-08 15:50:25 +00:00
Huyen Chau Nguyen
1a1293608d fix example requests for distance tables 2018-05-02 17:25:01 +02:00
Michael Krasnyk
318df9deaa Adjust ebn_weight assertion to new node weights 2018-05-01 18:53:04 +02:00
Michael Krasnyk
cacb162520 Review and rebase updates 2018-04-28 08:59:18 +02:00
Michael Krasnyk
105709cb43 Don't handle response errors separately in osrm-runner 2018-04-28 08:59:18 +02:00
Michael Krasnyk
9695fa7941 Remove weight and duration from customizer::EdgeBasedGraphEdgeData 2018-04-28 08:59:18 +02:00
Michael Krasnyk
fd9bebbfa7 Add EBG node durations 2018-04-28 08:59:18 +02:00
Michael Krasnyk
db18e8669f Always read .osrm.enw file in updater 2018-04-28 08:59:18 +02:00
Michael Krasnyk
9b4a4fdd82 Add customizer::MultiLevelGraph 2018-04-28 08:59:18 +02:00
Michael Krasnyk
cdc7e5f021 Fix for updating node weights in contraction hierarchy 2018-04-28 08:59:18 +02:00
Michael Krasnyk
adc87149e2 List dataset blocks 2018-04-28 08:59:18 +02:00
Michael Krasnyk
8adbfe06ed Throw an exception if a shared region is not found 2018-04-28 08:59:18 +02:00
Patrick Niklaus
ae805f9ec8 Make cheap rulers static 2018-04-27 05:21:08 +02:00
Patrick Niklaus
be24689b0f Optimize distance calculation by getting rid of rounding 2018-04-27 05:21:08 +02:00
Michael Krasnyk
41c31a2388 Use mapbox::util::optional instead of std::experimental::optional 2018-04-27 05:21:08 +02:00
Huyen Chau Nguyen
8b866502d1 make eslint happy 2018-04-27 05:21:08 +02:00
Huyen Chau Nguyen
7837cd61df clang format 2018-04-27 05:21:08 +02:00
Huyen Chau Nguyen
b573485c31 only use half of rulers because earth is symmetric 2018-04-27 05:21:08 +02:00
Huyen Chau Nguyen
4e68f3a7e1 change haversine computation to cheap ruler in distance tables 2018-04-27 05:21:08 +02:00
Huyen Chau Nguyen
5ba26d3d6d refactor cheap ruler cache 2018-04-27 05:21:08 +02:00
Daniel Patterson
a6cf2eee7e Use faster method for calculating distances.
fix cmakelist
2018-04-27 05:21:08 +02:00
Patrick Niklaus
6843eb1479 Add changelog entries for profile changtes 2018-04-26 21:46:20 +02:00
Patrick Niklaus
b331885d3c Add test fo excluding ferries on bikes 2018-04-26 21:46:20 +02:00
Patrick Niklaus
73716bd651 Add support for classes on bicycle profile 2018-04-26 21:46:20 +02:00
Michael Krasnyk
9edd161da3 Test for "No turn issued for right turn on un-named roads", #4414
The issue is fixed by d166fc6a75
2018-04-26 18:53:47 +02:00
Kajari Ghosh
1bc3ff6491 fix the ascii art to make sense 2018-04-25 23:51:27 +02:00
Kajari Ghosh
b0f2ef287e fix the offset case when there is no packed path to unpack 2018-04-25 23:51:27 +02:00
Patrick Niklaus
16f53ff81a Sort unpacked paths by sharing 2018-04-25 16:07:31 +02:00
Patrick Niklaus
7a260dc2ba More parameter tuning 2018-04-25 16:07:31 +02:00
Patrick Niklaus
1c0d951f5e Adjust to PR comments 2018-04-25 16:07:31 +02:00
Patrick Niklaus
77a740c0fb Parameter tuning for different route lengths 2018-04-25 16:07:31 +02:00
Patrick Niklaus
61101db8cf Use duration and not weight for sharing 2018-04-25 16:07:31 +02:00
Patrick Niklaus
b51632a2fb Chose alternatives parameters based on coordinate distance 2018-04-25 16:07:31 +02:00
Patrick Niklaus
9d10503a9c Replace step function with contious scaling 2018-04-25 16:07:31 +02:00
Patrick Niklaus
7d50e5afe0 Refactor parameters to be selected at runtime 2018-04-25 16:07:31 +02:00
Patrick Niklaus
549216c792 Compute sharing weighted by edge weight
This ensures that small insignificat turns don't affect the overall
sharing metric too much.
2018-04-25 16:07:31 +02:00
Patrick Niklaus
1990de7dcc Fix inserting edges of shortest path for sharing check
This caused very sub-optimal routes to be selected.
2018-04-25 16:07:31 +02:00
Kajari Ghosh
89f6e2d55b
Parse table annotations param correctly (#5050)
* fix incorrect parameter parsing for node osrm and add tests

* fix boost spirit grammar parsing for annotations

* return NotImplemented when distance annotation is requested for MLD in table plugin

* update docs
2018-04-24 11:05:35 -04:00
Michael Krasnyk
c628ecbf24 Update tile unit tests 2018-04-24 15:40:57 +02:00
Jochen Topf
b6f19cd544 Use vtzero in tile plugin.
This uses the new vtzero library (https://github.com/mapbox/vtzero)
instead of using protozero directly.
2018-04-24 15:40:57 +02:00
Kajari Ghosh
14860b62e9
Unpack paths and return total distance in matrix plugin for CH (#4990) 2018-04-20 18:18:55 -04:00
Patrick Niklaus
9970b7d580
Merge pull request #5037 from Project-OSRM/subtrees-protozero-vtzero
Update libosmium and add protozero and vtzero libraries
2018-04-20 20:44:36 +02:00
Patrick Niklaus
7feb79ef91 Merge branch 'master' into subtrees-protozero-vtzero 2018-04-20 13:32:49 +00:00
Antoine Giret
6f84812903 Update profiles.md 2018-04-20 15:29:16 +02:00
Karen Shea
8085e86170
Change emoji 2018-04-20 13:19:48 +02:00
Karen Shea
35973576d9
Update releasing.md 2018-04-20 13:19:06 +02:00
Duane Gearhart
7740d5d7c0 Do not combine a segregated edge with a roundabout (#5040)
* Do not combine a segregated edge with a roundabout, add test
2018-04-20 11:41:53 +02:00
Patrick Niklaus
c4eff6cd65 Add option to osrm-runner to limit the distance 2018-04-20 08:14:03 +03:00
Michael Krasnyk
5c4353b46e
Removing submodules 2018-04-19 22:13:07 +03:00
Michael Krasnyk
05a5918909
Update CMakeLists.txt file 2018-04-19 22:13:06 +03:00
Michael Krasnyk
80ad38bbc6 Merge commit '6bee8866de99a602039feef463c22c972f0f86aa' as 'third_party/vtzero' 2018-04-19 22:03:52 +03:00
Michael Krasnyk
6bee8866de Squashed 'third_party/vtzero/' content from commit 2b43c8f5c
git-subtree-dir: third_party/vtzero
git-subtree-split: 2b43c8f5c7cc461a874a657673dfc15f8fb21d1d
2018-04-19 22:03:52 +03:00
Michael Krasnyk
ba92674c6e Merge commit '68019a1fb20928beaa7b0cb2d8310af29ffe789e' as 'third_party/protozero' 2018-04-19 22:03:49 +03:00
Michael Krasnyk
68019a1fb2 Squashed 'third_party/protozero/' content from commit d5d8debf1
git-subtree-dir: third_party/protozero
git-subtree-split: d5d8debf1b17c6bb652395957b76cde7787e5377
2018-04-19 22:03:49 +03:00
Michael Krasnyk
3a9acde2c3
Merge commit 'a3a7a822e136d2357660d85124d8e7bb26ea6f7c' into subtrees-protozero-vtzero 2018-04-19 22:03:25 +03:00
Michael Krasnyk
a3a7a822e1 Squashed 'third_party/libosmium/' changes from ce865381f..d2c1d872b
d2c1d872b Release v2.14.0
9c9aedd50 Update embedded catch.hpp to version 1.12.1.
f94e70d32 Change comment on namespace closing brace to make clang-tidy happy.
ad9f03afc Prefer prefix increment operator.
a141b9c0c Update change log.
363fc7a15 Add more XML tests.
303a3090f Refactor XML tests.
a1ee5dd56 Make util namespace inline.
6f1709a83 Cleanup progress bar code.
1b02b65e0 Use Location setters taking a string in osmium_tiles example.
7ffdc7618 Disable clang-tidy warning.
882631085 Better implementation of str_to_int.
4cbf53725 Fix another bitwise op on signed integer.
903bfac9d Disable clang-tidy warning.
01de3f518 Don't change location if set_lon() or set_lat() functions throw.
9a27e899d Fix bitwise operation on signed integer.
61650224f Disable some clang-tidy warnings.
9dfa8437e Provide a way to better mock the getenv function in tests.
ae2c172a2 Explicitly set integer type for integers in test code.
878850068 Simpler implementation. We don't need to look at errno at all.
8f9b886f5 Formatting
cf4760cb0 Use bit operations on unsigned where possible.
c7cb4cde8 No conversion needed later if we declare it this way.
01357a540 Add missing inline for free function.
3feef81ee Disable clang-tidy warning in place we can't do anything about.
bf083b8ee Avoid binary bitwise operations on signed integers.
f70b1c803 Move content of osmium::util::detail namespace into osmium::detail.
caf2f0033 Remove use of atoi and atol from code.
f564cef07 Formatting.
f0885fc73 Disable travis build with sanitizers.
858c58444 Use explicit asserts and then casts, not static_cast_with_assert.
a613b1b0a Disable clang-tidy warning.
50e327677 Always build and run data tests on travis.
20d7a09b0 Update submodule to add more XML tests.
6c8f652bf Merge pull request #250 from Nakaner/object-comparison-without-timestamp
38ea437c0 Make XML parser more strict.
7788f5108 Remove object_order_type_id_reverse_version_without_timestamp
fe2223d25 Ignore timestamps if only one object has a valid timestamp
a4515161a Code cleanup.
eb5ea1a0e Use explicit conversions.
105905c45 Only disable warning on non-MSVC compilers.
80fc1b35d Change the way IDs are parsed from strings.
78aedf91e More tests for StringMatcher and disable a clang-tidy warning.
644a00752 Move catch.hpp into its own directory.
19842756c Update to newest osm-testdata submodule.
0402f64d7 Fix the problem with "git submodule" in appveyor.
ec4095d32 Cleanup metadata_options code.
d7390741e Add static_cast to avoid conversion warning.
dd16be1c3 Remove else after throw.
ef4d618de Remove unused variable.
0fdb58d13 Check out submodule in appveyor builds.
6406282d3 Merge pull request #248 from Nakaner/metadata-options-more
eb138a902 make clang < 3.9 work
e703b0d1d make sections their own independent test cases
f68888006 detect_available_metadata must be inline
b53224588 move metadata_options into osmium namespace
edd363cfa make const what could be const
302a485e5 remove unnecessary include, add missing include
93a76e07e give osmium::io::metadata_from_object a better name
91dfbc427 update documentation
453cd6395 replace REQUIRE(!foo) by REQUIRE_FALSE(foo)
247c3b021 replace friend function by setter methods
0a62e589c performance improvement: check first character instead using std::strlen()
73568bbff move ctor of metadata_options which taks an OSMObject out of class
1879c9e47 restore metadata_options::to_string
71a303608 add more unit tests for osmium::io::metadata_options
843cdc89c replace osmium::io::metdata_options::to_string fully by operator<<
6402a8793 Fix bug in code which determines if an OSM object has a valid user.
a6d8143ae Move metadata_options out of "detail" subnamespace
61e32df10 add metadata_options::operator|=
d5f7cc0ab Use newest osm-testdata submodule.
31e34f10c add operator&=, operator<< and a to_string method to metadata_options
77d507172 Formatting fixes.
1c38b2a61 Update some URLs. Use https where possible.
10066cb3e Merge pull request #247 from Nakaner/issue-245
3c938ce82 Allow version=-1 and changeset=-1 for PBF input.
9a542c133 Add ReaderWithProgressBar class.
49839a1ce Replace strftime by our own implementation.
b32b90942 Update osm-testdata version used.
f88b6e548 Add more tests.
cb7e778f6 Handle NULL geometries in test cases.
1961a9c95 Clean up some test cases.
d7f45e071 Update osm-testdata submodule.
73a2ef18f Remove check for lost ways in multipolygon assembler.
1244e498a Update submodule also in msys2 build.
229fc2453 Revert "Make util namespace inline."
9f942d2e9 Revert "Add inline declaration to one util namespace we forgot."
40d4835ea Really fix appveyor build (I hope).
5ae071135 Add inline declaration to one util namespace we forgot.
e0916257c Clean up debug message.
2ddc474cc Make util namespace inline.
4b4e25f87 Travis config: Do not install clang-tidy, we are not using it.
5a608fba1 Fix travis build.
a075cc323 Fix appveyor build.
41ee9920b Add submodule with osm-testdata repository.
4d42245c0 Revert "Add clang-tidy build to travis."
9df355b64 Fix issue on some compilers.
c8a3c00d6 Add clang-tidy build to travis.
2fc80ad17 Fixed clang-tidy config file order.
2adf05267 Fix various clang-tidy warnings
1dca92459 Use the right syntax to override clang-tidy settings in the code.
25baecb46 Fix some issues found by clang-tidy.
54a8de6c0 Disable more clang-tidy tests.
de46d562e Also look for clang-tidy-6.0 in CMake config.
2172553d8 Add build with sanitizers on travis.
7e4e45562 Add object comparators ignoring the timestamp.
92fb231a1 Fix test code.
e541df0fc Cleanup test code.
5640269da Add comment in appveyor script about unusual parameter.
acb872376 Workaround for failing appveyor MSYS2 build.
0634bcf70 Set default value for m_file_size member.
3a2fe5781 Set default values on output options.
43d289fda Make metadata_options constructor explicit.
6e54992b4 Update change log.
e54b955cf Update included `catch.hpp` to version 1.12.0.
e50b40d53 Update copyright date.
0d8b401b6 Merge branch 'metadata'
c7da3a3b6 Remove superfluous has_visibles boolean.
7f74d33d3 Some cleanups of metadata code and fixes test.
5b3c34990 Output XML attributes uid and user independently of each other.
384167334 Merge pull request #243 from Nakaner/metadata_other
733f1916c Change path of nuget installs in appveyor config.
e48672999 Debug output from FindOsmium.cmake script is better formatted now.
79663be5d Change appveyor scripts to work without deprecated prebuilt libs.
443f7a9e4 Remove dependency on (win)getopt completely.
c133b8b14 Fix osmium_convert: Long options with = syntax.
b55daf00a Remove dependency on (win)getopt from area_test and convert examples.
92f7275a9 output visibility directly after the object ID in debug format
a771279f0 deprecate format option pbf_add_metadata
18e3f6005 The value "no" should be treated as "none" by metadata_options
c8b0b2e28 re-assign metadata_options instead of calling a public method of it
15bc4a200 Add more flexible metadata handling to PBF output
b085632b7 add more flexible metadata handling to OPL and debug output
a12c65974 Remove now wrong check.
767ad883a Allow PBF DenseNodes with only some attributes to be read.
fd5a7eb6c More flexible metadata encoding in OSM files.
d16c18581 Add instructions for bug reporting.
db52591ab Use __COUNTER__ instead of name for internal dummy name.
89e634dfc Cleanup.
931ec30ca Marks some false positives for clang-tidy google-runtime-int warning.
b59ef02a2 More rule of zero/rule of five fixes.
1b72b3386 Pass by value and use std::move.
b7d7017cc Handle some clang-tidy google-runtime-int warnings.
c043ca016 Fix special functions.
41d9f0795 Use fixed sized ints where possible.
0899a66a7 Revert some changes older compilers don't like.
41e05989a Fix several rule of zero/rule of five issues.
4e78a828f Various fixes based on clang-tidy reports.
636bda372 Default initialize arrays.
466e5aa6a Handle various clang-tidy warnings.
9f47aa07d Disable clang-tidy misc-forwarding-reference-overload warning.
5e97bf29f Mark Reader and Writer non-movable.
3a2221b27 Add minimal tests for thread-safe queue class.
affdeed6f Add some tests.
5ed055d50 Handle some warnings regarding "explicit".
b9d4c9bf5 Disable clang-tidy cert-err58-cpp warning.
254c25349 Make ADL work for begin()/end() of InputIterator<Reader>.
b64cb32ae Disable clang-tidy android-cloexec-* warnings.
6d6934ffc Fix various warnings reported by clang-tidy.
30dcabaed Another travis build fix.
88c59e669 Fix travis build.
2facb461f Fix travis and appveyor builds.
bba631a51 Remove protozero from repository.
aebe4a914 Use pass by value and std::move in some constructors.
c8c24c8fd Name unused parameters in comments.
9c2e321f9 Make deleted special functions public.
265c16284 Fix some problems with older compilers.
174e95211 Modernize class initialization code for some classes.
4e3e584f8 Disable more clang-tidy warnings.
6b53981bb Fix some class initializations.
fe1405ef8 Add/remove special functions for some classes.
c6dd930d9 Disable cppcoreguidelines-pro-type-static-cast-downcast warning.
0d09210ec Disable misc-unused-parameters warning in clang-tidy.
1dbc43112 Refactor to avoid misc-suspicious-string-compare clang-tidy warning.
91262cc86 Merge pull request #232 from worace/wkt-geojson-polygons
438076b09 Cleanup: Avoid else after return/break.
e0368e92c Disable modernize-raw-string-literal and hicpp-no-assembler check.
c822888fc Mark C style cast in macro from a library as NOLINT.
662d4a641 Moving a TypedMemoryMapping is noexcept.
aec1c4526 Use auto (clang-tidy check modernize-use-auto).
64857589d Consistent include order.
d1ce8de00 Disable hicpp-invalid-access-moved clang-tidy check.
0d3902420 Refactor test without SECTION.
32e9e9e1e Rewrite test avoiding nested sections.
eeb532902 Reorder includes according to best practice.
249e7b553 Revert "Add build with sanitizers to travis."
362cb419a Set CC env var in travis config.
9f520eca3 Add build with sanitizers to travis.
cfc18fef0 Travis config cleanup.
212c6cd42 Remove tests that triggers undefined behaviour in the std lib.
f30985884 Bugfix: Avoid undefined behaviour.
90191619a Make test work even if unused memory isn't returned to OS.
876867e68 Make older compilers happy.
925d1a797 Add names for unused parameters.
014b3a056 Avoid repeating the return type from the declaration
c4e705f92 Disable hicpp-invalid-access-moved clang-tidy warnings.
8c03b3827 Disable some warnings.
c49962ffe Refactor test to avoid spurious use-after-move warning.
04a0afbba Sort includes.
2aaab9a89 Use auto where possible.
e2d84109b More changes for old compilers.
5364ca2a8 Changes for old compilers.
098fc1fa2 Move initializations of class members to the declaration.
eea463026 Fix buffer overflow in o5m parser.
5dc74f2d5 Remove check from static cast (and document why).
7a2dfdcdc Add NOLINT for using namespace osmium::builder::attr.
01fa05f1e Clang-tidy config cleanup.
5e8f8df3f Order includes.
6b78d9b24 Various small fixes for problems detected by clang-tidy.
b815f71b7 Fix gdal check in CMake config.
d47487093 Fix integer type error.
dec9de9ec Bugfix: Throw if elemens in XML file are nested too deep.
85e37723b Various small cleanups.
5f40d726a Additional checks in o5m parser.
b59b4b6a6 Check before static cast and throw.
e57b15700 Disable compiling some header files if gdal lib is not available.
1d3056646 Better checking that PBF data is in range.
c586521d3 Add some consts to the code.
df17e8189 Trying to get the types right...
8e9b759e0 Check read and write system call for EINTR.
28c676054 Rename license file so that Github finds it.
be29e9a52 Remove duplicate space character.
36c14136f Update protozero to newest version (1.6.0).
a19181998 Make libosmium work with different protozero versions.
5c5d9fb36 Use tag and type from protozero to make PBF parser more robust.
03f894400 Add repology.org badge to README.md.
1840739dd Merge pull request #234 from AMDmi3/patch-1
d8e737196 Add support for DragonFly BSD
8de181c8d Revert "Return const object from postfix ++ operator."
0dfb1d649 Add polygon implementation for WKT and GeoJSON Geometry Factories
150e05aea Fix indentation.
6fdee974a Merge pull request #229 from alex85k/no-winsock
f302f08ce Merge pull request #228 from alex85k/fix-test-win
bfb60c888 remove ws2_32 from needed libraries
ef187851c no winsock2 on windows: replace htonl with protozero::detail::byteswap_inplace
9343f8453 Fix testdata-multipolygon test on Windows (executable path differs)
381cf9272 Do not return const from postfix increment operator.
46ec985e9 Add const version of OutputIterator::operator*.
c67de374f Disable clang-tidy test for const params.
f5eda165f Make functions noexcept and return const value from post increment op.
1e4e3160f Use {} when calling constructors. Use .empty() to check empty strings.
8893d16be Mark some tests using size() with NOLINT.
f8a74a8aa Make functions noexcept.
45c1e072c Use REQUIRE_FALSE(...) instead of REQUIRE(!...) for readability.
fc173dae7 Merge pull request #227 from alex85k/msys2-appveor
0a281c064 Add MSYS2 building to Appveyor
c93f73120 fix FindGem for Windows Ruby distributions
8bf6702b3 Merge pull request #226 from alex85k/master
e8dad731d gmtime_s should be used on both MSVC and GCC from MinGW64
d0d98e9c1 remove "osmium::util::MemoryMapping::" from class body
6830ee9bd ftruncate is not available only on MSVC (MinGW has it)
c0597584f Disable some clang-tidy checks.
578db8e4a Use empty() instead of size() or == "" to check for empty collections.
53c8f3a21 Return const object from postfix ++ operator.
bd5e4d109 Use emplace_back() instead of push_back().
0a0a4f24c Use correct C++ header.
35226ea86 Remove unused move.
df843a9cf Fix header guard.
759e76131 Avoid default argument on virtual function.
db4f1bdb9 Update included catch.hpp to version 1.10.0.
59e70e5c6 Pass constructor arguments by value and std::move() into members.
ee9b598ed Add tests for thread_handler.
ac661209a CMake config: Update list of clang-tidy versions we look for.
d7281215c Add comment to unusual code.
cbb4c09fb Split up some overlong test functions.
9870a6b90 Fix noexcept specification.
5e27c37d0 Use array instead of map to store input/output format creators.
987d12922 Mark some constructors noexcept.
17f4d8b7e Avoid static variable only needed as constant value.
fe705cef0 Avoid else after return in several cases.
d4a85878e Beautifying travis config.
f07d1e375 Make some special functions noexcept.
4bb0f7f22 Do not declare special functions on some classes.
bc6c5943d Disable some clang-tidy checks that produce false positives.
6b6598a5b Remove superfluous std::move() of POD type.
71c3f5e16 Make some special functions noexcept.
1cb32778c Remove explicit true/false in tests.
929ba89cf Always catch by const ref.
a9a255820 Code readability: No else clause after return.
f14364bd3 Code formatting fixes.
f41feb6a5 Simplify code.
727f6eff4 Mark dummy includes for IWYU.
72d20f835 Switch travis build to 'trusty'.
c480e6808 Do not run gcov from codecov script.
d16c6e90a Clean up lambda captures in xml_input_format.hpp.

git-subtree-dir: third_party/libosmium
git-subtree-split: d2c1d872bc915d9579350007383ce1ebfea3665f
2018-04-19 22:03:25 +03:00
Michael Krasnyk
c7d22c2b92
Update dependencies script 2018-04-19 22:03:20 +03:00
Michael Krasnyk
b2aeb47630 Remove dummy edges before inplace permutation 2018-04-19 12:18:48 +02:00
Patrick Niklaus
0a1d1901cc Fix help text and banner 2018-04-17 18:02:28 +02:00
Patrick Niklaus
29db0c80d9 Use CSV stringify to properly escape data in CSV 2018-04-17 18:02:28 +02:00
Huyen Chau Nguyen
4654751872 add dev dependencies for osrm runner 2018-04-17 18:02:28 +02:00
Marcel Radischat
b5b18d8afc Update profiles.md
Add api-version 4 for lua profiles as latest api-version
2018-04-17 17:23:08 +02:00
Huyen Chau Nguyen
15139c934f add changelog entry 2018-04-16 11:39:44 +02:00
Huyen Chau Nguyen
7b8619e37c adjust tests to changes 2018-04-16 11:39:44 +02:00
Huyen Chau Nguyen
f52b5c31b6 refactor bike profile 2018-04-16 11:39:44 +02:00
Huyen Chau Nguyen
e98859e4c0 make primaries and secondaries more dangerous
only apply oneway safety considerations on primaries

re-adjust primary and secondary safeties
2018-04-16 11:39:44 +02:00
Patrick Niklaus
c5cc4c5a74 Remove double log printing 2018-04-13 10:13:57 +00:00
karenzshea
e3b831364f empty list of shmem regions if none found 2018-04-13 12:07:10 +02:00
karenzshea
730d2b5ef2 log err instead of throwing when no shmem regions found 2018-04-13 12:07:10 +02:00
Michael Krasnyk
16abee1022 Avoid using signed integers for edge IDs 2018-04-12 10:03:37 +02:00
Patrick Niklaus
69fa52a010 Use byte based tar size encoding above 8GB 2018-04-10 21:12:39 +02:00
Patrick Niklaus
e1efa4c6ab Add test case for writing and reading huge tar file
This test case is disabled by default because it needs too much storage,
but serves as documentation for the future.
2018-04-10 21:12:39 +02:00
Michael Krasnyk
17cd1575f6 Use base-256 encoding for files larger 68G
Reference:
http://lists.busybox.net/pipermail/busybox/2011-May/075596.html
2018-04-10 21:12:39 +02:00
Michael Krasnyk
3cd8e0fef8 Use 12 octal digits in mtar_raw_header_t::size 2018-04-10 21:12:39 +02:00
Michael Krasnyk
397bb694fd Fix mtar file size truncation to 4G 2018-04-10 21:12:39 +02:00
Patrick Niklaus
473ebfcbf6 Fix debug printing for coordinates 2018-04-10 18:08:18 +02:00
Patrick Niklaus
a06171438e Fix hard-coded hint strings in unit-tests 2018-04-10 18:08:18 +02:00
Patrick Niklaus
ea0881553e [skip ci] Bump master to 5.18 2018-04-09 13:14:43 +00:00
Michael Krasnyk
c4bf450fc6 Restore storage constructors with one arguments 2018-04-09 15:08:00 +02:00
Patrick Niklaus
bf2b45120a Use ArrayStorage for boundary nodes to optimize MLD
For the MLD algorithm we can partition the NodeID range into boundary
and non-boundary nodes. Since there are only we boundary nodes we can
use the ArrayStorage for those yielding much faster query times.
2018-04-09 15:08:00 +02:00
Patrick Niklaus
7edf0f218c Better statistics for osrm-partition and osrm-custimize 2018-04-09 13:39:39 +02:00
Patrick Niklaus
600ca06166 Simplify toEdges and make it more robust against accidental memory allocations 2018-04-09 13:03:28 +02:00
Michael Krasnyk
8d8042ebae Use ranges with fixed types 2018-04-09 11:05:01 +02:00
Kajari Ghosh
be123cd72f Use ranges in datafacade instead of vectors
Range type must use immutable references due to a
regression in `boost::any_range`.
References:
https://svn.boost.org/trac10/ticket/10493
https://stackoverflow.com/questions/42427395/boostany-range-with-optimization-level-o2-causes-crash/42427662
2018-04-09 11:05:01 +02:00
Daniel Patterson
282415bbc1
Honour British spelling of manoeuvre relation (#5004)
* Support British spelling of manoeuvre to comply with OSM standards.
2018-04-06 17:08:30 -07:00
Patrick Niklaus
b08191b2c4 Add changelog entry for osrm-datastore 2018-04-07 00:22:29 +02:00
Patrick Niklaus
39dd484f45 Restore the connectivity checksum check 2018-04-07 00:22:29 +02:00
Patrick Niklaus
5450574d63 Better test coverage for datastore options 2018-04-07 00:22:29 +02:00
Patrick Niklaus
29d1b34140 Fix formating 2018-04-07 00:22:29 +02:00
Patrick Niklaus
a915542916 Add option to only update the metric dependent data 2018-04-07 00:22:29 +02:00
Patrick Niklaus
fea07f343b Load data in two separate data regions 2018-04-07 00:22:29 +02:00
Patrick Niklaus
c7daa521ad Address PR comments 2018-04-05 15:12:47 +02:00
Patrick Niklaus
c2532b1589 Add test case from @oxidase for datastore parameters 2018-04-05 15:12:47 +02:00
Patrick Niklaus
4610fd9ff1 Fix formating 2018-04-05 15:12:47 +02:00
Patrick Niklaus
c4b90f52c0 Run cucumber in its own dataset namespace so it does not interfere 2018-04-05 15:12:47 +02:00
Patrick Niklaus
0e8b8b4901 Add nodejs test for dataset name 2018-04-05 15:12:47 +02:00
Patrick Niklaus
2c80f76004 Add support for naming the dataset 2018-04-05 15:12:47 +02:00
Patrick Niklaus
666ce46d36 Refactor shared memory storage to allow for multiple named datasets 2018-04-05 15:12:47 +02:00
Michael Krasnyk
bc120776f0 Don't apply unimplemented SH and PH conditions 2018-04-05 13:31:48 +02:00
Daniel Patterson
5693ffd2cf Validate format of changelog entries. 2018-04-05 10:56:28 +02:00
Patrick Niklaus
51fe0dd5a0 Add missing check of a tar writing function 2018-04-05 00:54:50 +02:00
Michael Krasnyk
14d2199cd8 Always create a new kv pair to avoid using shared strings 2018-04-04 12:38:40 +02:00
Patrick Niklaus
9889a454ce Fix test compilation 2018-04-04 12:38:40 +02:00
Patrick Niklaus
cb4586ebee Make use of the view factory in the data facade 2018-04-04 12:38:40 +02:00
Patrick Niklaus
44924b4bb4 Refactor view creation to own header file 2018-04-04 12:38:40 +02:00
Patrick Niklaus
3af3e06e75 Remove canary to get a consistent interface for getting a block pointer 2018-04-04 12:38:40 +02:00
Patrick Niklaus
39effb8f7e Fix checking for non-empty string in prefix check 2018-04-04 12:38:40 +02:00
Patrick Niklaus
5a68f4c214 Refactor setting up vector_view 2018-04-04 12:38:40 +02:00
Patrick Niklaus
f558b16147 First step for better vector encapsulation 2018-04-04 12:38:40 +02:00
Patrick Niklaus
4c2d578561 Fix unit-test compilation due to broken readGraph 2018-04-04 12:38:40 +02:00
Patrick Niklaus
81a4747acb Fix formating 2018-04-04 12:38:40 +02:00
Patrick Niklaus
9fc2c32408 Fix errors when loading an incompatible dataset. 2018-04-04 12:38:40 +02:00
Patrick Niklaus
24e0028afb Remove CheckCompability because it now duplicates logic in the datafacade 2018-04-04 12:38:40 +02:00
Patrick Niklaus
c334d11e95 Refactor metric storage 2018-04-04 12:38:40 +02:00
Patrick Niklaus
aec9b6a178 Fixed reading DataLayout from shared memory 2018-04-04 12:38:40 +02:00
Patrick Niklaus
81929c984b Use boost array sink to avoid copying buffer for BufferReader 2018-04-04 12:38:40 +02:00
Patrick Niklaus
5395290fd5 Add directory listing 2018-04-04 12:38:40 +02:00
Patrick Niklaus
b3ef2a0383 More refactor 2018-04-04 12:38:40 +02:00
Patrick Niklaus
9e97748700 Add datalayout tests 2018-04-04 12:38:40 +02:00
Patrick Niklaus
4a9fdca7b2 Remove fixed block identifiers 2018-04-04 12:38:40 +02:00
Daniel Patterson
f3b7ab92ff Fix typo. 2018-04-04 12:24:09 +02:00
Daniel Patterson
eae9e7fab6 Only listen on 127.0.0.1 (unless overriden by environment) during test runs by default. 2018-04-04 12:24:09 +02:00
Daniel Patterson
649d4ee512
Add support for the 'straight' maneuver direction (#4995)
Add support for the 'straight' maneuver direction
2018-04-03 17:20:18 -07:00
Daniel Patterson
b5a4ffed96
Return datasource names along with datasource annotation (#4973)
* Add new `datasource_names` annotation that returns the string version of the `datasources` annotation
2018-04-03 15:13:25 -07:00
Duane Gearhart
8a63ad9b4b
Added post process logic to collapse segregated turn instructions (#4925)
* Added post process logic to collapse segregated turn instructions

* format updates

* Fixed coordinates to reflect reality
Updated left turn road name

* fixed coordinates to fix test

* Skip last step when processing segregated steps

* updated segregated turn test

* Updated segregated test

* Updated test: Segregated Intersection, Cross Belonging to Correct Street - features/guidance/collapse.feature:79

* Fixed all but one for features/guidance/collapse.feature:124

* Fixed Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second - features/guidance/collapse.feature:219

* Fixed 7 of th 9 failures for Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second - features/guidance/collapse.feature:219

* Fixed 7 of the 9 failures for Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles (2) - features/guidance/collapse.feature:318

* Fixed Scenario: Segregated Intersection into Slight Turn - features/guidance/collapse.feature:581

* Updated Scenario: U-turn after a traffic light - features/guidance/turn-lanes.feature:1220

* Updated how we combine segregated steps

* Added test to Verify end of road left turn across divided roads

* Fixed divided highwat tests

* Fixed test failure

* fixed Scenario: Partitioned turn, Slight Curve - maxspeed - features/guidance/turn-lanes.feature:936

* Fixed Scenario: Partitioned turn, Slight Curve - features/guidance/turn-lanes.feature:961

* Added strategies to combine segrgated intersections

* Added setModifier alias for readability

* Added strategies to combine segrgated intersections

* Format updates

* Fixes segregated indentification to not mark `circular` edge as segregated

* Added intersection prior to turn so we still call out end of road

* updated expectation to be turn instead of continue

* Confirmed with @oxidase that the lane information if correct - updated the expectation

* Added logic to handle wider straights
Fixed tests

* Update CHANGELOG.md

Added #4925

* Removed TODO

* Process straight step prior to wider straight step
2018-03-30 07:43:56 -04:00
karenzshea
0d9f18fe1f add microtar to executables 2018-03-27 20:50:34 +02:00
Patrick Niklaus
2690dd0621
Merge pull request #4960 from Project-OSRM/refactor/tar_files
Use tar-format to encapsulate data
2018-03-27 14:34:08 +02:00
Patrick Niklaus
4ef331db1f Use read-only mmap as member in StaticRTree 2018-03-27 10:20:33 +00:00
Michael Krasnyk
e572d6c340
msvc fixes 2018-03-26 21:45:27 -04:00
Patrick Niklaus
0c48f5fe2f Make sure to return const char* paths for mtar 2018-03-26 13:13:17 +00:00
Patrick Niklaus
3ee8a963cb Fix formating again 2018-03-26 12:13:07 +00:00
Patrick Niklaus
c322d93435 Make the block size of vector<bool> consistent 2018-03-26 12:12:41 +00:00
Patrick Niklaus
c0dd5d7c76 Fix formating 2018-03-26 11:02:34 +00:00
Patrick Niklaus
993f5badf1 Use OSRM runtime error for tar reader as well 2018-03-26 11:02:34 +00:00
Patrick Niklaus
a542da3678 Remove old io::FileWrite serialization code 2018-03-26 11:02:34 +00:00
Patrick Niklaus
f1a392c4df Fix test include path 2018-03-26 11:02:33 +00:00
Patrick Niklaus
f2bace6c1f Wrap lambda in std::function because of boost version issues 2018-03-26 11:02:33 +00:00
Patrick Niklaus
921235b2dc Use pair instead of tuple for implicit construction 2018-03-26 11:02:33 +00:00
Patrick Niklaus
bde51a9ef5 Add tar file mmaping 2018-03-26 11:02:33 +00:00
Patrick Niklaus
a52213c885 Get offset of data inside tar file 2018-03-26 11:02:33 +00:00
Patrick Niklaus
8e800c48bc Add function to stop and continue writing to a tar file 2018-03-26 11:02:33 +00:00
Patrick Niklaus
e25654c210 MICROTAR: Patch microtar to allow reading from files we are writing to. 2018-03-26 11:02:33 +00:00
Patrick Niklaus
ee447afd72 Fix DealloctingVector from initializer list constructor
It was not setting the number of elements.
2018-03-26 11:02:33 +00:00
Patrick Niklaus
c410c200bd Port .cnbg file to tar format 2018-03-26 11:02:33 +00:00
Patrick Niklaus
8152dcfb4c Port .ramIndex to tar file and mmap .fileIndex directly 2018-03-26 11:02:33 +00:00
Patrick Niklaus
86ffce3a50 Fix missing removal of timestamp in offline facade 2018-03-26 11:02:33 +00:00
Patrick Niklaus
bed53f5fd5 Remove timestamp file 2018-03-26 11:02:31 +00:00
Patrick Niklaus
2b010fc6f3 Port .enw file to tar format 2018-03-26 11:02:04 +00:00
Patrick Niklaus
b8260e44fa Port .names file to tar 2018-03-26 11:02:04 +00:00
Patrick Niklaus
a594008e57 Port .edges file to tar 2018-03-26 11:02:04 +00:00
Patrick Niklaus
f407afa694 Move .osrm file to tar format 2018-03-26 11:02:04 +00:00
Patrick Niklaus
06f28ffd34 Add BufferWriter/BufferReader and simplify interface for ConditionalRestrictions 2018-03-26 11:02:04 +00:00
Patrick Niklaus
4f454a3761 Add buffer reader/writer for per-element serialization 2018-03-26 11:02:04 +00:00
Patrick Niklaus
d4300e73f3 Remove line reading interface from FileReader 2018-03-26 11:02:04 +00:00
Patrick Niklaus
990e411361 Port turn duration penalties to tar 2018-03-26 11:02:04 +00:00
Patrick Niklaus
73b3d37837 Port maneuver overrides to tar 2018-03-26 11:02:04 +00:00
Patrick Niklaus
5d7d5fceba Port .tld and .tls data 2018-03-26 11:02:04 +00:00
Patrick Niklaus
b1dfbce675 Port .ebg_nodes to tar file 2018-03-26 11:02:04 +00:00
Patrick Niklaus
da5aebaef3 Port .geometry file to tar format 2018-03-26 11:02:04 +00:00
Patrick Niklaus
bced9a5a6d Port .datasource_names to tar format 2018-03-26 11:02:04 +00:00
Patrick Niklaus
2c5e4e6c02 Add test cases for range table and packed vector serialization 2018-03-26 11:02:04 +00:00
Patrick Niklaus
6ea296fb5c Port .nbg_nodes file to tar 2018-03-26 11:02:04 +00:00
Patrick Niklaus
cf5f6be472 Swtich EBG to tar file 2018-03-26 11:02:04 +00:00
Patrick Niklaus
c61198b26b Port over profile properties 2018-03-26 11:02:04 +00:00
Patrick Niklaus
5d1b4ce71d Port .osrm.icd file over to tar 2018-03-26 11:02:03 +00:00
Patrick Niklaus
c664d0392a Add test cases for int and unsigned vector for tar 2018-03-26 11:02:03 +00:00
Patrick Niklaus
aaf39162a8 Fix vector<bool> serialization for tar files and add unit tests 2018-03-26 11:02:03 +00:00
Patrick Niklaus
cb31f9ec29 Port hsgr file to tar 2018-03-26 11:02:03 +00:00
Patrick Niklaus
fed77c4066 Port cell metrics to tar files 2018-03-26 11:02:03 +00:00
Patrick Niklaus
6a09d2aa9b Remove file size checks from compability logic 2018-03-26 11:02:03 +00:00
Patrick Niklaus
15b53de056 Switch over partition/ files to tar format 2018-03-26 11:02:03 +00:00
Patrick Niklaus
6d96a9a2e3 Serialize mldgr using the new tar writer 2018-03-26 11:02:03 +00:00
Patrick Niklaus
653f647fee Use static alignment for DataLayout 2018-03-26 11:02:03 +00:00
Patrick Niklaus
f7b7335d75 Write/read tar for mldgr 2018-03-26 11:02:03 +00:00
Patrick Niklaus
495131efd7 Add vector serialization 2018-03-26 11:02:03 +00:00
Patrick Niklaus
2eb633bc41 Add unit tests for tar reading 2018-03-26 11:02:03 +00:00
Patrick Niklaus
86bfe1ede1 First step towards reading/writing tar 2018-03-26 11:02:03 +00:00
Patrick Niklaus
c04e1b2ded Merge commit '098d77c658fa846aff55a35c0ad42955e9f736ee' as 'third_party/microtar' 2018-03-26 11:01:50 +00:00
Patrick Niklaus
098d77c658 Squashed 'third_party/microtar/' content from commit 956791770
git-subtree-dir: third_party/microtar
git-subtree-split: 956791770defa4d06696b30db276e88a09ad3538
2018-03-26 11:01:50 +00:00
Patrick Niklaus
385bba4949 Add microtar to dependencies 2018-03-26 10:59:55 +00:00
Duane Gearhart
bc980e72bf Update CHANGELOG.md
Updated #4968: Updated segregated intersection identification
2018-03-23 11:41:52 +01:00
Duane Gearhart
535bb49893 Fixed segregated identification code to not mark circular edges as segregated 2018-03-21 18:02:26 +01:00
Michael Krasnyk
b56a7579a8 Review updates 2018-03-20 16:33:15 +01:00
Michael Krasnyk
8b52c6c7ac Update tests expectations and obvious detection 2018-03-20 16:33:15 +01:00
Michael Krasnyk
d166fc6a75 Restructure Obvious Turn Handling, code transfer from #4426 2018-03-20 16:33:15 +01:00
Huyen Chau Nguyen
bdb116afe5
Fix wrong one-way identification in the bike profile
* upgrade to api version 4

* set bike pushing speed to 4km/h and add mode change penalty

* set cycleways for two-way and one-way roads according correctly

* add changelog

* adjust tests according to change of the walking speed

* adjust tests according to new behaviour of opposite, track and lane in one-ways

* refactor the cycleway identification

* comment to understand weird counterintuitive testcase

* adjust sliproad test because walking speed is now slower
2018-03-19 16:02:25 +01:00
Michael Krasnyk
873e766d2e Add Github releases step 2018-03-18 15:27:11 +01:00
Huyen Chau Nguyen
a84277f246 add tests in left-side-countries 2018-03-18 14:30:40 +01:00
Patrick Niklaus
b80764b6b8 Refactor shared memory layout to expose Block as interface 2018-03-14 17:05:55 +01:00
Frédéric Rodrigo
14082d0e00 Fix typo 'Maximum number of classes if' 2018-03-14 03:16:13 +01:00
Daniel Patterson
f7775f5e0b
Add source phantom weight to first segment when merging legs (#4949)
Fix annotation values for annotations on edges where phantom nodes are snapped.
2018-03-13 11:31:29 -07:00
Michael Krasnyk
b7af6eb2a4 Remove correctly the last segment in annotation 2018-03-09 15:59:21 +01:00
Daniel Patterson
a4ee2ccb13 Avoid copying json::Value objects a lot when reallocating vector 2018-03-08 16:01:16 +01:00
Manuel Martin
c61acaf8be Add documentation about OSM node ids in nearest service response 2018-03-06 16:10:22 +01:00
Michael Krasnyk
0fc8b6289c Merge IntersectionShapeData and IntersectionEdgeGeometry 2018-03-05 13:19:57 +01:00
Michael Krasnyk
0f93a7dd05 Cleanup EBGF code 2018-03-05 13:19:57 +01:00
Michael Krasnyk
4d0fb89489 Adjust Straight direction modifiers of side roads in driveway handler 2018-03-05 13:19:57 +01:00
Michael Krasnyk
6f4af330ed Handle oneways in get_forward_backward_by_key 2018-03-05 13:19:57 +01:00
Michael Krasnyk
7c8c25f7bc Don't use obviousness for links bifurcations 2018-03-05 13:19:57 +01:00
Michael Krasnyk
cf56b5ddbf Increase precision of coordinates in OSM links 2018-03-05 13:19:57 +01:00
Lev Dragunov
ac23e3b223 clang-format 2018-03-01 11:32:18 +01:00
Lev Dragunov
7922a6172a Bearing calculation on matching short segments fix. 2018-03-01 11:32:18 +01:00
Daniel Patterson
e34f2db4db Get OSRM_VERSION_* fields from package.json so we don't have to change things in two places.
No longer need to update CMakeLists.txt version field manually.
2018-03-01 12:05:00 +11:00
Daniel Patterson
5df33e5b90 Make alternative routes tests stable by only being single-threaded 2018-03-01 12:03:18 +11:00
karenzshea
db608559f6 avoid testing self-intersecting way 2018-02-28 15:21:47 +01:00
Michael Krasnyk
c048a36a4c Use smaller range for U-turn angles in map-matching 2018-02-28 15:21:47 +01:00
Duane Gearhart
33021d37a1 Updated segregated intersection identification (#4845)
* Initial internal intersection updates
paired with @oxidase and @kdiluca
TODO fix tests and add in new ones

* Added Internal Intersection Model

* removed debug info

* updates per PR 4845

* fixing build errors

* fixing all compile errors

* fixed EdgeID param

* Added is_internal_straight lambda
Added/Updated constexpr names and values

* added rejection case turn degree logic

* debug logging

* added turn angle logic to reject if there are incoming edges that have opposite turn degrees than outgoing edges or if the outgoing edges have opposing turn degrees; also merged with master v5.16

* fixed formatting

* fix to decrease tile size based on latest turn angle internal intersection updates

* Removed breaks

Breaks in code were a mistake and caused a change in the internal intersection identification.

* Update segregated_intersection_classification.cpp

* Update CHANGELOG.md

Added CHANGED #4845: Updated segregated intersection identification to Unreleased
2018-02-27 15:11:23 -05:00
Patrick Niklaus
31d6d74f90 Update documentation and changelog 2018-02-26 23:32:34 +01:00
Patrick Niklaus
bec57258a4 Add mmap allocator 2018-02-26 23:32:34 +01:00
Karen Shea
43f0723b73 Remove deduplication of unpacked_path_segments in MM collapsing (#4911)
* remove deduplication of unpacked_path_segments
2018-02-24 12:42:11 +11:00
Huyen Chau Nguyen
9b74a47c91 build osx binary for node4 and bump to RC 2 2018-02-24 11:42:08 +11:00
Huyen Chau Nguyen
993a36ea20 update master changelog after version release 2018-02-24 11:42:08 +11:00
Huyen Chau Nguyen
8b5af24eb8
add 5.15.2 to changelog (#4910) 2018-02-23 14:41:02 +01:00
Thomas Brüggemann
5c9a7a0152 Fixed the order of lon/lat in osrm.route() example 2018-02-22 23:41:54 +01:00
Michael Krasnyk
83588fd00f Renumber node IDs in .osrm.maneuver_overrides 2018-02-22 11:42:33 +01:00
Michael Krasnyk
5acf660f37 Check required tags of maneuver relations 2018-02-21 14:49:15 +01:00
Michael Krasnyk
de13834c12 Handle motorway forks with links as a normal motorway ...
passing some ramps or mering onto another motorway
2018-02-21 14:19:53 +01:00
Michael Krasnyk
49811e1f46 Test case for a highway fork with a link 2018-02-21 14:19:53 +01:00
Mateusz Loskot
8788b0fae8 Add .editorconfig file
Propose basic settings for controlling EOL encoding and
space-only indentation of CMake and other scripts.
2018-02-20 16:16:26 +01:00
Michael Krasnyk
1cafafc4cd Don't use obvious directions at ramp bifurcations, #4895 2018-02-20 09:02:24 +01:00
Michael Krasnyk
e2c1956aa5 Test for a ramp bifurcation obviousness 2018-02-20 09:02:24 +01:00
Huyen Chau Nguyen
a8bc2cf8a7
update package.json (#4889) 2018-02-15 16:14:18 +01:00
Huyen Chau Nguyen
975ede4bec
Update package.json
add mkdirp and rimraf to bundledependencies in order for node-pre-gyp to properly install with node
2018-02-15 14:34:35 +01:00
Mateusz Loskot
faff2c774d [msvc] Fix quoting of OSRM_PROJECT_DIR as preprocessor define
It looks MSVC still special handling, no quotoing as well as
additional quoting like add_definitions(-DFOO="\\"foo\\"")
as per https://cmake.org/pipermail/cmake/2007-June/014611.html
does not seem to handle CMake variables correctly.

This Visual C++ specific fix is based on this solution
https://cmake.org/pipermail/cmake/2006-September/011292.html
2018-02-14 13:54:54 +01:00
Mateusz Loskot
d8e3b03ec1 Ignore CMakeSettings.json for CMake integration with VS2017
CMakeSettings.json is an auxiliary file used to customize
CMake configuration while building from within VS2017.

[ci skip]
2018-02-14 13:30:32 +01:00
Mateusz Loskot
ae41066fbe Prefer logical punctuators instead of named operator keywords
Some compilers (eg. MSVC) still require inclusion of <ciso646>
in order to import named operator keywords.
It is easier to stick with traditional punctuators.
2018-02-14 13:26:41 +01:00
Fred-Byrd
342da81591 web_mercator to double 2018-02-13 12:54:52 +01:00
Fred-Byrd
df9195b939 coordinate_calculation doubles 2018-02-13 12:54:52 +01:00
Michael Krasnyk
519eae63c6 Use links with lower priority in the motorway handler
Ref:
https://wiki.openstreetmap.org/wiki/Highway_link
https://wiki.openstreetmap.org/wiki/Link_roads_between_different_highways_types
2018-02-13 11:20:27 +01:00
Michael Krasnyk
5f598da76d Add OSM node barrier=height_restrictor handling 2018-02-12 11:40:35 +01:00
Patrick Niklaus
0da2029d2d Remove publishing binary artefacts on Windows. 2018-02-09 21:18:39 +01:00
Patrick Niklaus
e82b51d0cb Fix default value for matching radius in routed 2018-02-09 21:12:14 +01:00
Daniel Patterson
5531cace7f
Support maneuver relations (#4676) 2018-02-10 05:32:09 +11:00
Patrick Niklaus
1aed13500d Remove GCC 4.9 support. Minimum is now 5.0. 2018-02-09 17:51:58 +01:00
Patrick Niklaus
f6db8ff3b0 Disabel missing initialization warning on GCC 4.9 2018-02-09 17:51:58 +01:00
Patrick Niklaus
26e5c4eae2 Fix formating 2018-02-09 17:51:58 +01:00
Patrick Niklaus
bee3bdb576 Don't throw errors on -Wmaybe-uninitialized because of false-positives 2018-02-09 17:51:58 +01:00
Patrick Niklaus
b96d36f482 Try initializing all of ProfileProperties for GCC 4.9 2018-02-09 17:51:58 +01:00
Patrick Niklaus
d13d6566f8 Fix infinite recursion warning 2018-02-09 17:51:58 +01:00
Patrick Niklaus
aa1048154c Add missing initializer around sub-object 2018-02-09 17:51:58 +01:00
Patrick Niklaus
6c2d26f9bd Make LUA_SOURCE a global for gcc 4.9 2018-02-09 17:51:58 +01:00
Patrick Niklaus
84845ffaa6 Replace optional<EdgeWeight> with constant value 2018-02-09 17:51:58 +01:00
Patrick Niklaus
f65958fc14 Disable error on -unused-local-typedef for clang since it has false positives 2018-02-09 17:51:58 +01:00
Patrick Niklaus
3d6b667997 No unused warning for alias benchmark 2018-02-09 17:51:58 +01:00
Patrick Niklaus
97d027a173 Fix unused lambda capture warnings 2018-02-09 17:51:58 +01:00
Patrick Niklaus
f48dd665ad Fix error due to GLIBC workaround warning 2018-02-09 17:51:58 +01:00
Patrick Niklaus
eb1e83858a Use BOOST_CHECK instead of BOOST_ASSERT to make tests work in release mode 2018-02-09 17:51:58 +01:00
Patrick Niklaus
371dc57dfc Fix uninitialized warning because of boost::optional 2018-02-09 17:51:58 +01:00
Patrick Niklaus
425a46fe78 Fix warnings in unit tests 2018-02-09 17:51:58 +01:00
Patrick Niklaus
fa553659de Turn all warnings to errors for GCC and Clang 2018-02-09 17:51:58 +01:00
Patrick Niklaus
03cffd0f56 Ignore unused-variable warnings cause by V8 header
This can be removed after https://github.com/cjntaylor/node-cmake/pull/37
is merged and released.
2018-02-09 17:51:58 +01:00
Patrick Niklaus
a06d1782c0 Fix multi-line warning 2018-02-09 17:51:58 +01:00
Karen Shea
05f6b55036
Expose waypoints parameter in match interface (#4859)
* expose waypoints parameter in match interface

* Sync target_traversed_in_reverse with target_phantom
2018-02-07 17:33:54 -05:00
Huyen Chau Nguyen
fa8d788bb6
Add road priority class to turn function (#4858)
* expose road priority class to turn function

* update docs
2018-02-07 11:39:02 +01:00
Patrick Niklaus
92b7d581ce Removed unused geojson logging in partitioner 2018-02-06 11:51:33 +01:00
Patrick Niklaus
19651c3d91 Remove unused shapefile/gdal dependencies 2018-02-06 11:51:33 +01:00
Patrick Niklaus
b4cfc8d6e0 Fix formating 2018-02-06 11:51:33 +01:00
Patrick Niklaus
71cfb03738 Remove broken check-conditionals tool 2018-02-06 11:51:33 +01:00
Patrick Niklaus
e7bb612050 Move debug printer code to own header 2018-02-06 11:51:33 +01:00
Patrick Niklaus
83d7a57b73 Remove OSM link debug printing from public class 2018-02-06 11:51:33 +01:00
Patrick Niklaus
cac310123b Remove debug printing code from Rectangle 2018-02-06 11:51:33 +01:00
Patrick Niklaus
bb71d9b28a Remove unused code in partitioner 2018-02-06 11:51:33 +01:00
Kushan Joshi
ea4d0fa1dd Update README.md
This PR makes the path of host `.osm.pbf` file clearer.
2018-02-06 01:07:09 +01:00
karenzshea
91561992a7 update changelog for 5.15.1 2018-02-05 12:21:49 -05:00
Patrick Niklaus
a3ea825a11 Add build job for GCC 6 2018-02-05 13:07:09 +01:00
Patrick Niklaus
7ebbd5cebe Upgrade version of compilers and node on Travis CI
We now build using GCC 7 and Clang 5 and only build
binaries for node 8.x and 4.x.
2018-02-05 13:07:09 +01:00
Michael Krasnyk
9e93f198ae Add CRC checksums to EBG and turns data 2018-02-02 11:33:38 -05:00
Michael Krasnyk
10de243556 Move guidance turn generation out of EBGF 2018-02-02 11:33:38 -05:00
Michael Krasnyk
988b6e3311 Split intersection analysis and guidance code
Intersection analysis occupy in osrm::extractor::intersection namespace
and guidance code osrm::guidance
2018-02-02 11:33:38 -05:00
Michael Krasnyk
36877e4de5 Move guidance pre-processing code into GUIDANCE library 2018-02-02 11:33:38 -05:00
Michael Krasnyk
1794185d43 Refine logging output 2018-02-02 11:33:38 -05:00
Kajari Ghosh
de938df560 remove TurnData from generate_edge function 2018-02-02 11:33:38 -05:00
Kajari Ghosh
e02c5c3c6d comments 2018-02-02 11:33:38 -05:00
Michael Krasnyk
90ff725125 Duplicate edges and turns generation code 2018-02-02 11:33:38 -05:00
Michael Krasnyk
1cbfbd34cf Remove unnecessary loading of turns data in updater 2018-02-02 11:33:38 -05:00
Mateusz Loskot
c6d12e064c Add basic facades for Customizer and Partitioner run methods 2018-02-02 15:52:30 +01:00
Mateusz Loskot
30ed1fae99 Move setting up task_scheduler_init from executables to library
Make entry points of individual pipeline stages responsible for
configuring the task scheduler with requested number of threads
passed in corresponding configuration bundle (ie. follow extractor).
2018-02-02 14:34:20 +01:00
Alain ANDRE
2987292cc0 Add support for non-numerical units in car profile for maxheight #4763 2018-02-02 11:07:43 +01:00
Mateusz Loskot
8114104a43 Rename namespace partition to partitioner
Rename module partition to partitioner.
This cultivates naming used in existing modules like extractor,
customizer, etc. - noun vs verb (word partition is both though).
2018-02-02 11:07:18 +01:00
Patrick Niklaus
03f598b93d [skip ci] Update PR template 2018-02-01 12:06:50 +00:00
Alain ANDRE
5a844f4b7d Addition of left-hand drive countries 2018-02-01 12:48:12 +01:00
Michael Krasnyk
91e6d68604 Increase MAXIMAL_ALLOWED_SEPARATION_WIDTH to 12 meters
the check should cover merging of roads at intersections similar
to https://www.openstreetmap.org/node/53020993#map=18/37.86590/-122.25083
2018-02-01 06:21:08 -05:00
Michael Krasnyk
1119a542d6 Announce reference change if names are empty, #4830 2018-01-29 16:32:59 -05:00
Michael Krasnyk
d706696179 Test case for ref changes with empty names, #4830 2018-01-29 16:32:59 -05:00
Karen Shea
c154875272
Only run step collapsing based on original waypoints parameter (#4829) 2018-01-29 12:35:55 -08:00
Michael Krasnyk
77f8a4f741 Set type of trivial intersections where classes change to Suppressed
... instead of NoTurn
2018-01-25 11:43:44 -05:00
Huyen Chau Nguyen
61e06fcaba
Making the turn function more flexible (#4789)
* set and store highway and access classification for the turn function
* expose highway turn classification and access turn classification and speed to the lua profile turn function
* expose whether connection road at turn is incoming or outgoing
* add lua tests for exposed information to turn function
* update docs about attributes in process_turn
* add turn_classification info to docs
* adding warning if uturn and intersection dont match
* handle u turns that do not turn into intersection[0]
* split OSM link generation in an accessible coordinate function
2018-01-24 15:39:55 -05:00
Kajari Ghosh
13bb997525 Revert "Get actual paths for every entry in a matrix."
This reverts commit 350bc6f756.
2018-01-24 11:52:43 -05:00
Kajari Ghosh
350bc6f756 Get actual paths for every entry in a matrix. 2018-01-24 11:30:26 -05:00
karenzshea
02712cd513 Allow restricted access on highway=service roads for the car profile
We still backlist `access=private` for the car profile though.
2018-01-23 17:40:18 +01:00
Michael Krasnyk
a9d94d35a2 [skip ci] Bump OSRM version to 5.16 2018-01-22 17:24:07 +01:00
Kajari Ghosh
155772f01f
Refactor isThroughStreet/Intersection options (#4751)
* refactor isThroughStreet 
* refactor HaveIdenticalName
* fix a typo in the unit tests
2018-01-19 13:49:00 -05:00
Michael Krasnyk
341a5345da Ignore no_*_on_red turn restrictions (#4804) 2018-01-19 15:50:54 +01:00
Kajari Ghosh
72de59ac91
add tunnel as a class in lua (#4812) 2018-01-19 09:47:27 -05:00
Michael Krasnyk
a7f1cd36fb Fix formatting 2018-01-19 13:55:05 +01:00
Michael Krasnyk
26f0b4dc77 Add assertion and adjust unit test expectations check 2018-01-19 13:55:05 +01:00
karenzshea
181eff29c7 add unit test for split submatch waypoints indices 2018-01-19 13:55:05 +01:00
karenzshea
cdad265d49 only adjust waypoint index in tracepoints when waypoints parameter is specified 2018-01-19 13:55:05 +01:00
Patrick Niklaus
6eb4247484 Fix overflow on zero duration segments, fixes #4283.
As a form of smoothing we use the previous speed value instead.
This makes sense because the zero duration segments have to be very
short, potentially also zero length.
2018-01-18 17:29:23 +01:00
Huyen Chau Nguyen
72a23645a8
Remove "can't parse value" log messages (#4810)
* remove log output of measure.lua
* remove unneccessary return
* quick fix of #4794
2018-01-18 17:27:45 +01:00
Raphael Dumas
c3e06356d6 Provide more detail on docker commands
Helps with #4253 #4095 #4510
2018-01-17 17:37:50 +01:00
Marcel Radischat
7a8390e68e Move description to first row of table 2018-01-17 17:35:29 +01:00
Patrick Niklaus
168e313f73 Correctly mark edges going to/from core with exclude flags 2018-01-11 12:46:49 +00:00
Patrick Niklaus
30f910e861 Add regression test from @fijemax 2018-01-11 12:46:49 +00:00
Huyen Chau Nguyen
e998c1193d
Update docs for process_turn in the profile docs (#4786)
* update correct attributes available in process turn

* make travel mode in ExtractedTurn const

* fix mismatch of struct and class
2018-01-10 11:31:24 +01:00
Michael Krasnyk
a8f3474996 Use unsigned type in percent_encoding to prevent overflow for %80..%ff
Related fix in Boost.Spirit 80414bc688
2018-01-08 12:09:33 +00:00
karenzshea
55cc06fd8b Add waypoints parameter to matching service, returns map matching result
with selective input coordinates as waypoints
2018-01-08 12:28:20 +01:00
Karen Shea
8883d8cc56
Update http.md 2018-01-08 12:21:41 +01:00
Mateusz Loskot
5b2af6ef09 Restore use of user-provided osmium:🧵:Pool instance
Pool instance has been removed from Reader ctor parameters
list in PR #4438, presumably unintentionally.
It is required to prevent potential deadlock during
Pool shutdown as explained in PR #4452.
2018-01-07 18:29:43 +01:00
Patrick Niklaus
6d801e7086 Bumped version to latest.4 2018-01-05 17:35:11 +01:00
Michael Krasnyk
17eb7052ba Make distance_between_roads symmetrical 2018-01-05 17:35:11 +01:00
Michael Krasnyk
330f25eddb Reduce extraction distance to 120 meters
For intersection at https://www.openstreetmap.org/node/65299217
`are_parallel` in MergableRoadDetector::HaveSameDirection is false
for South Van Ness Avenue with 150 meters
2018-01-05 17:35:11 +01:00
Michael Krasnyk
08b88bad63 Still use low precision bearings 2018-01-05 17:35:11 +01:00
Michael Krasnyk
153f9b02a5 Add low precision intersection views back 2018-01-05 17:35:11 +01:00
Michael Krasnyk
0568dca4a3 Adjust to review findings 2018-01-05 17:35:11 +01:00
Michael Krasnyk
60ef179d18 Remove handling of U-turns on motorways 2018-01-05 17:35:11 +01:00
Michael Krasnyk
c64904f5ea Move roads re-ordering to convertToIntersectionView 2018-01-05 17:35:11 +01:00
Michael Krasnyk
4b9e3a8068 Remove IntersectionGenerator 2018-01-05 17:35:11 +01:00
Michael Krasnyk
db7c76d04d Remove GetConnectedRoads from IntersectionGenerator 2018-01-05 17:35:11 +01:00
Michael Krasnyk
cc1a5ea78d Remove usage of IntersectionGenerator in EBGF 2018-01-05 17:35:11 +01:00
Michael Krasnyk
9c033ff461 Free functions for guidance intersections analysis 2018-01-05 17:35:11 +01:00
Michael Krasnyk
3c3322173c Allow to specify empty bearings string in input parameters 2018-01-05 17:35:11 +01:00
Michael Krasnyk
e805f85407 Print statistics only for allowed turns 2018-01-05 17:35:11 +01:00
Michael Krasnyk
4d54456f66 Don't fail if a registered printer has no name 2018-01-05 17:35:11 +01:00
Daniel J. Hofmann
7359d0542f Updates readme link for demo server wiki page, closes #4773 2018-01-05 15:19:33 +01:00
Mateusz Loskot
da4fb13aa3 Tidy up #include-s for Intel TBB headers
Remove unused and add missing headers.
2018-01-05 11:00:31 +01:00
Michael Krasnyk
3649ab4d31 Use default maxspeed value for ua:urban 2018-01-02 20:43:42 +01:00
Michael Krasnyk
9e9e3fb1e4 Change default urban speed in Ukraine to 50kmh
From 1/1/2018 60kmh speed limit changed to 50kmh
http://zakon3.rada.gov.ua/laws/show/883-2017-%D0%BF
2018-01-02 15:34:05 +01:00
Darafei Praliaskouski
e73aa01725 Belarus speed limits (#4764)
* Belarus speed limits

https://en.wikipedia.org/wiki/Speed_limits_in_Belarus

* taginfo.json update

* Update CHANGELOG.md
2018-01-02 14:49:36 +01:00
Michael Krasnyk
a5353c7179 Use consistent EBG node weights in duplicated via nodes 2018-01-02 14:26:35 +01:00
Michael Krasnyk
a5e0d7011b Update CHANGELOG entry 2017-12-26 16:18:27 +01:00
Michael Krasnyk
742c32d936 Don't use to_string conversion in requiresNameAnnounced 2017-12-26 16:18:27 +01:00
Michael Krasnyk
3dec680058 Remove check unnamed check in sliproad handler 2017-12-26 16:18:27 +01:00
Michael Krasnyk
9237430be2 Test for sliproads to roads with empty names 2017-12-26 16:18:27 +01:00
Patrick Niklaus
12d1d84b11 Add test case for sliproads converted from forks 2017-12-26 16:18:27 +01:00
Patrick Niklaus
6dd029e6ea Restore original intend of roundabout test
When doing the new Lua version refactor we changed the expectation to
use `continue uturn` instead of making a whole circle in the roundabout
as the original test case. This was only the shortest path since there
was no roundabout penalty.
2017-12-26 13:28:12 +00:00
Patrick Niklaus
e45d44cb8e Make sure we only count turns as UTurns for the turn_function 2017-12-26 13:28:12 +00:00
Kajari Ghosh
84b6ef4340
add osrm-routed and node-osrm flags to configure mapmatching radius limit (#4721) 2017-12-20 16:53:43 +05:30
Frédéric Rodrigo
5af776d963 Car Profile. Route by supporting physical limitation of height and weight 2017-12-19 13:51:33 +00:00
Frédéric Rodrigo
ddf11cc2cc Profile: stronger unit parsing 2017-12-19 13:51:33 +00:00
Denis Koronchik
c7b1d0c131 Add support of maxweight in profiles 2017-12-19 13:51:33 +00:00
Denis Koronchik
423a4ef326 Add maxheight/maxwidth support into profiles 2017-12-19 13:51:33 +00:00
Patrick Niklaus
ccfbce5300 Remove superflous sentinel in DynamicGraph, fixes #4738 2017-12-18 10:23:29 +00:00
Marcel Radischat
b99d3a0a69 Avoid all highways listed in the avoid set
Even though the speeds are defined for a certain road class, routing should
be avoided as it is listed in the `avoid set`.
2017-12-16 23:45:04 +00:00
Marcel Radischat
659b470320 Add failing test
The avoid set should take precedence over the speed limits.
2017-12-16 23:45:04 +00:00
karenzshea
9a8ed30e95 add assert for untested sliproad cases, removed redundant empty_nameid checks 2017-12-11 15:37:56 +00:00
karenzshea
4166b1ebbf check for empty on string_ref, rather than string itself 2017-12-11 15:37:56 +00:00
karenzshea
89080fb2b0 check for empty name_id before getting data 2017-12-11 15:37:56 +00:00
karenzshea
56459d37d1 access way names through RouteStep in post processing 2017-12-11 15:37:56 +00:00
karenzshea
d5232d5f5c check empty name string in roundabout handler 2017-12-11 15:37:56 +00:00
karenzshea
3f7b5da683 check empty name string in turn collapsing 2017-12-11 15:37:56 +00:00
karenzshea
24562acd30 check empty name string in turn handler 2017-12-11 15:37:56 +00:00
karenzshea
8bce061691 check empty name string in sliproad handler 2017-12-11 15:37:56 +00:00
karenzshea
701c5f853d check empty name string in motorway handler 2017-12-11 15:37:56 +00:00
karenzshea
d1e4ba373a check empty string name in mergable road detector 2017-12-11 15:37:56 +00:00
karenzshea
8cf8f0d7d6 check empty name string in findBasicTurnType 2017-12-11 15:37:56 +00:00
Daniel J. Hofmann
978350c388 Adds cucumber test for continue not taking ref into account when name is empty 2017-12-11 15:37:56 +00:00
Patrick Niklaus
2e97c78181 Remove code for checking the .core file, since we do not create it anymore 2017-12-08 11:28:34 +00:00
Minh Nguyễn
979ec7fa78
Merge pull request #4726 from Project-OSRM/1ec5-pronunciation-doc
Clarify pronunciation property
2017-12-07 11:02:46 -08:00
Minh Nguyễn
1d7f179374
Clarified pronunciation property 2017-12-06 13:13:17 -08:00
Patrick Niklaus
994fae0ef6 Fix formating 2017-12-05 19:09:06 +00:00
Patrick Niklaus
88ee51ba2e const-correctness 2017-12-05 19:09:06 +00:00
Patrick Niklaus
25ee26de3b Refactor segregated intersection classification to right module 2017-12-05 19:09:06 +00:00
Daniel Patterson
353829a4cc
This test now passes, including in the test suite. (#4712) 2017-11-29 13:16:07 -08:00
Michael Krasnyk
6fd0b56e32 Don't use removed alternative paths in filterPackedPathsByCellSharing 2017-11-29 13:17:24 +01:00
Daniel Patterson
c1efefae27
Use the correct driving_side property on the arrive step. (#4708)
Use the correct driving_side property on the arrive step.
2017-11-27 13:16:33 -08:00
Daniel Patterson
0c96f093ff Add Macau and Hong Kong to the left-side driving polygon file. 2017-11-27 11:43:34 -08:00
Daniel Patterson
6f835d57b4 Add checkbox for changelogs to all PRs. 2017-11-27 10:30:46 -08:00
Daniel J. Hofmann
e1e53d274b Makes MLD default algorithm in example to avoid confusion, see #4702 2017-11-27 12:12:49 +01:00
brian lewis
d9a03f8365 Refer to Lua scripting language by its correct name 2017-11-27 12:10:49 +01:00
brian lewis
ce5f284ec6 Fix typos in profiles documentation 2017-11-27 12:10:49 +01:00
Daniel Patterson
02a2d25a3f
Reset versions/changelog for next release - 5.14 work happens on the 5.14 release branch. 2017-11-22 12:37:34 -08:00
Daniel Patterson
9fca6987c9
Update CHANGELOG for 5.14 release prep 2017-11-22 12:34:03 -08:00
Michael Krasnyk
7361558c19 Allow single edge paths in MLD alternatives, #4691 2017-11-21 12:28:44 +01:00
karenzshea
834890cf0b construct extract/contract configs to disable conditional restriction parsing by default 2017-11-20 16:55:17 +00:00
vng
a53794f864 Code review fixes. 2017-11-16 15:08:30 +01:00
vng
8fa98ed27d Increase max segregated distances. 2017-11-16 15:08:30 +01:00
vng
111030864c Use segregated flag as a bit in EdgeBasedNode. 2017-11-16 15:08:30 +01:00
vng
90e361c3dc Use immutable node-based-graph for segregated edges. 2017-11-16 15:08:30 +01:00
vng
32e6ccb037 Code review fixes. 2017-11-16 15:08:30 +01:00
vng
258fcd8626 Fixed test tile test according to new algorithm output. 2017-11-16 15:08:30 +01:00
vng
92c4a228e1 Revert suppressSegregated routing. 2017-11-16 15:08:30 +01:00
vng
9eae1de9bc Fixes for segregated length threshold. 2017-11-16 15:08:30 +01:00
vng
76f793533a Use copressed node-based graph for segregated edges check. 2017-11-16 15:08:30 +01:00
vng
ec7e58e10e Pass edge-based node segregated flag to the post processing routine. 2017-11-16 15:08:30 +01:00
vng
ac5e095d17 Store and pass segregated flag to the data facade. 2017-11-16 15:08:30 +01:00
vng
ee7912f882 Calculating segregated node-based edges. 2017-11-16 15:08:30 +01:00
Denis Koronchik
f460a9f17e Add code to draw segregated nodes in a tile layer 2017-11-16 15:08:30 +01:00
vng
37685dae73 Added segregated test #4273. 2017-11-16 15:08:30 +01:00
Daniel Patterson
5b58445535 Expose driving_side as a property on RouteStep 2017-11-09 10:08:11 -05:00
Michael Krasnyk
5b79640b44 Don't compute new modifier for merge instructions in collapsing 2017-11-08 11:26:47 -05:00
Michael Krasnyk
921471a153 Test of merging onto a motorway with junction references 2017-11-08 11:26:47 -05:00
Daniel J. Hofmann
3a1bf2c85d Slightly decreases roundabout turn radius from 25m to 15m 2017-11-07 13:45:57 -05:00
Daniel J. Hofmann
9b83649a03 Fixes AppVeyor tests 2017-11-06 14:38:21 -05:00
Daniel J. Hofmann
2224389fb3 Filters zero value histograms, formats numbers 2017-11-06 14:38:21 -05:00
Daniel J. Hofmann
aed7bd852d Prints turn types and modifiers as strings 2017-11-06 14:38:21 -05:00
Daniel J. Hofmann
c5b48e3506 Adds a statistics handler for turn types and modifiers 2017-11-06 14:38:21 -05:00
Kajari Ghosh
73f4e1d45a update changelog 2017-11-06 13:34:02 -05:00
Kajari Ghosh
002da129c8 update tests 2017-11-06 13:34:02 -05:00
Kajari Ghosh
1b545fee8a update lua profile to use new process_turn 2017-11-06 13:34:02 -05:00
Kajari Ghosh
cbc96ec492 refactor ExtractionTurn and ProcessTurn c++ code 2017-11-06 13:34:02 -05:00
Daniel J. Hofmann
c95d845876 Adds Node 8 jobs to Travis, resolves #4657 2017-11-02 20:17:17 +00:00
Daniel Patterson
ac7705e9a0 Ensure .pc installation to the same heirarchy as the actual libraries (usually /usr/local/lib) 2017-11-01 19:40:31 +00:00
Patrick Niklaus
0b6eb85106 Fix formating 2017-11-01 14:25:07 +00:00
Moritz Kobitzsch
e197dae54d do not consider empty-names + empty-refs a valid name for u-turns 2017-11-01 14:25:07 +00:00
Moritz Kobitzsch
4bf3c97476 add test-case illustrating misuse of names in collapse 2017-11-01 14:25:07 +00:00
Daniel Patterson
19d2e82d15 Reduce docker image size to about 20MB by using a multistage build. 2017-10-31 23:35:01 -04:00
Michael Krasnyk
eb48945807 Add use of LUA_LIBRARY_DIRS, #4646 2017-10-31 23:35:01 -04:00
Patrick Niklaus
a68db86dc8 [skip ci] Bump OSRM version to 5.14 2017-10-31 16:17:07 +00:00
Daniel J. H
948025440f Clarifies docs for roundabout exits (#4640) 2017-10-26 14:44:06 -07:00
Daniel J. Hofmann
8365e20d4f Adds cardinal_directions flag to profiles and disables ref-rewriting by default 2017-10-26 20:38:41 +01:00
Denis Koronchik
0fc6903d7e Fix issue #4585 2017-10-25 14:11:33 +02:00
Moritz Kobitzsch
23fd27422b normalise angles only if an improvement 2017-10-25 10:17:14 +02:00
Moritz Kobitzsch
e965cf12f8 add testcase illustrating changes to angle adjustments 2017-10-25 10:17:14 +02:00
Michael Krasnyk
523be8f7e5 Add unclassified roads to restricted_highway_whitelist, #4631 2017-10-24 09:59:07 +02:00
Patrick Niklaus
c2a605a70d Contract the exclude-flag sub-graphs as well 2017-10-24 09:46:44 +02:00
Moritz Kobitzsch
910ee0829f make circular detection covered again 2017-10-23 09:06:59 +02:00
Moritz Kobitzsch
704cf314d4 explicitly check for 90 degree turns / turning onto segregated roads 2017-10-23 09:06:59 +02:00
Moritz Kobitzsch
b8651bfac9 do not merge segregated highways in if there is actual turns involved 2017-10-23 09:06:59 +02:00
Moritz Kobitzsch
bf28e40ba6 add further tests for segregated roads 2017-10-23 09:06:59 +02:00
Patrick Niklaus
a8de007d98 Rename locations-cache -> location-cache 2017-10-20 15:55:23 +01:00
Patrick Niklaus
4684d2e35c Add changelog entry for changed behavior 2017-10-20 15:55:23 +01:00
Patrick Niklaus
27a9603b98 Change --use-location-cache=false to --disbale-location-cache 2017-10-20 15:55:23 +01:00
Patrick Niklaus
1610ea8dee Fix tests 2017-10-20 15:55:23 +01:00
Patrick Niklaus
171ff1191f Replace use of implicit_value since that broke with boost 1.65 2017-10-20 15:55:23 +01:00
karenzshea
b5f9ba63d5 add code of conduct 2017-10-20 15:55:05 +01:00
Daniel J. Hofmann
a3c0f6a4e2 Adds exception for barrier=lift_gate (bike, walk), resolves #4490 2017-10-19 15:27:35 +01:00
David Audrain
963c042b2a Run scripts/format.sh 2017-10-19 15:26:37 +01:00
David Audrain
1be7dedda7 Set missing OSM Node ID to zero instead of SPECIAL NODE ID 2017-10-19 15:26:37 +01:00
David Audrain
493a9a1cb2 Add 'to' and 'from' OSM Node Ids in the result of nearest webservice. #2548 2017-10-19 15:26:37 +01:00
Denis Koronchik
e1149bd4b7 Review fixes 2017-10-19 15:18:25 +01:00
Denis Koronchik
895f072425 Work on forward/backward ref's support 2017-10-19 15:18:25 +01:00
Moritz Kobitzsch
37774a331a fix collapsing into uturns, that aren't u-turns 2017-10-17 15:08:29 +01:00
Moritz Kobitzsch
8719821363 test-case illustrating changes to collapsing 2017-10-17 15:08:29 +01:00
Patrick Niklaus
0cc4c4380a Fix wrong corefactor warning, fixes #4615 2017-10-17 14:02:10 +00:00
Denis Koronchik
553310fb31 Fix gcc5 compilation error 2017-10-17 14:51:39 +01:00
Patrick Niklaus
404c275101 Add a specilization for contraction without exclude flags
This saves about 10% overhead and avoids contraction changes
to previous releases.
2017-10-17 12:09:00 +01:00
Michael Krasnyk
088d4edc6b Prevent merging of circular-shaped roads 2017-10-17 11:27:09 +02:00
Michael Krasnyk
bf03dcd1e6 Test case of merging roundabout-like intersections 2017-10-17 11:27:09 +02:00
Patrick Niklaus
456b198702 Remove unused number of threads option again 2017-10-16 23:08:32 +02:00
Patrick Niklaus
dc81c7b926 [skip ci] Changelog polish for release 2017-10-16 13:06:09 +00:00
Patrick Niklaus
90b3be8d10 Fix formating 2017-10-16 13:40:02 +01:00
Patrick Niklaus
ba2a2ff5e8 Remove RemoveIterator because its dangerous 2017-10-16 13:40:02 +01:00
Patrick Niklaus
9b87b8b7b1 Replace deallocation vector with std::vector and different merge algorithm 2017-10-16 13:40:02 +01:00
Patrick Niklaus
69db219423 Remove unused definition in contractor 2017-10-16 13:40:02 +01:00
Denis Koronchik
17ac731772 Review fixes 2017-10-16 12:15:12 +01:00
Denis Koronchik
b6db39e69c Update documentation 2017-10-16 12:15:12 +01:00
Denis Koronchik
d22b37961f Comment some tests of cardinal directions that not supported yet 2017-10-16 12:15:12 +01:00
Denis Koronchik
f9c7e1e55e Support route relation tests 2017-10-16 12:15:12 +01:00
Denis Koronchik
4b8daac104 Fix formatting 2017-10-16 12:15:12 +01:00
Denis Koronchik
4e5f74aebe Fix after merge 2017-10-16 12:15:12 +01:00
Daniel Patterson
6b357a7783 Test cases for route relation cardinal directions. 2017-10-16 12:15:12 +01:00
Denis Koronchik
fc9a89ea8b Support some cases for supperrelations in car.lua 2017-10-16 12:15:12 +01:00
Denis Koronchik
832cdbf566 Some fixes 2017-10-16 12:15:12 +01:00
Denis Koronchik
0dfec13c0a Fix some problems 2017-10-16 12:15:12 +01:00
Denis Koronchik
a2b8698bca Restore route relations support 2017-10-16 12:15:12 +01:00
Denis Koronchik
c42e247d87 Work on relation extract refactoring to support recursive relations (superrelations) 2017-10-16 12:15:12 +01:00
Daniel Patterson
7851de9af8 Update changelog. 2017-10-16 12:15:12 +01:00
Denis Koronchik
3fd961a551 Some improvements in code 2017-10-16 12:15:12 +01:00
Denis Koronchik
3634aa9a3c Add test for route relation process in car.lua. Some fixes 2017-10-16 12:15:12 +01:00
Denis Koronchik
a05e9c4932 Fix bug with simple refs support (not lists) 2017-10-16 12:15:12 +01:00
Denis Koronchik
5fd77aebb5 Add route relation support for multi ref's 2017-10-16 12:15:12 +01:00
Denis Koronchik
9a660e3c18 Implement route relation parse in car.lua 2017-10-16 12:15:12 +01:00
Michael Krasnyk
1d4c5b2e4d Remove prefix v in pkg-config version string 2017-10-16 10:25:17 +01:00
vng
c718f140fa Fixed c/p typo. 2017-10-14 15:05:26 +02:00
karenzshea
1b819bfcc3 add corech deprecation to changelog 2017-10-13 14:53:49 +01:00
karenzshea
e385f6352e restore libosrm interface for corech, fallback to ch 2017-10-13 14:53:49 +01:00
karenzshea
4f3414c4cc remove core factor opt from exclude graph 2017-10-13 14:53:49 +01:00
karenzshea
df79b5b4cc deprecation notices 2017-10-13 14:53:49 +01:00
karenzshea
2d1ea7a3de template specialization 2017-10-13 14:53:49 +01:00
karenzshea
2a13f9d10b fallback to CH, when coreCH used 2017-10-13 14:53:49 +01:00
karenzshea
7cf7c46939 remove level-cache flags 2017-10-13 14:53:49 +01:00
Denis Koronchik
031ce72db1 Fix issue #4214 2017-10-12 18:00:38 +01:00
Emil Tin
fe8a2251cd add missing semicolon 2017-10-12 17:22:00 +01:00
Emil Tin
59f8330db4 update cache mechanism to handle forced profile 2017-10-12 17:22:00 +01:00
Emil Tin
999211ed9c set OSRM_PROFILE to force profile when running cuke tests 2017-10-12 17:22:00 +01:00
Daniel J. Hofmann
dba825d829 Fixes readme contract mixup 2017-10-12 17:21:35 +01:00
Daniel J. Hofmann
ee6e7dab3b Removes stxxl from installation instruction in readme 2017-10-12 17:21:35 +01:00
Daniel J. Hofmann
2a51ce131b Removes duplicate pipeline explanation from readme 2017-10-12 17:21:35 +01:00
Daniel J. Hofmann
7ce3ffd3cc Explains the MLD pipeline in the readme 2017-10-12 17:21:35 +01:00
Michael Krasnyk
40d9aec71f Show MLD cell IDs via node ID text background color 2017-10-12 14:27:55 +01:00
Michael Krasnyk
d405331447 Increase coverage of MLD many-to-many code 2017-10-12 14:27:55 +01:00
Michael Krasnyk
e781e06a17 Use -O0 optimization level for coverage builds 2017-10-12 14:27:55 +01:00
Michael Krasnyk
33742532f6 Run lcov before uploading to codecov 2017-10-12 14:27:55 +01:00
Michael Krasnyk
f2fbe16979 Use for M*n (m*N) tables queries forward (backward) MLD search 2017-10-11 16:28:16 +01:00
Michael Krasnyk
5af05631c2 Suppress relaxation of edges on the top level during backward steps 2017-10-11 16:28:16 +01:00
Michael Krasnyk
8300a6c57e Prepare phantom nodes indices in ManyToManySearch search 2017-10-11 16:28:16 +01:00
Michael Krasnyk
29d4bca9ba Split algorithm-specific manyToMany implementations 2017-10-11 16:28:16 +01:00
Moritz Kobitzsch
fd52c80573 remove workaround, reduce memory consumption in lcs computation 2017-10-11 14:07:35 +02:00
Moritz Kobitzsch
74e1d1c27a fix pedantic warning about additional ; 2017-10-11 14:07:35 +02:00
Moritz Kobitzsch
884ce4025b fix detection of suffix/prefix changes for name-changes 2017-10-11 14:07:35 +02:00
Moritz Kobitzsch
2ddd98ee6d simplify passing annotation data through OSRM pipeline using the node-based datastore
- separates node-based graph creation and compression from edge-based graph creation
 - moves usage of edge-based node data-container to pre-processing as well, unifying access to node-based data
 - single struct instead of separate vectors for annotation data in engine (single place of modification)
2017-10-09 18:44:43 +02:00
Frédéric Rodrigo
9b044aaa42 Add literal maxspeed value for NO, PL and ZA on maxspeed_table in car profile 2017-10-09 15:48:14 +01:00
Frédéric Rodrigo
fe88d7fcd1 Sort maxspeed_table in car profile 2017-10-09 15:48:14 +01:00
karenzshea
7923fdcaef error when mld files or data are missing, compability -> compatibility 2017-10-09 16:36:38 +02:00
Michael Krasnyk
837dba2191 Don't use sliproad scenario if two name announcements are required 2017-10-09 15:35:26 +01:00
Michael Krasnyk
a7ea6e5327 Allow a single intersection in a cross-road of sliproads, #4348/3 2017-10-09 15:35:26 +01:00
Michael Krasnyk
38ab22ee7c Sliproad case with a single intersection in a cross-road 2017-10-09 15:35:26 +01:00
Michael Krasnyk
7f8e467523 Adjust lower bound for crossroad angle in sliproads handler, #4348/2 2017-10-09 15:35:26 +01:00
Michael Krasnyk
fbb2970044 Merge unused 3 bits of PhantomNode into bearing
to prevent memcheck  reports
==23434== Use of uninitialised value of size 8
==23434==    at 0x15CAFB5: boost::archive::iterators::detail::from_6_bit<char>::operator()(char) const (base64_from_binary.hpp:50)
==23434==    by 0x15CB6BE: boost::iterators::transform_iterator<boost::archive::iterators::detail::from_6_bit<char>, boost::archive::iterators::transform_width<char const*, 6, 8, char>, boost::iterators::use_default, boost::iterators::use_default>::dereference() const (transform_iterator.hpp:126)
==23434==    by 0x15CB6CE: boost::iterators::transform_iterator<boost::archive::iterators::detail::from_6_bit<char>, boost::archive::iterators::transform_width<char const*, 6, 8, char>, boost::iterators::use_default, boost::iterators::use_default>::reference boost::iterators::iterator_core_access::dereference<boost::iterators::transform_iterator<boost::archive::iterators::detail::from_6_bit<char>, boost::archive::iterators::transform_width<char const*, 6, 8, char>, boost::iterators::use_default, boost::iterators::use_default> >(boost::iterators::transform_iterator<boost::archive::iterators::detail::from_6_bit<char>, boost::archive::iterators::transform_width<char const*, 6, 8, char>, boost::iterators::use_default, boost::iterators::use_default> const&) (iterator_facade.hpp:550)
==23434==    by 0x15CB6E2: boost::iterators::detail::iterator_facade_base<boost::iterators::transform_iterator<boost::archive::iterators::detail::from_6_bit<char>, boost::archive::iterators::transform_width<char const*, 6, 8, char>, boost::iterators::use_default, boost::iterators::use_default>, char, boost::iterators::single_pass_traversal_tag, char, long, false, false>::operator*() const (iterator_facade.hpp:656)
==23434==    by 0x15CB7F4: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char> >(boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, std::input_iterator_tag) (basic_string.tcc:190)
==23434==    by 0x15CB89F: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char> >(boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, std::__false_type) (basic_string.h:196)
==23434==    by 0x15CB91B: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char> >(boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>) (basic_string.h:215)
==23434==    by 0x15CB9AA: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, void>(boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, boost::archive::iterators::base64_from_binary<boost::archive::iterators::transform_width<char const*, 6, 8, char>, char>, std::allocator<char> const&) (basic_string.h:552)
==23434==    by 0x15CBB0F: osrm::engine::encodeBase64[abi:cxx11](unsigned char const*, unsigned long) (base64.hpp:65)
==23434==    by 0x15CBC01: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > osrm::engine::encodeBase64Bytewise<osrm::engine::Hint>(osrm::engine::Hint const&) (base64.hpp:94)
==23434==    by 0x15CBC45: osrm::engine::Hint::ToBase64[abi:cxx11]() const (hint.cpp:30)
==23434==    by 0x16596DC: osrm::engine::api::json::makeWaypoint(osrm::util::Coordinate, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, osrm::engine::Hint const&) (json_factory.cpp:359)
2017-10-09 15:31:59 +01:00
Patrick Niklaus
d23a5fcfc4 Update package-lock and yarn.lock 2017-10-05 17:14:17 +01:00
Patrick Niklaus
db83b186cf Bump version number post-release 2017-10-05 17:14:17 +01:00
Daniel Patterson
7d9b17fd41 Build against libstdc++-4.9 and supress one libstdc++ symbol so that we can run inside
old environments (CentOS, AWS Linux, AWS Lambda, etc)
2017-10-05 17:13:40 +01:00
Michael Krasnyk
a900f5229e Fix case for sliproads from link via link to primary, #4348/4 2017-10-04 23:23:55 +02:00
Michael Krasnyk
de72a8adb6 Test case for sliproads from link via link to primary, #4348/4 2017-10-04 23:23:55 +02:00
Michael Krasnyk
5010084fb0 [skip ci] Update CHANGELOG.md 2017-10-04 15:02:03 +02:00
Michael Krasnyk
11e7b6e911 Add last location memoization in Lua context 2017-10-04 10:03:42 +02:00
Michael Krasnyk
545097cf06 Don't use location cache if not needed 2017-10-04 10:03:42 +02:00
Michael Krasnyk
476bc347b4 Allow multiple GeoJSON files with locations data 2017-10-04 10:03:42 +02:00
Michael Krasnyk
095b345713 Change location data method to way:get_location_tags(key) 2017-10-04 10:03:42 +02:00
Michael Krasnyk
0f498d13f5 Access to location dependent data in Lua via way:get_location_tags() 2017-10-04 10:03:42 +02:00
Michael Krasnyk
2059f7234a Restructure ParseOSMData method 2017-10-04 10:03:42 +02:00
Michael Krasnyk
12b2242ad5 Add osmium locations cache 2017-10-04 10:03:42 +02:00
Michael Krasnyk
fec2b602a2 Bump api_version to 3 in car.lua 2017-10-04 10:03:42 +02:00
Michael Krasnyk
a7c1967ca0 Use correct bounding box
For some reason
envelop = make_inverse<box_t>();
boost::geometry::expand(envelop, next);
normalizes longitude to [-180,180]
2017-10-04 10:03:42 +02:00
Michael Krasnyk
20ff138f08 Remove polygon copying overhead 2017-10-04 10:03:42 +02:00
Michael Krasnyk
421115200b Port osmium point-in-polygon function 2017-10-04 10:03:42 +02:00
Michael Krasnyk
b15288e0ea Add location_dependent_data unit tests 2017-10-04 10:03:42 +02:00
Michael Krasnyk
4eac861eae Left-hand driving flag review updates 2017-10-04 10:03:42 +02:00
Michael Krasnyk
7ad9e13f1e Add MultiPolygon support 2017-10-04 10:03:42 +02:00
Michael Krasnyk
fc39e0ce1a Allow multiple GeoJSON files 2017-10-04 10:03:42 +02:00
Michael Krasnyk
fb02a4c674 Added bit packing for serialization of vector<bool> 2017-10-04 10:03:42 +02:00
Michael Krasnyk
6468f55627 Make class_names default initialized 2017-10-04 10:03:42 +02:00
Michael Krasnyk
f40b7975f2 Change from rtree.q{begin,end} to rtree.query (Boost 1.55 support) 2017-10-04 10:03:42 +02:00
Michael Krasnyk
55a38c9e01 Add tests to check local side-dependent turn bias 2017-10-04 10:03:42 +02:00
Michael Krasnyk
3c399e5c28 Propagate is_left_hand_driving from profile to data facade 2017-10-04 10:03:42 +02:00
Michael Krasnyk
fca00fa09e Added approaches tests for left-hand driving 2017-10-04 10:03:42 +02:00
Michael Krasnyk
de942155bf Add local left_hand_driving flag in API version 2 2017-10-04 10:03:42 +02:00
Michael Krasnyk
af3f0a4782 Use driving_side tag of location-dependent data and OSM ways 2017-10-04 10:03:42 +02:00
Michael Krasnyk
c9673741de Added location dependent data 2017-10-04 10:03:42 +02:00
Michael Krasnyk
9a482ff828 Show better error messages in options tests 2017-10-04 10:03:42 +02:00
Michael Krasnyk
020c17d19a Remove unused packed path weights in MLD alternatives 2017-10-03 13:09:46 +02:00
Michael Krasnyk
d0936dc7fd Don't force loops in MLD
Related commit 0972ec9115
2017-10-03 12:56:50 +02:00
Michael Krasnyk
708b47938d Enable MLD alternatives tests 2017-10-03 12:56:50 +02:00
Jack Danger
79d07ef45c Updating year on all 'Project OSRM' copyrights 2017-10-03 12:03:26 +02:00
Jack Danger
5d33a387e0 Update LICENSE to 2017 and fix typo in filename 2017-10-03 12:03:26 +02:00
Frédéric Rodrigo
b3b6e16940 Fix check_taginfo.py test for maxspeed tag in lower case 2017-09-30 22:16:51 +02:00
Frédéric Rodrigo
f9fb0b84a8 Fix case of maxspeed tag values into taginfo.json 2017-09-30 22:16:51 +02:00
Frédéric Rodrigo
83acb46390 Add missing maxspeed tags into taginfo.json 2017-09-30 22:16:51 +02:00
Frédéric Rodrigo
f36b3fb4bc Add to car profile missing BE:motorway maxspeed_table exceptions osm-fr/osmose-backend#232 2017-09-30 22:16:51 +02:00
Michael Krasnyk
e7be271c43 Optimize MLD one-to-many getNodeQueryLevel 2017-09-29 13:38:52 +02:00
Michael Krasnyk
790b574114 unordered_multimap compilation fixes 2017-09-29 13:38:52 +02:00
Michael Krasnyk
b3f59ab92c Move duplicated code into insert_node lambda 2017-09-29 13:38:52 +02:00
Michael Krasnyk
f2333eb31a Break tie for equal weights but different durations
There is no possibility until multiple-weights are implemented
to break tie in the contraction and the direct shortest path plugin
as duration is not computed during contraction.

This must be fixed after multiple-weights implementation
by using `std::tie(weight, duration)` pairs everywhere.
2017-09-29 13:38:52 +02:00
Michael Krasnyk
a862e5fb3a Implement one-to-many unidirectional MLD search 2017-09-29 13:38:52 +02:00
Michael Krasnyk
2715e5758b Split MLD many-to-many method 2017-09-29 13:38:52 +02:00
Michael Krasnyk
454487dd41 Refactor to reuse relaxOutgoingEdges in many-to-many plugin 2017-09-29 13:38:52 +02:00
Michael Krasnyk
2ed4f6eb0c Add suppression of libtbb memory leaks checking 2017-09-28 12:35:27 +02:00
Daniel J. Hofmann
d7bcafcb59 Uses parsed len(turn:lanes) to fixup number of lanes, resolves #4472 2017-09-28 00:24:14 +02:00
Marcel Radischat
c37a8ddd83 Update README.md with Docker+Node.js example 2017-09-26 09:16:59 +02:00
Michael Krasnyk
fc3f96abcb Use pkg-config to find lua in non-standard locations 2017-09-26 09:03:57 +02:00
Michael Krasnyk
c37ea441fc Bump osrm-deps package version 2017-09-25 12:26:47 +02:00
Michael Krasnyk
fa1a4e8bf6 Relax strict bearings ordering condition to non-strict one, #4331 2017-09-18 21:33:00 +02:00
Michael Krasnyk
2532d56b85 Turn angle calculation needs to respect initial road order, #4331 2017-09-18 21:33:00 +02:00
Michael Krasnyk
00fd869224 Test for turn angle calculation the initial road order breaking, #4331 2017-09-18 21:33:00 +02:00
Michael Krasnyk
5661726e2e Add feature tests for distance weights in foot and bicycle profiles 2017-09-18 16:40:51 +02:00
Michael Krasnyk
cfa5d7e172 Add support of distance in foot and bicycle profiles 2017-09-18 16:40:51 +02:00
Michael Krasnyk
fd7791a0e2 Fix gcc5 compilation
Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77786
2017-09-15 16:29:40 +02:00
Michael Krasnyk
e32b8bae00 Make unbuffered log verbosity aware 2017-09-15 15:01:17 +02:00
Michael Krasnyk
966139cde9 Adjust number of threads in osrm-routed 2017-09-15 10:55:13 +02:00
Michael Krasnyk
ee19383f4d Link TBB task_scheduler lifetime with Engine scope 2017-09-15 10:55:13 +02:00
Michael Krasnyk
172a8bdcdb Parallelize ManyToMany plugin 2017-09-15 10:55:13 +02:00
Michael Krasnyk
543048efcc Remove std::unordered_map<NodeID, std::vector<NodeBucket>> 2017-09-15 10:55:13 +02:00
Michael Krasnyk
67c85ffa4c Restructure manyToManySearch for parallelization 2017-09-15 10:55:13 +02:00
Michael Krasnyk
c065335882 [skip ci] Moved support relations entry in change log 2017-09-14 20:00:05 +02:00
Michael Krasnyk
f6313fcbfb Bump CMake version to 3.9.2 2017-09-14 20:00:05 +02:00
Michael Krasnyk
6a3ea876b5 Fix EOL value in libosmium opl script 2017-09-14 20:00:05 +02:00
Michael Krasnyk
64ad308e9d Small ProcessElements refactoring 2017-09-14 20:00:05 +02:00
Michael Krasnyk
94169a20de Remove RelationsContainerWrap 2017-09-14 20:00:05 +02:00
Michael Krasnyk
5ca38eee3a Remove RelationMemberWrap and avoid data copying 2017-09-14 20:00:05 +02:00
Michael Krasnyk
f4f65f62ee Remove Lua 5.1 support 2017-09-14 20:00:05 +02:00
Michael Krasnyk
f89ada7f61 Remove ExtractionRelationData wraper 2017-09-14 20:00:05 +02:00
Denis Koronchik
ff3b398e23 Review fixes 2017-09-14 20:00:05 +02:00
Denis Koronchik
84cb7865ab Fix different compilers support 2017-09-14 20:00:05 +02:00
Denis Koronchik
75bdf114be Review fixes 2017-09-14 20:00:05 +02:00
Denis Koronchik
c2fd64d3cc Apply clang format 2017-09-14 20:00:05 +02:00
Denis Koronchik
580c5e39ae Fix some tests and add new ones 2017-09-14 20:00:05 +02:00
Denis Koronchik
8da6281dcd Update LUA profiles documentation 2017-09-14 20:00:05 +02:00
Denis Koronchik
f79bcc6b8d Pass relation data to way and node functions 2017-09-14 20:00:05 +02:00
Denis Koronchik
f2b63ba0aa LUA binding for a relation processing 2017-09-14 20:00:05 +02:00
Denis Koronchik
a253111cbe Add ExtractionRelation class 2017-09-14 20:00:05 +02:00
Michael Krasnyk
a5776288f6 Add dk:rural to taginfo.json 2017-09-14 08:03:18 +02:00
Mateusz Loskot
dbcf4cab16 Replace GCC/clang option -std=C++1y with -std=C++14 2017-09-13 13:01:23 +02:00
Frédéric Rodrigo
4ea3f33376 Add to car profile missing DK:rural maxspeed_table exceptions osm-fr/osmose-backend#174 (#4488) 2017-09-08 11:36:06 -07:00
Daniel Patterson
e4cdfb50cd
Reset changelog for new release cycle. 2017-09-07 22:16:10 -07:00
Moritz Kobitzsch
c2dc7e9cd0 use enter + exit for roundabout instructions (#4358)
* Expose roundabout/rotary exit instructions as a new instruction type.
2017-09-05 12:30:34 -07:00
Daniel Patterson
0fc1aa2711 Adds turn instructions to the turns layer in debug tiles. (#4460)
Add turn types and modifiers to turn points in debug tiles.  Also refactor some of the tile code to reduce some repetition.
2017-09-01 15:08:22 -07:00
Patrick Niklaus
89cf6d9e74 Disable alternative loop test since it does not test consistent behavior 2017-09-01 21:26:00 +02:00
Patrick Niklaus
61c430c098 Implement exclude flags on CH using shared core
The core is fully contracted for each exclude flag
and stored in a merged graph data structure.
2017-09-01 21:26:00 +02:00
Patrick Niklaus
4b75cb8b0e Make DynamicGraph copyable 2017-09-01 21:26:00 +02:00
Patrick Niklaus
53f87c08b5 Rename GraphView -> BisectionGraphView to avoid name conflicts 2017-09-01 21:26:00 +02:00
Patrick Niklaus
e23dc8977f Refactor contract to be a stateless function 2017-09-01 21:26:00 +02:00
Patrick Niklaus
421dc5b6ec Don't return edge list in contractor but modify graph in-place 2017-09-01 21:26:00 +02:00
Patrick Niklaus
247f1c120f Make renumbering transparent to contraction 2017-09-01 21:26:00 +02:00
Patrick Niklaus
e011c60e12 Replace flush in contract with in-place renumbering 2017-09-01 21:26:00 +02:00
Patrick Niklaus
26c909b64b Refactor contractor to pass in graph directly 2017-09-01 21:26:00 +02:00
Daniel Patterson
acb7916996 Add test case with valid junk.
Use eps to explicitly match empty string and not consume input
2017-09-01 08:34:58 -07:00
Daniel Patterson
40b5045a0a Update CHANGELOG 2017-09-01 08:34:58 -07:00
Daniel Patterson
b17f40862c If traffic CSV has an empty 4th column, preserve the weight on an edge while updating the duration. 2017-09-01 08:34:58 -07:00
Lev Dragunov
7702ebde61 Test fixes 2017-08-31 11:11:05 +02:00
Lev Dragunov
6951eadc18 CI fix 2017-08-31 11:11:05 +02:00
Lev Dragunov
cf2573157f clang-format with older version 2017-08-31 11:11:05 +02:00
Lev Dragunov
80c55119d2 Add bearing for the phantom node 2017-08-31 11:11:05 +02:00
Mateusz Loskot
7323221e3b Add --verbosity,-l command line option
Allow to fine-control logging verbosity via command line
and LogPolicy setting (useful when OSRM used as library).

Closes #4299
2017-08-31 00:35:23 +02:00
Mateusz Loskot
fb5bd818d9 CanMergeRoad missed test of rhs instance of IntersectionShapeData
Avoids identical sub-expressions road_target(lhs) == intersection_node
2017-08-31 00:34:28 +02:00
Mateusz Loskot
43a4e8db12 Use user-provided osmium:🧵:Pool instance
Advantages:
* Allows to use Pool configured with user-preferred number of threads.
* If libosmium used in a shared library, this helps to prevent potential
  deadlock during Pool shutdown at (after) shared library unloading.

See https://github.com/osmcode/libosmium/pull/214

Requires libosmium 2.13.0
2017-08-31 00:34:09 +02:00
Mateusz Loskot
302390696e Remove repeated sub-expression for TurnType::Suppressed test 2017-08-31 00:33:00 +02:00
Michael Krasnyk
2508629d6c Minor fixes in Timezoner 2017-08-30 19:44:52 +02:00
Patrick Niklaus
90c390d7a6 Merge pull request #4455 from mloskot/ml/fix-short-options
Remove superfluous hyphen from short form of --version in tests
2017-08-30 18:30:45 +02:00
Patrick Niklaus
28178b12c7 Merge pull request #4456 from Project-OSRM/update/libosmium
Update libosmium to 2.13
2017-08-30 18:30:25 +02:00
Patrick Niklaus
6eb4f090f9 Squashed 'third_party/libosmium/' content from commit ce865381f
git-subtree-dir: third_party/libosmium
git-subtree-split: ce865381fb752323ff1e66181f5a49b7f500ffa3
2017-08-30 09:30:27 +00:00
Patrick Niklaus
95442d45aa Merge commit '6eb4f090f98f6b17a23c57768c16b7716b6c9cbd' as 'third_party/libosmium' 2017-08-30 09:30:27 +00:00
Patrick Niklaus
b4ad6588ed Remove old libosmium 2017-08-30 09:30:18 +00:00
Patrick Niklaus
56282b0e3f Bump libosmium version 2017-08-30 09:28:41 +00:00
Mateusz Loskot
2385602500 Switch to reliable non-existent handle for QueryHeap items.
Default-constructed objects of (boost::heap) handle_type are singular,
including the wrapped handle_type::iterator.
Apparently, MSVC iterator debug facilities strictly require that
one singular instance is compared to another singular instance.
It is not possible to get check-comparabe iterators of non-singular
and singular instances as owning container will always mismatch.
2017-08-30 10:59:43 +02:00
Mateusz Loskot
628a154d7f Remove superfluous hyphen from short form of --version in tests 2017-08-30 10:09:12 +02:00
Daniel J. Hofmann
efaed59b9b Whitelists scripts/node_install.sh for from-source compilation, resolves #4431 2017-08-28 19:08:36 -04:00
Daniel Patterson
bdee13dea8 We should be using the module-relative @loader_path. @executable_path is relative to the main node process binary 2017-08-25 15:30:49 -07:00
Daniel Patterson
c615910874 Don't use Travis' node environment, we create our own. 2017-08-25 13:46:29 -07:00
Daniel Patterson
9e1398c68a Enable OSX binary publishing for both NodeJS 4 and NodeJS 6 2017-08-25 13:46:29 -07:00
Denis Koronchik
af10692d2d Fix misprint in documentation 2017-08-23 17:05:24 +02:00
Denis Koronchik
e7abe37b10 Prevent linkage errors when load/write extracted graph from external app 2017-08-22 15:46:06 +02:00
Patrick Niklaus
bc8617a9f4 Fix remaining PR comments 2017-08-21 13:00:12 +02:00
Patrick Niklaus
00e243b23b Refactor CustomizeCell::RelaxNode to move level check inside function 2017-08-21 13:00:12 +02:00
Patrick Niklaus
27324d0270 Add more tests for exclude validation 2017-08-21 13:00:12 +02:00
Patrick Niklaus
0c838fb60c Fix turnbot profile 2017-08-21 13:00:12 +02:00
Patrick Niklaus
0713ef5862 Add test cases for exclude and table/match service 2017-08-21 13:00:12 +02:00
Patrick Niklaus
bee1ba8854 Fix profile docs 2017-08-21 13:00:12 +02:00
Patrick Niklaus
da252c7597 Add node binding integration 2017-08-21 13:00:12 +02:00
Patrick Niklaus
a4460abc83 Fix another manifestation of the off-by-one 2017-08-21 13:00:12 +02:00
Patrick Niklaus
261636febb Add HTTP docs 2017-08-21 13:00:12 +02:00
Patrick Niklaus
21f15f0a29 Add docs for lua profiles 2017-08-21 13:00:12 +02:00
Patrick Niklaus
bd068ff2a6 Add changelog entries for exclude flags 2017-08-21 13:00:12 +02:00
Patrick Niklaus
d09f5c0e3a Avoid -> Exclude 2017-08-21 13:00:12 +02:00
Patrick Niklaus
45140ca9f7 Fix off-by-one in avoid search 2017-08-21 13:00:12 +02:00
Patrick Niklaus
c6be2e768a Throw an error for invalid classes 2017-08-21 13:00:12 +02:00
Patrick Niklaus
6339395cba Fix clang format 2017-08-21 13:00:12 +02:00
Patrick Niklaus
bd6492bb38 Fix compilation after rebase 2017-08-21 13:00:12 +02:00
Patrick Niklaus
f93b331817 Add error handling for avoid not implemented 2017-08-21 13:00:12 +02:00
Patrick Niklaus
20e4096c4b Fix stupid vector size bug 2017-08-21 13:00:12 +02:00
Patrick Niklaus
97952a9289 Don't snap to avoided streets 2017-08-21 13:00:12 +02:00
Patrick Niklaus
960a595268 Add test for avoid flags 2017-08-21 13:00:12 +02:00
Patrick Niklaus
a3c94ef632 Avoid nodes that are disabled by an avoid flag 2017-08-21 13:00:12 +02:00
Patrick Niklaus
84fd38ac9c Add tests for avoid flags 2017-08-21 13:00:12 +02:00
Patrick Niklaus
303a8fae32 Refactor cell weights and durations to own file and allow for multiple metrics 2017-08-21 13:00:12 +02:00
Patrick Niklaus
21686ee8a9 Add datafacade factory to select avoid flags 2017-08-21 13:00:12 +02:00
Patrick Niklaus
c8b142a676 Add placeholders for up to 8 weights 2017-08-21 13:00:12 +02:00
Patrick Niklaus
58061a68c4 Add avoid parameter to the API 2017-08-21 13:00:12 +02:00
Patrick Niklaus
9c11197768 Extract avoidable combinations from profiles into ProfileProperties 2017-08-21 13:00:12 +02:00
Moritz Kobitzsch
f347efb006 detect turning onto oneways at the end of the road as non obvious 2017-08-18 16:33:11 +02:00
Moritz Kobitzsch
af8ddac2af add test-case illustrating changes to obvious turn discovery 2017-08-18 16:33:11 +02:00
Michael Krasnyk
b1358de9bb Use TBB parallel sort of CSV entries, #4418 2017-08-18 14:37:42 +02:00
Daniel Patterson
f4dc93ae66
[skip ci] Reset master versions for next release 2017-08-17 15:06:48 -07:00
Frédéric Rodrigo
20a77f6d51 Car Profile. Remove the non common use barrier=checkpoint as the right tag is military=checkpoint and does not need to be whitelisted. #4405 2017-08-17 14:27:04 +02:00
Daniel Patterson
c1ad275e71 Empty CSV entries (nodeA,nodeA) can be treated as non-fatal as long as we don't try to update any matching artificial segments. 2017-08-16 12:03:23 -07:00
Daniel J. Hofmann
6bae070091 Fixes changelog wrt. conditional via-way restrictions 2017-08-16 11:15:35 +02:00
Moritz Kobitzsch
3687b6cb4b respect difference between continue/turn on changing end-of-road 2017-08-16 09:19:15 +02:00
Moritz Kobitzsch
196ed9eb46 do not change fork directions when combining turns 2017-08-16 09:17:01 +02:00
Daniel Patterson
37c941dff3
Bump version for 5.11.0-rc.2 2017-08-15 12:14:13 -07:00
Daniel Patterson
40a428d49f
Fix changelog - binaries weren't published for 5.10 2017-08-15 12:13:20 -07:00
Daniel Patterson
48eeef2d30 Revert "Publicly expose binaries to Node.js bindings, resolves #4377"
This reverts commit 4686272f87.

Unfortunately, this doesn't work alongside `node-pre-gyp` - in fresh installs, the binary
files are not yet downloaded when npm tries to create symlinks, leading to an error.
2017-08-15 11:55:09 -07:00
Moritz Kobitzsch
c34520f3a4 add feature to test naming conventions on divided highways 2017-08-15 09:47:13 +02:00
Daniel Patterson
36db965c39
Update npm version for RC.1 2017-08-14 17:16:45 -07:00
Daniel Patterson
4e81764ce2
Update CHANGELOG for changes since 5.10 2017-08-14 17:16:05 -07:00
Michael Krasnyk
1e9f983289 Add mocked offline datafacade to engine tests 2017-08-14 16:18:36 +02:00
Michael Krasnyk
2e404c60f4 Remove references to external sources 2017-08-14 16:18:36 +02:00
vng
40857aae61 Inject offline compressed data facade with OSRM_EXTERNAL_MEMORY option. 2017-08-14 16:18:36 +02:00
vng
a64145b712 Fixed mld algorithm to use template data facade. 2017-08-14 16:18:36 +02:00
vng
945f6da85e Removed useless include. 2017-08-14 16:18:36 +02:00
vng
76d5d054cb Compilation fix. 2017-08-14 16:18:36 +02:00
Michael Krasnyk
20cfa159ec Fix boost::optional construction error 2017-08-11 17:32:35 +02:00
Daniel J. Hofmann
3ff1a4263d Adds releasing docs about bumping to latest, see #4386 2017-08-11 15:53:14 +02:00
Patrick Niklaus
3141eb5dce [skip ci] Update CONTRIBUTING.md to include correct pre-commit hook 2017-08-11 10:06:07 +00:00
Daniel J. Hofmann
75d6f59026 Publicly expose binaries to Node.js bindings, resolves #4377 2017-08-11 12:04:53 +02:00
Daniel J. Hofmann
ae42ce7017 [skip ci] Updates lockfile for latest master version 2017-08-11 12:04:53 +02:00
Moritz Kobitzsch
e9c9c87bbc adjust geojson logger to changes in extractor 2017-08-11 12:03:40 +02:00
Michael Krasnyk
8a6dba46b1 Change windows time zones in West Africa to WAT zone 2017-08-11 11:53:25 +02:00
Moritz Kobitzsch
93299d6651 handle conditional via-way restrictions
- refactor conditional restriction handling to not use external data (first OSM nodes on ways)
 - BREAKING: changes internal file format of osrm.restrictions
 - add support for general conditional penalties based on edge-based nodes (requires unique edges between nodes)
2017-08-11 11:53:25 +02:00
vng
f34320a89b Fixed getting entry bearing for maneuver. 2017-08-11 11:40:58 +02:00
Moritz Kobitzsch
a17b07bc4c fix bug in conflict resolution 2017-08-11 11:01:54 +02:00
Moritz Kobitzsch
3a01ba52ef remove a few tests that are simply testing same code paths as others 2017-08-10 12:28:31 +02:00
Mateusz Loskot
d796c66990 Prefer implicit expansion of CMake variables
Unify CMAKE_CXX_COMPILER_ID tests without quoting/bracketing
the variable to use implicit expansion.
Replace STREQUAL with MATCHES to avoid policy warning about
attempt to expand "MSVC" variable, where it literal is intended.
2017-08-10 12:26:48 +02:00
Mateusz Loskot
80b705e997 Add workaround for Visual C++ issue with std::array in debug
If Visual C++ _ITERATOR_DEBUG_LEVEL > 0, then
accessing std::array<char[N], M> elements via reference to const
causes compilation error:

...\msvc\14.10.25017\include\array(181): error C2440: 'return': cannot convert from 'const char *' to 'const char (&)[256]'

Alternative workaround is to remove const qualifier from the GetClassName method.
2017-08-10 12:21:42 +02:00
Moritz Kobitzsch
7069af3e20 explicitly use local eslint version for linting 2017-08-09 14:14:44 +02:00
Daniel J. Hofmann
209a926b45 Re-adds .npmignore, resolves #4193 2017-08-08 16:16:35 +02:00
Mateusz Loskot
71e0c7a3cf Add define WIN32_LEAN_AND_MEAN for Visual C++
Helps to avoid compiler C2011 errors due to WinSock types redefinition
from dual #include of winsock.h and winsock2.h
2017-08-08 15:50:47 +02:00
Daniel J. Hofmann
b88d96f07d [skip ci] Updates lockfiles 2017-08-08 11:37:20 +02:00
Daniel J. Hofmann
46f75c3d92 [skip ci] Bumps version to 5.11 2017-08-08 11:37:20 +02:00
Mateusz Loskot
3b8e5cec88 Ignore build directories starting with _build
Convenient to manage multiple builds with basic
naming convention (eg. _build.gcc7, _build.vs2017).

[ci skip]
2017-08-08 11:14:39 +02:00
FILLAU Jean-Maxime
a420169109 Reintroduce location for NodeRef in luabinding 2017-08-08 10:59:25 +02:00
Michael Krasnyk
a8db269fd5 Adjust lower bound for crossroad angle in sliproads handler, #4348/2 2017-08-04 14:37:13 +02:00
Michael Krasnyk
a5efcfdede Sliproads test case with acute angle at the main intersection 2017-08-04 14:37:13 +02:00
Michael Krasnyk
1ecc913fc2 Fix sliproad scenario with 4 roads in a target intersection, #4348/1 2017-08-04 14:07:35 +02:00
Michael Krasnyk
08eb3b11bc Test case for sliproad handling with 4 roads at target intersection 2017-08-04 14:07:35 +02:00
Moritz Kobitzsch
b59d9a2f27 update test-case for changed turn angles 2017-08-04 12:57:55 +02:00
Moritz Kobitzsch
e9a5e32330 fix prevention of copy elision 2017-08-04 12:57:55 +02:00
Moritz Kobitzsch
be9bdfa47e adjust constants for changed turn angle 2017-08-04 11:20:31 +02:00
Moritz Kobitzsch
153e934ed4 shift circle angle a bit 2017-08-04 11:20:31 +02:00
Michael Krasnyk
4757c96d9a Add a check for non-empty segments in CSV speed files 2017-08-04 11:19:32 +02:00
Michael Krasnyk
1efc527281 Test with a traffic update on an edge with traffic signal 2017-08-04 11:19:32 +02:00
Moritz Kobitzsch
468b59c53d add changelog entry for compression of traffic signals 2017-08-04 11:19:32 +02:00
Moritz Kobitzsch
15426975b6 deduplicate geometry 2017-08-04 11:19:32 +02:00
Moritz Kobitzsch
bbcf343e40 compress traffic signals
- handle penalties within edges (not phantom nodes)
 - changes model from providing penalties on turns to using additional segments
2017-08-04 11:19:32 +02:00
Moritz Kobitzsch
f0d3cf4e43 removing duplicated test 2017-08-04 11:19:32 +02:00
Moritz Kobitzsch
4c965b9f44 Add regression test for interaction between via-way and via-node 2017-08-03 14:37:05 +02:00
Moritz Kobitzsch
e5143247c2 move babel to dev dependencies, update releasing docs to reflect scripts in package.json 2017-08-03 14:31:41 +02:00
Daniel J. Hofmann
3a676183b2 Updates our node osrm docs and re-runs docs generation, resolves #4043 2017-08-03 14:31:41 +02:00
Daniel J. Hofmann
64265926a4 Adds babel transformation needed for node osrm docs 2017-08-03 14:31:41 +02:00
Michael Krasnyk
df2d4daad3 Fix gcc5 internal compilation error 2017-08-02 10:25:38 +02:00
Michael Krasnyk
fd0d79e17b Update pre-installed TBB version to 2017_U7 2017-08-02 10:25:38 +02:00
Moritz Kobitzsch
84ce97a31e Bump version to v5.10.0-rc.2 2017-08-01 12:30:31 +02:00
Moritz Kobitzsch
7e0c9f7340 remove accidental addition of debug code 2017-08-01 12:29:56 +02:00
Moritz Kobitzsch
917a36eaee fix pedantic warnings 2017-08-01 12:27:29 +02:00
Moritz Kobitzsch
7620d419c6 fix serialisation of conditional turn restrictions 2017-08-01 12:27:29 +02:00
Moritz Kobitzsch
50c90b29d2 parse conditional turn restriction with via way 2017-08-01 12:27:29 +02:00
Daniel Patterson
0e77cf53f6
Update CHANGELOG with bugfix notes. 2017-07-31 08:33:19 -07:00
Moritz Kobitzsch
9dfbae69cc [skip-ci] Bump version to v5.10.0-rc.1 2017-07-31 16:18:56 +02:00
Michael Krasnyk
c1ad4f6b45 Fix a single weekday grammar callback 2017-07-31 14:56:08 +02:00
Moritz Kobitzsch
8135f08958 restructure for review remarks 2017-07-31 09:36:25 +02:00
Moritz Kobitzsch
645b1ffd75 add testcases to highlight limitation of via-way handling 2017-07-31 09:36:25 +02:00
Moritz Kobitzsch
8d0202d240 Add data structure to allow identification of via-way turns during creation of edge-based-graph
initial version of handling via-way turn restrictions (this is dirty)

 - requires update of data structures
 - requires clean-up
 - requires optimisation
2017-07-31 09:36:25 +02:00
Moritz Kobitzsch
b1809d1667 pre-filter turn restrictions for validity 2017-07-31 09:36:25 +02:00
Moritz Kobitzsch
2e9a7d9c1a refactor restriction parsing / extraction to actual types
Makes turn restrictions into dedicated structures and diferentiates between them via a variant.
Ensures that we do not accidentally mess up ID types within our application.
In addition this improves the restriction performance by only parsing all edges
once at the cost of (at the time of writing) 22MB in terms of main memory usage.
2017-07-31 09:36:25 +02:00
Moritz Kobitzsch
1f7aa6f812 adding tests to highlight via-way-restriciton development 2017-07-31 09:36:25 +02:00
Patrick Niklaus
032a189440 Merge pull request #4352 from Project-OSRM/fix_reverse_datasources
Save both forward and reverse datasources.
2017-07-28 07:53:17 +00:00
Daniel Patterson
be5fc50136
Save both forward and reverse datasources. 2017-07-27 14:45:28 -07:00
Moritz Kobitzsch
0affec8f17 handle throughabouts -- do not announce going through 2017-07-26 10:37:20 +02:00
Daniel Patterson
8c9ae4d3b4 Update CHANGELOG. 2017-07-25 15:14:45 -06:00
Daniel Patterson
dac6bb27aa Don't include turn costs when calculation weight/duration/speed annotations. 2017-07-25 15:14:45 -06:00
Daniel J. Hofmann
6c0ab24100 Updates npm and yarn lockfiles 2017-07-24 13:15:15 +02:00
Michael Krasnyk
95c7832c3e Don't use STXXL library by default 2017-07-24 13:05:22 +02:00
Daniel J. Hofmann
c2e8d6160f Documents system-wide limit constructor parameters in node bindings, resolves #4317 2017-07-24 13:02:56 +02:00
Emil Tin
f609905267 fix profile debugging related to way classes 2017-07-24 13:01:32 +02:00
Daniel J. Hofmann
f7c8bac3fd Handles distinction of no-route vs invalid-route in mld alternatives
The viaroute plugin always expects a route to be there potentially
with invalid edge weight to represent no-route-found. By switching
to the many-route-result for the mld alternatives algorithm we might
return an empty many-route-result invalidating the post-condition.
2017-07-22 12:50:54 +02:00
Patrick Niklaus
58811d8f5c Merge pull request #4320 from Project-OSRM/oak-franklin-scenario
Adds lane anticipation Oak St -> Franklin St -> Fell St scenario
2017-07-22 08:08:56 +00:00
Daniel J. Hofmann
54960f9b5d Adds lane anticipation Oak St -> Franklin St -> Fell St scenario 2017-07-21 19:04:55 +02:00
Patrick Niklaus
cd45ddda13 Merge pull request #4304 from Project-OSRM/third_party/update_dependencies
Update third party dependencies
2017-07-21 00:00:44 +00:00
Patrick Niklaus
04acd2141b Use sol 2.17.5 instead 2017-07-20 22:01:54 +00:00
Michael Krasnyk
336ec4741c Update TBB mason version to 2017_U7 2017-07-20 13:49:18 +00:00
Pepijn Schoen
8da40419ee Maintain storage_config exposed API 2017-07-20 12:01:05 +02:00
Pepijn Schoen
0b5c7a97a7 Addressed comments 2017-07-20 12:01:05 +02:00
Pepijn Schoen
d9e8caf369 Use GetPath with file names over accessing member variables 2017-07-20 12:01:05 +02:00
Pepijn Schoen
e208485c17 expose mandatory / optional / output files in io_config; config files to use new io_config constructor 2017-07-20 12:01:05 +02:00
Pepijn Schoen
5a6dee80ac Fix rebase problems 2017-07-20 12:01:05 +02:00
Pepijn Schoen
67fae1d1f0 rename osrm_input_path to osrm_path, clang-format 2017-07-20 12:01:05 +02:00
Pepijn Schoen
1b31099f73 superclass extractor_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
897518a297 superclass customizer_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
a9b6686725 superclass partition_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
2c7cb5baba superclass contractor_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
29160eec9c superclass updater_config with io_config 2017-07-20 12:01:05 +02:00
Pepijn Schoen
fe00a8a0ca superclass storage_config with io_config 2017-07-20 12:01:05 +02:00
Patrick Niklaus
64574c779f [skip ci] Backport 5.9 changelog 2017-07-19 17:02:29 +00:00
Daniel J. Hofmann
64e4b7eaa0 Introduces a construction whitelist in profiles 2017-07-19 16:24:45 +00:00
Daniel J. Hofmann
48824c4c8a Normalizes spaces in profiles 2017-07-19 16:24:45 +00:00
Daniel J. Hofmann
ababeb3a69 Makes construction=minor ways routable again, see #4258 2017-07-19 16:24:45 +00:00
Mateusz Loskot
cfa2a63323 Set OSRM_BUILD_DIR based on CMake build dir
For typical local workflow, CMake can auto-configure most
of the environment, for convenience.
2017-07-19 12:57:04 +00:00
Patrick Niklaus
9418f5613a Update sol2 to v2.17.5 2017-07-18 21:11:03 +00:00
Patrick Niklaus
22a3e06e1c Merge commit 'b91c2f0299722e64a6945808d64c3397c35811d0' into third_party/update_dependencies 2017-07-18 21:08:32 +00:00
Patrick Niklaus
b91c2f0299 Squashed 'third_party/libosmium/' changes from c1f34c455..9fd2348c6
9fd2348c6 Release v2.11.3
ed708286e Fix namespace.
835df8a7f Fix multipolygon assembler.
0979ab529 Fix areas assembler algorithm.
801f84c62 Bugfix: Invalid use of iterators.
f85653820 Read OPL file correctly even if trailing newline in file missing.
a31571c0f Release v2.11.2
a3903b368 Use minimum size of 64 bytes for buffers.
b86bafefe Release v2.11.1
32ebf736c Updated change log.
632ea5198 Bugfix: Call get_creator_function() in main thread.
ddc79eee7 Add test for not correctly handled unsupported_file_format_error.
86197a14f Bugfix: Terminate called on full buffer.
4340be8ad Fix the Filter::count() method.

git-subtree-dir: third_party/libosmium
git-subtree-split: 9fd2348c6956b6e1b930b50850e99eb31207ed50
2017-07-18 21:08:32 +00:00
Patrick Niklaus
07416c7a46 Bump versions to latest releases 2017-07-18 21:08:05 +00:00
Patrick Niklaus
440dccb81b Move classes to intersection object and don't emit notifications 2017-07-18 16:48:22 +00:00
Emil Tin
e413b25cd9 profiles api v2 2017-07-18 10:09:22 +00:00
Daniel J. Hofmann
5ece65cade Trigger lane anticipation based on distance, see discussion in #4260 2017-07-18 11:23:46 +02:00
Moritz Kobitzsch
c0c9ec1c7b changelog, consistent deprecated documentation 2017-07-18 11:23:46 +02:00
Moritz Kobitzsch
f2f00b99e0 remove usage of use-lane completely 2017-07-18 11:23:46 +02:00
Moritz Kobitzsch
7b755d6f8b deprecate use-lane -- the information can be found in the intersections array 2017-07-18 11:23:46 +02:00
Daniel J. Hofmann
7d63301039 Only enables -fopenmp in case the user wants stxxl 2017-07-17 19:19:10 +02:00
Patrick Niklaus
49f0b1eb59 Add abstraction to change the data facade at compile time 2017-07-17 11:40:55 +00:00
Michael Krasnyk
b2ed46efb5 Check activation index of EntryClass and warn if activation failed 2017-07-13 22:14:41 +00:00
Daniel J. Hofmann
58b61c68a3 Exposes EngineConfig system-wide limits in Node.js bindings, resolves #4226 2017-07-13 21:48:48 +00:00
Moritz Kobitzsch
30b8225812 only consider allowed entries when continuing on motorways 2017-07-13 08:59:01 +00:00
Moritz Kobitzsch
54530a14e9 add test indicating missdetection of continuing on motorways 2017-07-13 08:59:01 +00:00
Daniel Patterson
ee8ffcf57b Include osrm-customize when doing 'make install' 2017-07-12 22:11:42 +00:00
Daniel J. Hofmann
5e9397fcca Canonicalizes all OSM string list handling in the profiles 2017-07-12 22:09:01 +00:00
Patrick Niklaus
8508834e50 Bump version to 5.10 2017-07-11 08:25:57 +00:00
Michael Krasnyk
924a8a7e38 Remove STXXL from OSM parsing and enable in CMake by default 2017-07-11 08:23:26 +00:00
Michael Krasnyk
960e9178ba Updated ChangeLog 2017-07-11 08:23:26 +00:00
Michael Krasnyk
a3257ff651 Added STXXL configuration 2017-07-11 08:23:26 +00:00
Michael Krasnyk
960f9ba29a Don't use stxxl vector in contractor 2017-07-11 08:23:26 +00:00
Michael Krasnyk
3940cc1641 Switch from stxxl::vector to std::vector in extractor 2017-07-11 08:23:26 +00:00
Michael Krasnyk
a498ba6537 Removed external_to_internal_node_id_map container 2017-07-11 08:23:26 +00:00
Daniel J. Hofmann
5b5a907023 Makes tile size checks strict, resolves #4177 2017-07-10 12:19:53 +02:00
Daniel J. Hofmann
c1cb3ebff7 Fixes Node.js bindings always enabling alternatives when using boolean overload 2017-07-10 10:44:15 +02:00
Daniel J. Hofmann
6a555a477b Discards construction and proposed ways, resolves #4230 2017-07-10 10:34:20 +02:00
Daniel J. Hofmann
175d27691d Fixes line endings, related to #4235 2017-07-10 07:26:17 +00:00
Emil Tin
5ede5577d1 avoid fuzzy ferry test 2017-07-07 16:16:13 +00:00
Emil Tin
0bfbe5ad16 handle startpoint in bicycle profile, add tests 2017-07-07 16:16:13 +00:00
Daniel J. Hofmann
54ceb05420 Implements Alternatives for MLD 2017-07-07 16:12:46 +00:00
Patrick Niklaus
fef0344be0 Don't use bool flags on ExternalMemoryNode because they blow up the struct 2017-07-07 13:24:34 +00:00
Lev Dragunov
b12fee5c0a Load graph before creating a server 2017-07-06 21:18:24 +00:00
Daniel J. Hofmann
1ef75c7a61 Bundles nan, node-cmake and node-pre-gyp for bootstrapping node-osrm, resolves #4216
Building `node-osrm` from source requires nan, node-cmake and
node-pre-gyp npm packages already \*. In order to bootstrap we
bundle these dev packages in the bundle we publish to npm.

\* See `src/nodejs/CMakeLists.txt`

Check `npm pack` - we now expect to see a `node_modules` directory
with nan, node-cmake, and node-pre-gyp already there.
2017-07-06 14:40:43 +00:00
Daniel J. Hofmann
8c5ac84f0c Lets approaches cuke test run under testbot profile, resolves #4181
🥒 🚗-> 🤖
2017-07-06 14:40:21 +00:00
Patrick Niklaus
44739f2dc3 Allow users to specify a class for each way
This adds the ability to mark ways with a user-defined
class in the profile. This class information will be included
in the response as property of the RouteStep object.
2017-07-06 09:17:49 +00:00
Patrick Niklaus
d52d530cbe Fix indentation and dead-code from c&p in cucumber to silence eslint 2017-07-05 07:57:46 +00:00
Patrick Niklaus
5fb00ff7bf [skip ci] Revert back gitattributes, was unrelated to OSX 2017-07-04 22:49:30 +00:00
Moritz Kobitzsch
4c7aa8f1c0 only consider narrow turns onto through streets straight 2017-07-04 22:03:04 +00:00
Moritz Kobitzsch
2522f70f86 add test case illustrating 4205 2017-07-04 22:03:04 +00:00
Mateusz Loskot
e47e8ed335 Add .gitattributes
Add the good default options as recommended by GitHub.
Helps to work around issues when using hybrid environments like
the Bash On Windows (see #4228).
2017-07-04 20:59:35 +00:00
Daniel J. Hofmann
2927b491c3 Updates Changelog with Exit Numbers 2017-07-04 20:58:19 +00:00
Daniel J. Hofmann
ba2a0b3566 Adds more exits cucumber scenarios 2017-07-04 20:58:19 +00:00
Moritz Kobitzsch
98caa0bcd9 adjust name-table checks for increased name table size 2017-07-04 20:58:19 +00:00
Moritz Kobitzsch
4a2a100569 add exits to unit-test initialisation 2017-07-04 20:58:19 +00:00
Moritz Kobitzsch
3073f4c0d1 don't announce something if we loose exit numbers while on the ramp 2017-07-04 20:58:19 +00:00
Daniel J. Hofmann
7d900e3b5a Implements Exit Numbers + Names (junction:ref way tag for now) 2017-07-04 20:58:19 +00:00
Patrick Niklaus
6d78c11fd2 [skip ci] Bump OSRM version to 5.9 2017-07-03 22:44:56 +00:00
Michael Krasnyk
1bee82e288 Make safety penalties graduation for primary, secondary and tertiary 2017-07-03 21:58:32 +00:00
Michael Krasnyk
a41caf0efb Adjustment of bicycle profile to review comments 2017-07-03 21:58:32 +00:00
Michael Krasnyk
a3e0eb03db Implement bicycle safety penalty 2017-07-03 21:58:32 +00:00
Patrick Niklaus
34f62b4894 Add test case for safety features on cycleways 2017-07-03 21:58:32 +00:00
Michael Krasnyk
b28077a437 Use rate rounding up to tenth in routability tests 2017-07-03 21:58:32 +00:00
Michael Krasnyk
359ab2b56e Use highest different level with source but not parent node 2017-07-03 14:57:52 +00:00
Michael Krasnyk
e42c23686b Edge case for MLD matrix plugin 2017-07-03 14:57:52 +00:00
Michael Krasnyk
d98f1a2632 Update "Multi level routing" test 2017-07-03 14:57:52 +00:00
Michael Krasnyk
aa736dbe3a Generalize directShortestPathSearch interface 2017-07-03 14:57:52 +00:00
Michael Krasnyk
3534203083 Generalize manyToManySearch and remove duplications 2017-07-03 14:57:52 +00:00
Michael Krasnyk
517cb5f094 Matrix plugin with MLD overlay 2017-07-03 14:57:52 +00:00
Michael Krasnyk
b910ab9bcb Add duration values to overlay graph 2017-07-03 14:57:52 +00:00
Michael Krasnyk
5a29e29535 Add matrix tests that checks MLD overlay 2017-07-03 14:57:52 +00:00
Michael Krasnyk
0fd71260d3 Enable ManyToManySearch in MLD 2017-07-03 14:57:52 +00:00
Michael Krasnyk
54367bfa98 Reduce memory consumption during partition 2017-07-03 14:57:52 +00:00
Michael Krasnyk
1e9806f872 Some osrm-runner fixes 2017-07-03 14:57:52 +00:00
Mateusz Loskot
1e704aa7f2 Ignore Visual Studio/Visual Studio Code related files 2017-07-03 14:42:51 +00:00
Michael Krasnyk
8a404ea850 Use correctly traffic light penalty for no_turn turns 2017-07-03 13:43:13 +02:00
Harry Wood
e2e279bc85 example curl command needs quotes
We need to add quotes around the URL in the curl command (at least in the shell
I'm using). Otherwise it truncates the URL at ';'
2017-06-30 14:04:46 +00:00
Michael Krasnyk
c914afdbf1 Fix missing-field-initializers warnings in PackedVector 2017-06-30 14:27:43 +02:00
Daniel J. Hofmann
49a057ebc0 Adds a link to Mapbox's mapping for navigation guide 2017-06-30 12:19:14 +02:00
Moritz Kobitzsch
d660c1609c don't collapse u-turns into combined turns 2017-06-30 09:25:03 +00:00
Michael Krasnyk
74bc8966a8 Test case with incorrect u-turn collapsing
http://map.project-osrm.org/?z=18&center=52.169237%2C10.032722&loc=52.168628%2C10.030759&loc=52.168707%2C10.030952&loc=52.168457%2C10.030432&hl=en&alt=0
2017-06-30 09:25:03 +00:00
Michael Krasnyk
9d8a3e3c97 Propagate lane data across traffic lights 2017-06-29 15:10:37 +00:00
Michael Krasnyk
a308b86056 Test case for #4189 2017-06-29 15:10:37 +00:00
Michael Krasnyk
1b540fe0ba Correct condition for is_going_straight_and_turns_continue 2017-06-29 15:10:37 +00:00
Michael Krasnyk
929e5a4de6 Review adjustments for driveway handler, #4151 2017-06-29 15:07:32 +00:00
Michael Krasnyk
df4f0d043a Added driveway handler 2017-06-29 15:07:32 +00:00
Michael Krasnyk
09df8d47a5 Re-enable edge-weight-updates-over-factor test 2017-06-27 13:02:53 +02:00
Michael Krasnyk
c8b75c9046 Use thread-safe lock-free assignment in PackedVector::set_value
PR uses TBB internal atomic's for atomic CAS on non-atomic data

Corresponding PR https://github.com/Project-OSRM/osrm-backend/pull/4199

Other options:

* use sequential update

* use an internal packed vector lock -> makes packed vector non-movable

* use boost.interprocess atomics implementation -> outdated and only 32 bit version

* use glib atomic's -> requires new dependency

*  wait for https://isocpp.org/blog/2014/05/n4013 as_atomic

*  use c11 _Atomic and atomic_compare_exchange_weak -> not possible to mix c++11 and c11

* use builtin functions gcc __sync_bool_compare_and_swap and msvc _InterlockedCompareExchange64 -> possible, but requires proper testing

boolean CompareAndSwapPointer(volatile * void * ptr,
                              void * new_value,
                              void * old_value) {
if defined(_MSC_VER)
   if (InterlockedCompareExchange(ptr, new_value, old_value) == old_value) return false;
   else return true;
elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
   return __sync_bool_compare_and_swap(ptr, old_value, new_value);
else
  error No implementation
endif
}

* use Boost.Atomic -> requires new dependency

        WordT local_lower_word = lower_word, new_lower_word;
        do
        {
            new_lower_word = set_lower_value<WordT, T>(local_lower_word,
                                                       lower_mask[internal_index.element],
                                                       lower_offset[internal_index.element],
                                                       value);
        } while (!boost::atomics::detail::operations<sizeof(WordT), false>::compare_exchange_weak(
            lower_word,
            local_lower_word,
            new_lower_word,
            boost::memory_order_release,
            boost::memory_order_relaxed));
2017-06-27 13:02:53 +02:00
Patrick Niklaus
dd8f5ac01d Make EMPTY_ENTRY_CLASS constexpr 2017-06-27 09:58:19 +00:00
Patrick Niklaus
22479ff5d8 Avoid dead-lock if other = this 2017-06-27 09:58:19 +00:00
Patrick Niklaus
688b1f8bef Remove serialization test 2017-06-27 09:58:19 +00:00
Patrick Niklaus
e5464526c8 Port isc file 2017-06-27 09:58:19 +00:00
Patrick Niklaus
37b8d3acd4 Refactor turn lane passing 2017-06-27 09:58:19 +00:00
Patrick Niklaus
4f13208ce8 Fix the propfile properties reading/writing 2017-06-27 09:58:19 +00:00
Michael Krasnyk
383640caaf Cleanup temporary test files 2017-06-26 11:03:32 +02:00
Michael Krasnyk
42f3401dd7 Add gdb svg printer for facade 2017-06-23 12:28:50 +02:00
Patrick Niklaus
7fb57c924f Explicitly implement move constructor for DeallocationVector 2017-06-23 09:22:30 +00:00
Patrick Niklaus
97592e5bc3 Refactor file writing in OSRM contract 2017-06-23 09:22:30 +00:00
Emil Tin
9922c0f4f7 adjust tests, cycleway allows cycling on footway 2017-06-22 14:20:42 +00:00
Emil Tin
f27434f2fb fixes #4060, incorrect cycling against oneways 2017-06-22 14:20:42 +00:00
Daniel J. Hofmann
32d39b7b49 Adds Node.js docs to readme 2017-06-22 14:02:49 +02:00
Daniel J. Hofmann
5c20c7b295 Explains what a roundtrip is in the api docs 2017-06-22 14:01:45 +02:00
Daniel J. Hofmann
df000debe9 Adapts obvious turn classification: no longer take entry_allowed into account, resolves #3987 2017-06-21 18:09:32 +02:00
Daniel J. Hofmann
31511416ed Adds a failing test case for obvious turn at the end of the road, see #3987 2017-06-21 18:09:32 +02:00
Patrick Niklaus
99b02cedfb Refactor tile tests 2017-06-19 15:59:38 +00:00
Daniel Patterson
4136bf2808 Add layer to debug tiles to expose all OSM nodes in that area. 2017-06-19 15:59:38 +00:00
Lev Dragunov
93d6fd05a9 No timestamps SIGSEV fix 2017-06-17 17:33:33 +00:00
Lev Dragunov
73c4bc1411 clang-format 2017-06-17 17:33:33 +00:00
Lev Dragunov
dc9b4bcfec Time information for maximum distance in matching 2017-06-17 17:33:33 +00:00
Daniel Patterson
e3276324b9 Include 'rate' property (reciprocal of weight) on debug tile edges. (#4162)
Include 'rate' property (reciprocal of weight) on debug tile edges and add turn weight data to debug tiles.
2017-06-15 17:50:57 +02:00
Moritz Kobitzsch
f80e5db346 add support for visualising turn penalties in MLD Debug tiles (#4157)
- template function for tile functionality with edge finder operator
 - refactors unit tests into single function (reduce code duplication)
 - adds unit tests for core-ch
2017-06-15 13:59:44 +02:00
Daniel Patterson
35550d8c0a Parallelize generation of the edge-expanded-edges. 2017-06-15 09:05:45 +00:00
Daniel J. Hofmann
b68d79407e Takes fn by forwarding ref. in for_each_pair, resolves #4148 2017-06-14 15:17:26 +00:00
Patrick Niklaus
27ed69b08f Parallize scripting on osmium::Buffer granularity
Fixes #3447 and reduces parsing time by about 15%.
2017-06-13 21:47:54 +00:00
Daniel Patterson
cd8fb82215 Add flag to allow skipping calling node function for nodes with no tags. 2017-06-13 12:23:00 +00:00
Daniel Patterson
5c8e2b6f78 Don't copy the node/way/segment/turn function objects for every call. 12-13% speedup for lua processing right there. 2017-06-13 12:23:00 +00:00
Stepan Kuzmin
9d30817294 add tests for the gaps and tidy map matching flags #4145 2017-06-12 11:32:06 +00:00
Stepan Kuzmin
5ee3c4de9f Expose Map Matching gaps and tidy parameters in Node.js bindings #4021 2017-06-12 11:32:06 +00:00
Michael Krasnyk
afbcb3d38c Don't filter out MLD tests 2017-06-10 11:05:57 +00:00
Daniel J. Hofmann
de1d5f199f Uses correct coefficients for local optimality in CH alternatives
The alpha constant is for the local optimality T-Test threshold.

Before we used epsilon for the T-Test threshold, but the epsilon
constant is meant to be used for the stretch test(s) only.

This changeset fixes the local optimality T-Test and uses the
epsilon constant for the two stretch tests:
- We test the stretch for the total route against epsilon and
- We test the detour against the epsilon now, too

We can discuss if the second stretch test should actually use
epsilon, too, or a adapted value of it - but definitly not alpha.
2017-06-09 13:20:41 +02:00
Michael Krasnyk
9158f69ea0 Failing test for alternative path 2017-06-09 13:20:41 +02:00
Daniel J. Hofmann
2cfd9c8d01 Adds npm5 lockfile 2017-06-08 21:58:09 +00:00
Daniel Patterson
5026741652 Make initialization fail with a specific exception if the dataset isn't compatible with the algorithm being used, rather than crashing when a query occurs. 2017-06-08 18:31:51 +00:00
Daniel Patterson
3d77714c36 Make most command-line tools return useful error codes on well-known exceptions. 2017-06-08 15:03:24 +00:00
Michael Krasnyk
03e83ec6a0 Fix invalid roundabout instructions for different driving modes, #4129 2017-06-08 15:01:27 +00:00
Michael Krasnyk
9315dc1c73 Test for a roundabout with footway exits, #4129 2017-06-08 15:01:27 +00:00
Patrick Niklaus
b8bb12b2e2 Merge pull request #4134 from gojuno/polyline_input
Polyline6 support for the http REST API
2017-06-08 12:05:49 +00:00
Lev Dragunov
bd1532847c Changelog entry 2017-06-07 21:46:19 +03:00
Lev Dragunov
3602b58517 Review fixes 2017-06-07 21:43:49 +03:00
Lev Dragunov
d7035291ea clang-format 2017-06-07 15:39:08 +03:00
Lev Dragunov
6b0bcb5171 Docs and tests 2017-06-07 15:24:00 +03:00
Lev Dragunov
6b8f3c7fef Polyline6 support in the REST input 2017-06-06 19:51:00 +03:00
Patrick Niklaus
0d12d2fd28 Merge pull request #4094 from Project-OSRM/refactor/rapidash
Replace timezone shapefile parsing with geojson parsing
2017-06-02 20:01:04 +00:00
Patrick Niklaus
10460fc2fb Fix PR comments 2017-06-02 18:46:21 +00:00
Patrick Niklaus
6c7f0edf50 Don't use manual extract commands in weight tests 2017-06-02 18:12:13 +00:00
Patrick Niklaus
51bf9c4ff2 Small fixes for osrm-runner 2017-06-02 18:12:13 +00:00
Patrick Niklaus
0266c9d969 Renumber nodes after running osrm-partition
The new numbering uses the partition information
to sort border nodes first to compactify storages
that need access indexed by border node ID.

We also get an optimized cache performance for free
sincr we can also recursively sort the nodes by cell ID.

This implements issue #3779.
2017-06-02 18:12:13 +00:00
Michael Krasnyk
879de346ea
Add timezone names customization in tests 2017-06-02 17:35:18 +02:00
Michael Krasnyk
50d9c4b34a
Add local time support for windows 2017-06-02 17:35:18 +02:00
Patrick Niklaus
a195d7dfd3 Remove compiler errors and use 32bit for segment_index 2017-06-02 12:15:06 +00:00
Daniel Patterson
1c3cb897c1 Refactor RTree so that .fileIndex only contains EdgeDataT, and all r-tree structure is in the .ramIndex file.
Also tunes the BRANCHING_FACTOR a bit to speed up access with this new layout.
2017-06-02 12:15:06 +00:00
karenzshea
0e39320a77 do not run conditional cuke tests by default 2017-06-02 11:15:34 +02:00
karenzshea
1b162c1962 remove rapidjson gtest dep 2017-06-02 10:26:39 +02:00
karenzshea
f497201322 add check that restrictions are off when not found in timezone polygons 2017-06-02 10:00:07 +02:00
karenzshea
65746edd2d deps and lint 2017-06-02 10:00:07 +02:00
karenzshea
91e1ac83d9 add london geojson fixture 2017-06-02 10:00:07 +02:00
karenzshea
63ea75612b by default restrictions are off if timezone is not found 2017-06-02 10:00:07 +02:00
Michael Krasnyk
f9a650792a Fix updating conditional turn restrictions 2017-06-02 10:00:07 +02:00
karenzshea
564a29141e add testing geojson files 2017-06-02 10:00:07 +02:00
karenzshea
c937d20e48 unit tests for geojson validation 2017-06-02 10:00:07 +02:00
karenzshea
ca353eb7db refactor timezoner a bit for unit tests, add initial unit tests 2017-06-02 10:00:07 +02:00
karenzshea
f268163ea0 remove shapefile dependency from build 2017-06-02 10:00:07 +02:00
karenzshea
6f41e3faf1 fixes to get compiling 2017-06-02 10:00:07 +02:00
karenzshea
aed2c0124a rapidjson steppin in 2017-06-02 10:00:07 +02:00
Michael Krasnyk
f5564c9275 Merge commit '632ce270fa23d00e969877e983da6bc7cbaf1458' as 'third_party/rapidjson' 2017-06-02 09:35:53 +02:00
Michael Krasnyk
632ce270fa Squashed 'third_party/rapidjson/' content from commit f54b0e47a
git-subtree-dir: third_party/rapidjson
git-subtree-split: f54b0e47a08782a6131cc3d60f94d038fa6e0a51
2017-06-02 09:35:53 +02:00
karenzshea
93dac6b246
vendoring rapidjson, header only library 2017-06-02 09:35:30 +02:00
Moritz Kobitzsch
a92674022a make all u-turns continue 2017-06-01 12:39:10 +02:00
Moritz Kobitzsch
ceaf065d0e don't collapse highway ramps into uturns (#4074) 2017-06-01 12:39:10 +02:00
Michael Krasnyk
a58139dfb5 Terminate earlier if mason fails to install clang++ on travis 2017-06-01 10:26:11 +00:00
Moritz Kobitzsch
9bd2b0deaa fix invalid turn angle in forks 2017-06-01 11:43:18 +02:00
Michael Krasnyk
d262c4dfaa [skip ci] Add comments about order of post-processing calls 2017-06-01 11:13:31 +02:00
Michael Krasnyk
dd009322de Remove roundabout skip as no leavesRoundabout steps after postProcess 2017-06-01 11:13:31 +02:00
Michael Krasnyk
858ec2e655 Fix steps collapsing after non-closed roundabouts, #4100 2017-06-01 11:13:31 +02:00
Michael Krasnyk
5d4ab4100a Test for collapsing sliproads after crossing a roundabout, #4100 2017-06-01 11:13:31 +02:00
FILLAU Jean-Maxime
43ddc63d67 Adds documentations on 'approaches' parameter.
Adds changelog
Adds doc/http.md doc
Adds doc/nodejs/api.md doc

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-31 15:02:55 +00:00
Daniel J. Hofmann
b5d1565dec Let's Travis check that for yarn lockfile and package.json sync
See https://yarnpkg.com/lang/en/docs/cli/check/
2017-05-31 14:40:31 +02:00
Daniel J. Hofmann
6658bb7d51 Runs yarn upgrade to sync yarn lockfile 2017-05-31 14:40:31 +02:00
Daniel J. Hofmann
eb2db4994f Updates NAN for Node.js bindings 2017-05-31 14:40:31 +02:00
Daniel J. Hofmann
d88e5ddf20 Uses node-cmake's CMake module directly, resolves #3912
No need for vendoring.
2017-05-31 14:40:31 +02:00
Daniel J. Hofmann
f3558260b6 Splits turn penalty tests into bicycle and testbot domain, resolves #4067 2017-05-31 10:47:43 +02:00
Daniel J. Hofmann
0317bbb35d Splits via tests into car and testbot domain, resolves #4061 2017-05-30 16:38:51 +02:00
Daniel J. Hofmann
a4a6ed7e38 Puts approach test into car domain 2017-05-30 16:37:05 +02:00
FILLAU Jean-Maxime
15a1e10487 Add nodejs binding test
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
98ad9d8b61 Refactoring enum Approach in enum class.
Suppress "engine::"

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
c573cdb0ae Use formating script.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
82a149eb87 Propagating approach parameter to every phantom nodes search function.
Propagating approach parameter for plugins :
 - tabler
 - nearest
 - trip

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
089c98a107 Adding support for left left hand driving.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
17a73e3979 Add NodeJS API for Approaches param.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
f65299d665 Rename side API
Side -> Approach
 - DEFAULT -> CURB
 - BOTH -> UNRESTRICTED
 - remove OPPOSITE param

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
f782dfbfd9 Add uturn test case in cucumber for sides param.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
ec7934ea33 Change qi::lit for qi::symbols for the sides parameter parser.
Refactor code :
 - Suppress StartSide Enum
 - Change Side Structure for Enum

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
2de17f3fd0 Adding url unit test for "sides" parameters
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
ba2bf4f78e Adding cucumber file test "side_param_feature" for the side parameter.
- test on normal segment
 - test on oneway segment

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
8a54e6a0ec Adding "sides" params for the sides option tests into java script
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
8e70c87e64 New "sides" setting in base parameters for phantom nodes.
- Adding sides parameter into base parameters, it can take the values SIDE, OPPOSITE or DEFAULT.
 - Adding url parser for "sides" parameter, url values are "s" for SIDE, "o" for OPPOSITE and "d" for DEFAULT, example : "sides=s;s".
 - Checking parameters, if "sides" parameter is used, the number of parameter is the same as number of location.
 - Create a phantom to start at side driving or Opposite side driving.

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
Patrick Niklaus
579a1ed42e Don't copy the object on WriteOne 2017-05-29 15:09:36 +00:00
Patrick Niklaus
a544935e7d Fix unit-test 2017-05-29 15:09:36 +00:00
Daniel Patterson
7eab227ab1 Use FileWriter for better error handling when writing name data. 2017-05-29 15:09:36 +00:00
Daniel Patterson
382a5cebab Use FileWriter for writing LeafNode data to improve error handling. 2017-05-29 15:09:36 +00:00
Johan Uhle
6d2353c302 Allow docker image with assertions (#4016) 2017-05-29 12:08:44 +02:00
Lev Dragunov
45ee096260 Ignore split breakage fix. 2017-05-26 10:55:03 +00:00
Daniel Patterson
c21a476b00 Overridden virtual function should be marked as override final. 2017-05-26 09:15:34 +00:00
Daniel Patterson
25c870dc57 Unused padding doesn't need to be named, removing name silences compiler warnings. 2017-05-26 09:15:34 +00:00
Daniel Patterson
4605c35101 Mark NodeJS headers as system includes to suppress compiler warnings. 2017-05-26 09:15:34 +00:00
Daniel Patterson
8655c61ec2 Remove variable name for unused parameters to silence compiler warnings. 2017-05-26 09:15:34 +00:00
Michael Krasnyk
314cf3f31a Add a comment line about counting 2017-05-23 18:27:47 +00:00
Michael Krasnyk
1d26deb0be Allow counting of service exits on service roundabouts, see #4075 2017-05-23 18:27:47 +00:00
Michael Krasnyk
ac35757616 [skip ci] Adjust CHANGELOG and the test description 2017-05-23 14:35:23 +02:00
Michael Krasnyk
47f2f17987 Change order of guidance post-processing, fix #4030 2017-05-23 14:35:23 +02:00
Michael Krasnyk
a63b43c259 Place reverse entering_via_edge in the front of intersection_view 2017-05-22 09:33:59 +00:00
Michael Krasnyk
14582fea5f Added example for roundabout overlapping 2017-05-22 09:33:59 +00:00
Daniel J. Hofmann
862ec14e06 Asserts Valid Iterators in Roundabout Exit Invalidation, see #4024 2017-05-22 09:33:59 +00:00
Daniel Patterson
570d81c6dd Bypass boost::numeric_cast checks for coordinate values that have already been validated (#4059)
(i.e. stuff that's stored in our datafiles).  Keep those checks for user-supplied values
(i.e. coordinates coming from files during preprocessing, or coordinates supplied by users
 during requests)
2017-05-19 10:52:44 -07:00
Michael Krasnyk
4964d0dcbd Adjust expectation and remove non-valid assertions 2017-05-19 09:47:47 +00:00
Patrick Niklaus
5c00fc9769 Disable weight update factor test, see issue #4065 2017-05-19 08:25:03 +00:00
Patrick Niklaus
3599d1db8e Switch code to use packed vector for segment weights/durations 2017-05-19 08:25:03 +00:00
Michael Krasnyk
5c61f00ffa
Add testbot profile to zero-speed-updates.feature 2017-05-19 09:00:23 +02:00
Daniel Patterson
aef3ff3e7b Use correct node-loading code in rtree benchmark. (#4064) 2017-05-18 13:29:50 -07:00
Daniel J. Hofmann
a971c2ef37 Applies max turn weight for turns onto restricted weights: no need for custom penalty 2017-05-18 16:33:50 +00:00
Daniel J. Hofmann
c757f70b97 Prevents possible overflow in applying a turn penalty onto restricted roads 2017-05-18 16:33:50 +00:00
Daniel J. Hofmann
403db7cc84 Lets MakeResponse(Route) explicitly call MakeResponse(ManyRoutes) in Route API
https://github.com/Project-OSRM/osrm-backend/pull/4035#discussion_r116890340
2017-05-18 10:54:32 +02:00
Michael Krasnyk
7a4c5a64fa Simplify angleBetween to avoid cancellation losses 2017-05-17 15:52:11 +00:00
Michael Krasnyk
c535e74a65 Added test to check bearing::angleBetween precision 2017-05-17 15:52:11 +00:00
Michael Krasnyk
e605917083 Changed some assert to OSRM_ASSERT 2017-05-17 15:52:11 +00:00
Michael Krasnyk
14db5f8d1f Fix OSRM_ASSERT_MSG compilation fail in Release mode 2017-05-17 15:52:11 +00:00
Michael Krasnyk
3546abc30e Added ChangeLog entry 2017-05-17 15:21:51 +00:00
Michael Krasnyk
e4b58c1258 Reverted connection of forward and backward nodes in one SCC 2017-05-17 15:21:51 +00:00
Michael Krasnyk
5e2e1d4c96 Renamed EdgeBasedNode to EdgeBasedNodeSegment 2017-05-17 15:21:51 +00:00
Michael Krasnyk
1a7cd785f2 Rename .nodes -> .nbg_nodes and .nodes_data -> .ebg_nodes 2017-05-17 15:21:51 +00:00
Michael Krasnyk
65de940882 Change EdgeBasedNodeDataExternalContainer to EdgeBasedNodeDataContainer 2017-05-17 15:21:51 +00:00
Michael Krasnyk
26702920b4 Move ComponentID to EdgeBasedNodeDataContainer 2017-05-17 15:21:51 +00:00
Michael Krasnyk
373087d74f Initialize unused bits in PhantomNode 2017-05-17 15:21:51 +00:00
Michael Krasnyk
ca6b1b39b7 Remove data duplicates in .node file 2017-05-17 15:21:51 +00:00
Michael Krasnyk
8934167e76 Merge part of .nodes fields into .nodes_data 2017-05-17 15:21:51 +00:00
Daniel J. Hofmann
9972b5f1f9 Removes unused PUBLISH_NODE_BINDINGS var from .travis.yml 2017-05-16 16:23:24 +00:00
Patrick Niklaus
d8877abf26 Fix weight value for alley 2017-05-16 16:19:17 +00:00
Patrick Niklaus
bce3b68281 Add regression test 2017-05-16 16:19:17 +00:00
Patrick Niklaus
7d42e18479 Fix bicycle turn penalties 2017-05-16 16:19:17 +00:00
Mateusz Loskot
4294295242 Mark way_function properties as mandatory
Format values and function names as code (refines #4040)
2017-05-16 15:17:57 +00:00
Frederik Ramm
16f492026a remove penalty_table from car.lua
remove penalty_table as it is apparently not used anywhere.
2017-05-16 10:40:21 +00:00
Mateusz Loskot
7d58f0ec53 Document default values of global properties set in profile 2017-05-16 10:39:51 +00:00
Patrick Niklaus
6bd724fe24 Rewrite packed vector to also allow random access
This fixes issues #3952. The new approach pre-computes masks for fast
access. Since elements can potentially span multiple words we need masks
and offsets for each upper and lower word.

Due to a bug in the C++14 standart the mask computation is not
recognized as constexpr, but would work on C++17.
2017-05-16 10:25:29 +00:00
Patrick Niklaus
26a208529e [skip ci] Fix alternatives_count documentation 2017-05-15 17:02:41 +00:00
Patrick Niklaus
3fbdb19956 Bump cucumber timeout of gcc-6 with coverage 2017-05-15 12:23:07 +00:00
Patrick Niklaus
ea9d5eca0f Update yarn.lock 2017-05-15 12:23:07 +00:00
Patrick Niklaus
0f66278532 Disbale doc builds again 2017-05-15 12:23:07 +00:00
Patrick Niklaus
b9206ef017 Upgrade docbox 2017-05-15 12:23:07 +00:00
Patrick Niklaus
9d8f1d9dbf Try documentation 4.0.0 JS RC1 2017-05-15 12:23:07 +00:00
Daniel J. Hofmann
e064a9334b Lifts restriction to only provide zero or one alternative routes 2017-05-12 13:54:22 +02:00
Daniel J. Hofmann
e12c7756d9 Weight-ifies alternatives related code-paths 2017-05-12 13:54:22 +02:00
Moritz Kobitzsch
f8002480c2 fix continue_straight interaction with bearing specification 2017-05-12 13:38:04 +02:00
Karen Shea
799a677e7a Conditional turn restriction support (#3841)
* optionally include condition and via node coords in InputRestrictionContainer

* only write conditionals to disk, custom serialization for restrictions

* conditional turn lookup, reuse timezone validation from
extract-conditionals

* adapt updater to use coordinates/osm ids, remove internal to external map

* add utc time now parameter to contraction

* only compile timezone code where libshp is found, adapt test running

* slight refactor, more tests

* catch invalid via nodes in restriction parsing, set default cucumber
origin to guinée

* add another run to test mld routed paths

* cosmetic review changes

* Simplify Timezoner for windows build

* Split declaration and parsing parts for opening hours

* adjust conditional tests to run without shapefiles

* always include parse conditionals option

* Adjust travis timeout

* Added dummy TZ shapefile with test timezone polygons

* [skip ci] update changelog
2017-05-11 12:13:52 +02:00
Michael Krasnyk
12f47708cd Adjust method and function names 2017-05-11 09:13:42 +00:00
Michael Krasnyk
9358aa1128 Disable nodes with invalid segments 2017-05-11 09:13:42 +00:00
Michael Krasnyk
a44b63fbb9 Add response codes of trip and routability queries 2017-05-11 09:13:42 +00:00
Mateusz Łoskot
e2b7e8a4da Refactor osrm-extract and osrm-contract to use osrm lib interface
Simplifies implementation of the tools slightly.
Ensures osrm::extract and osrm::contract keep working.

Follows up PR #3787
2017-05-10 21:35:42 +00:00
Michael Krasnyk
a5bfcd876f Add response code to test result values 2017-05-09 16:58:23 +00:00
Patrick Niklaus
2f02384d22 Disbale boost::interprocess condition variables on Linux to fix issue #3911 2017-05-08 09:15:01 +00:00
Michael Krasnyk
3de8613843 Added test with an empty CSV file 2017-05-05 22:15:05 +00:00
Michael Krasnyk
ccb8a07dc7 Hide qi namespace alias 2017-05-05 22:15:05 +00:00
Michael Krasnyk
6484fed190 Remove generate-edge-lookup argument in feature tests 2017-05-05 22:15:05 +00:00
Michael Krasnyk
6b103c6d0b Add zero file size check 2017-05-05 22:15:05 +00:00
Michael Krasnyk
669ac058b8 Print diagnostic information to avoid boost cryptic errors 2017-05-05 22:15:05 +00:00
Michael Krasnyk
e92967167f Use mapped_file_source for CSV files 2017-05-05 22:15:05 +00:00
Patrick Niklaus
f3de2c9b94 For the cyclability profile add alley penalties 2017-05-05 17:06:50 +00:00
Patrick Niklaus
21cd1a44e8 Add failing test case for alleys 2017-05-05 17:06:50 +00:00
Johan Uhle
6ca46795aa Fix gitsha output in dockerfile (#4014) 2017-05-05 15:55:48 +02:00
Patrick Niklaus
35d7b7ceaf Regenerate docs 2017-05-05 08:51:36 +00:00
Patrick Niklaus
faa2094488 Fix docs for radius 2017-05-05 08:51:36 +00:00
Patrick Niklaus
e6d776699f Fix overloaded parameter docs 2017-05-05 08:51:36 +00:00
Patrick Niklaus
200e90ad43 Disable TOC 2017-05-05 08:51:36 +00:00
Michael Krasnyk
c66f67ac07 Updated assertions to catch negative duration values for weights > 0
but still clamping negative duration values at 0 without checking weights
2017-05-04 21:03:45 +00:00
Michael Krasnyk
334a7b50cd Use rectified linear unit to prevent negative duration values 2017-05-04 21:03:45 +00:00
Michael Krasnyk
a9d3e61884 Fix minor review comments 2017-05-03 21:59:38 +00:00
Michael Krasnyk
88082c48cf Remove GetEdgeBasedNodeID from TurnDataContainer 2017-05-03 21:59:38 +00:00
Michael Krasnyk
40d0297885 Added unpacked_nodes vector to annotatePath interface 2017-05-03 21:59:38 +00:00
Michael Krasnyk
be1acae20c Use edge_id as index in ebg_node_data_container 2017-05-03 21:59:38 +00:00
Michael Krasnyk
f1e4349c82 Move geometry ids, name_ids and travel_modes to EdgeBasedNodeData 2017-05-03 21:59:38 +00:00
Michael Krasnyk
1f701341db Move reserve call before pushing weights 2017-05-03 21:59:38 +00:00
Patrick Niklaus
2a24468267 Regenerate API docs 2017-05-03 15:23:03 +00:00
Patrick Niklaus
f531a956f5 Update nodejs docs to document the constructor better 2017-05-03 15:23:03 +00:00
Patrick Niklaus
1aea10010b Run the docs in CI again 2017-05-02 16:57:23 +00:00
Patrick Niklaus
2cf6010665 Split travis jobs 2017-05-02 16:57:23 +00:00
Michael Krasnyk
2402d60429 Adjusted to PR comments 2017-05-02 16:55:03 +00:00
Michael Krasnyk
19494984eb Fix incorrect exit turn invalidation 2017-05-02 16:55:03 +00:00
Michael Krasnyk
07c7cb3c6c Rename BinaryHeap to QueryHeap 2017-05-02 15:54:25 +00:00
Michael Krasnyk
358aebec4d Decrease memory footprint of HeapHandle from 32 to 24 bytes 2017-05-02 15:54:25 +00:00
Michael Krasnyk
05826150f6 Use boost::heap::d_ary_heap 2017-05-02 15:54:25 +00:00
Michael Krasnyk
5827358a1e node.js script to run random osrm queries 2017-05-02 15:54:25 +00:00
Daniel J. Hofmann
9334cc463d Fixes Table not checking for valid phantom nodes
We failed to check if we could actually find phantom nodes for all
coordinates in the table plugin, leading to corrupt internal state.

```
curl 'http://localhost:5000/table/v1/car/7.4151,43.7305;7.4222,43.7368?radiuses=0;'
```

```
[assert][140505627227904] /tmp/osrm-backend/include/engine/routing_algorithms/routing_base.hpp:68
in: void osrm::engine::routing_algorithms::insertNodesInHeap(osrm::engine::SearchEngineData<osrm::engine::routing_algorithms::ch::Algorithm>::ManyToManyQueryHeap&, const osrm::engine::PhantomNode&) [with bool DIRECTION = false; osrm::engine::SearchEngineData<osrm::engine::routing_algorithms::ch::Algorithm>::ManyToManyQueryHeap = osrm::util::BinaryHeap<unsigned int, unsigned int, int, osrm::engine::ManyToManyHeapData, osrm::util::UnorderedMapStorage<unsigned int, int> >]: phantom_node.IsValid()
terminate called without an active exception
```
2017-05-02 13:41:33 +02:00
Daniel J. Hofmann
5532ee627f Fixes util.format calls in Cucumber support code 2017-05-02 12:52:10 +02:00
Freenerd
2021c30805 Save gitsha for later use in docker container 2017-05-02 09:36:09 +00:00
Patrick Niklaus
0e39aa9488 Address PR comments 2017-04-24 16:04:41 +00:00
Patrick Niklaus
8ec0745883 Add benchmark 2017-04-24 16:04:41 +00:00
Patrick Niklaus
c446b017ef Switch from macro based StrongTypedef to template version 2017-04-24 16:04:41 +00:00
Patrick Niklaus
a68435d856 Move clip functions to lambda 2017-04-20 14:58:26 +00:00
Patrick Niklaus
814324146b signed -> unsigned 2017-04-20 14:58:26 +00:00
Patrick Niklaus
11d8b2ba5a Add clipping for 20 bits to SegmentWeight/SegmentDuration 2017-04-20 14:58:26 +00:00
Patrick Niklaus
d6c6a262d8 Use 16bit for SegmentWeight and SegmentDuration 2017-04-20 14:58:26 +00:00
Patrick Niklaus
5c4f96e4bc Fix checking columns if route is not specified 2017-04-20 13:52:13 +00:00
Patrick Niklaus
9974b8b1da Apply traffic light penalty also for non-turns 2017-04-20 13:52:13 +00:00
Michael Krasnyk
c81baae1b9 Fix incorrect weight fallback for distance-based weights 2017-04-19 08:28:38 +02:00
Patrick Niklaus
e96545be2e Disable is_integral check because it fails for strong-type-def 2017-04-18 17:24:46 +00:00
Patrick Niklaus
609801ae99 Fix PR comments 2017-04-18 17:24:46 +00:00
Patrick Niklaus
a66918a303 Make PackedVector generic 2017-04-18 17:24:46 +00:00
Pepijn Schoen
e85c4f87e9 Skip fingerprinting .turn_penalties_index, to be done in a separate iteration because of Appveyor issues. 2017-04-18 12:01:06 +00:00
Pepijn Schoen
8ff5a22799 clang-format 2017-04-18 12:01:06 +00:00
Pepijn Schoen
4929d1297e Address PR comments 2017-04-18 12:01:06 +00:00
Pepijn Schoen
b830a8f942 Replace Count32 with Count64 2017-04-18 12:01:06 +00:00
Pepijn Schoen
0c388a5264 Fingerprint .turn_penalties_index 2017-04-18 12:01:06 +00:00
Pepijn Schoen
e4eb18cf4e Fingerprint .properties 2017-04-18 12:01:06 +00:00
Pepijn Schoen
5b4f432cba Fingerprint .tld 2017-04-18 12:01:06 +00:00
Pepijn Schoen
15f7257645 Fingerprint .turn_duration_penalties and .turn_weight_penalties 2017-04-18 12:01:06 +00:00
Pepijn Schoen
12c11f1d48 Fingerprint .names 2017-04-18 12:01:06 +00:00
Pepijn Schoen
a196d5ced3 Fingerprint .timestamp, normalize use of Size / GetSize and make that function Fingerprint-aware 2017-04-18 12:01:06 +00:00
Pepijn Schoen
802af08179 Fingerprint .core 2017-04-18 12:01:06 +00:00
Pepijn Schoen
85ec50552d fingerprint .ramIndex / tree nodes 2017-04-18 12:01:06 +00:00
Pepijn Schoen
8da96f8d94 fingerprint .tld 2017-04-18 12:01:06 +00:00
Pepijn Schoen
5b9d858f57 Fingerprint .edges 2017-04-18 12:01:06 +00:00
Pepijn Schoen
023242ec03 Fingerprint geometries 2017-04-18 12:01:06 +00:00
Pepijn Schoen
683e53e950 Fingerprint .osrm.datasource_names 2017-04-18 12:01:06 +00:00
Pepijn Schoen
df0ee955e8 Fingerprint and move .levels 2017-04-18 12:01:06 +00:00
Daniel Patterson
771834793f Only log components in Debug mode, it's very wordy and not really useful (#3948)
for Release builds.

Log component counts at the end of the SCC run.
2017-04-17 16:49:26 -07:00
Michael Krasnyk
3915c1286b Don't remove the last original coordinate during tiding 2017-04-13 21:27:00 +00:00
Patrick Niklaus
b422b636d3 Remove boost::make_unique to fix travis node builds 2017-04-13 21:19:09 +00:00
Patrick Niklaus
5bbc675c6b Bump osrm version to 5.8 2017-04-13 21:19:09 +00:00
Patrick Niklaus
addf4d90e9 Use .gitignore default instead of .npmignore 2017-04-13 21:19:09 +00:00
Patrick Niklaus
721e5e7947 Restructure travis build 2017-04-13 21:19:09 +00:00
Michael Krasnyk
dea3144c4d Use total angle for turn instruction if entry step has large distance 2017-04-12 23:22:44 +00:00
Patrick Niklaus
1080d25fcf Install node version as well 2017-04-12 20:27:32 +00:00
Patrick Niklaus
afb553a31e Only use three jobs for node builds 2017-04-12 20:27:32 +00:00
Patrick Niklaus
e2c231234d Use nvm instead of travis node_js key
This fixes issues on container builds that would always use
node 6 even when 4 was specified.
2017-04-12 20:27:32 +00:00
Patrick Niklaus
103f7117ed Update changelog 2017-04-12 14:59:26 +00:00
Michael Krasnyk
59b70c4d11 Make CoreCH SearchEngineData inherited from CH one
this allows to keep a single Algorithm template parameter in internal
interfaces as

template <typename Algorithm>
search(SearchEngineData<Algorithm> &,
       const datafacade::ContiguousInternalMemoryDataFacade<Algorithm> &, ...)
2017-04-12 10:54:09 +00:00
Michael Krasnyk
f96bae40ac Remove unused {forward,reverse}_heap_2 in MLD engine data 2017-04-12 10:54:09 +00:00
Michael Krasnyk
ba974c73bf Remove CoreCH heaps 2017-04-12 10:54:09 +00:00
Michael Krasnyk
e498ad3ee7 Make explicit fallback to CH heaps in CoreCH algorithms 2017-04-12 10:54:09 +00:00
Michael Krasnyk
1de031ed06 Remove {forward,reverse}_core_heap arguments from search interface 2017-04-12 10:54:09 +00:00
Patrick Niklaus
d6ac924b94 Use Date.now() 2017-04-11 22:33:38 +00:00
Patrick Niklaus
ee24473cbb Always print node version 2017-04-11 22:33:38 +00:00
Patrick Niklaus
c19a3cec1c Fix build syntax 2017-04-11 22:33:38 +00:00
Patrick Niklaus
f3694be1a0 Override install and after_sucess 2017-04-11 22:33:38 +00:00
Patrick Niklaus
306d86ce58 Add missing semi-colon 2017-04-11 22:33:38 +00:00
Patrick Niklaus
2c001b63a5 Port timer script to JS 2017-04-11 22:33:38 +00:00
Patrick Niklaus
e162dda836 Don't use bc 2017-04-11 22:33:38 +00:00
Patrick Niklaus
10c532bd4c Revert "Skip cucumber tests for publish builds"
This reverts commit 3f8160c156.
2017-04-11 22:33:38 +00:00
Patrick Niklaus
c8a7bc1d6a Revert "Don't build unit tests for publishing job"
This reverts commit eb0bd378ae.
2017-04-11 22:33:38 +00:00
Patrick Niklaus
9ca3c69b49 Don't build unit tests for publishing job 2017-04-11 22:33:38 +00:00
Patrick Niklaus
d1cf8c1fd5 Skip cucumber tests for publish builds 2017-04-11 22:33:38 +00:00
Patrick Niklaus
018742f50f Constrain the number of jobs on container builds 2017-04-11 22:33:38 +00:00
Patrick Niklaus
b82d21f856 Install yarn when not there 2017-04-11 22:33:38 +00:00
Patrick Niklaus
cfaadf198f Attempt sudo:false build matrix for node 2017-04-11 22:33:38 +00:00
Michael Krasnyk
6698b5e07e Use fallbacks counter to print a single warning message 2017-04-11 14:55:56 +00:00
Michael Krasnyk
37794a5e8a Change traffic CSV field value from weight to rate
and make the value required.

If the weight name is 'duration' than the rate value
can be computed as speed / 3.6

Issue: https://github.com/Project-OSRM/osrm-backend/issues/3823
2017-04-11 14:55:56 +00:00
Patrick Niklaus
a88fef2937 Implement distance pruning for MLD as well 2017-04-10 17:25:55 +00:00
Patrick Niklaus
da474a16a9 Fix formating 2017-04-10 17:25:02 +00:00
Patrick Niklaus
59bbfeb67f Buffer turn data on disk to save memory 2017-04-10 17:25:02 +00:00
Patrick Niklaus
4e9e2ed5bd Emit a notification when turning on a ferry and don't merge step 2017-04-07 15:29:53 +00:00
Moritz Kobitzsch
e0593c7ca2 add failing test for 3762 2017-04-07 15:29:53 +00:00
Daniel J. Hofmann
1f69df0d89 We need bash for the install script 2017-04-07 14:48:57 +02:00
Patrick Niklaus
05706879a0 Less is more: Don't force any specific build configuration 2017-04-07 14:48:57 +02:00
Patrick Niklaus
7e49b36198 Add script to fall back to source build 2017-04-07 14:48:57 +02:00
Patrick Niklaus
56bcb491d3 Bump package version to latest.6 2017-04-07 10:08:36 +00:00
Patrick Niklaus
f4e2bd848d Fixed breaking publishing due to node-cmake upgrade 2017-04-07 08:54:52 +00:00
Daniel J. Hofmann
0cf96314a3 Documents frontend quick start in Readme 2017-04-07 06:56:01 +00:00
Patrick Niklaus
91e24cab9e Bump package version to latest.5 2017-04-06 20:54:24 +00:00
Patrick Niklaus
288155ead0 Fix formating 2017-04-06 15:42:38 +00:00
Patrick Niklaus
85454857d3 Use default move function 2017-04-06 15:42:38 +00:00
Patrick Niklaus
fe50f6590a Fix formating 2017-04-06 15:42:38 +00:00
Patrick Niklaus
2da5da3f16 Don't leak ownership in partition/files 2017-04-06 15:42:38 +00:00
Patrick Niklaus
446c865415 Dont leak ownership in extractor::files 2017-04-06 15:42:38 +00:00
Patrick Niklaus
0072bf0c59 Move to forward declare header 2017-04-06 15:42:38 +00:00
Patrick Niklaus
4ec7ca29f1 Fix formating 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d94017dfae No shared_memory_wrapper, (De)SerializeVector 2017-04-06 15:42:38 +00:00
Patrick Niklaus
dce0ce0e17 Fix readGraph to not use UseSharedMemory 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d61102e255 Fix compilation of rtree benchmark 2017-04-06 15:42:38 +00:00
Patrick Niklaus
7f6e0c478b Split QueryNode into coordinates and osm id 2017-04-06 15:42:38 +00:00
Patrick Niklaus
786a3d8919 Read multi level graph to view 2017-04-06 15:42:38 +00:00
Patrick Niklaus
ef3fcdc6e6 Refactor graph writing code in contractor 2017-04-06 15:42:38 +00:00
Patrick Niklaus
90c194fc81 Refactor turn description into own file 2017-04-06 15:42:38 +00:00
Patrick Niklaus
5ed686a17b Add generic graph serialization 2017-04-06 15:42:38 +00:00
Patrick Niklaus
4e3009260c Load data directly into CellStorageView 2017-04-06 15:42:38 +00:00
Patrick Niklaus
c87ce2dede Load data directly into MLPView 2017-04-06 15:42:38 +00:00
Patrick Niklaus
99a87b4c83 Change serialisation of .geometries file. 2017-04-06 15:42:38 +00:00
Patrick Niklaus
3f5fc1e897 Read segment data directly into shm 2017-04-06 15:42:38 +00:00
Patrick Niklaus
97d1de1beb Pull turn data up into server 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d7e1c9c09c Refactor turn data into own class 2017-04-06 15:42:38 +00:00
Patrick Niklaus
865111bca9 Split partition serialization logic 2017-04-06 15:42:38 +00:00
Patrick Niklaus
08d62cd5e3 Separate serialization and files in extractor 2017-04-06 15:42:38 +00:00
Daniel J. Hofmann
603e2ee7de Adapts bindings to node-cmake v2, resolves #3879 2017-04-06 15:26:54 +02:00
Michael Krasnyk
98948989d0 implement MLD map matching 2017-04-06 11:17:23 +00:00
Michael Krasnyk
1aa8cc3b65 make getPathDistance algorithm-independent 2017-04-06 11:17:23 +00:00
Michael Krasnyk
c487d1307e enable map matching in MLD 2017-04-06 11:17:23 +00:00
Michael Krasnyk
604f4957f7 correctly fail on unimplemented map matching feature 2017-04-06 11:17:23 +00:00
Michael Krasnyk
7726576bb7 use ADL and explicit instantiation for map matching 2017-04-06 11:17:23 +00:00
Michael Krasnyk
cf17a3a4c3 PR review adjustments 2017-04-06 10:36:40 +02:00
Michael Krasnyk
0972ec9115 remove CH-related part of loops forcing 2017-04-06 10:36:40 +02:00
Michael Krasnyk
f660ae30dc use explicit instantiation of shortestPathSearch 2017-04-06 10:36:40 +02:00
Michael Krasnyk
2766c24b42 prefer smaller legs for equal weights in shortest path plugin 2017-04-06 10:36:40 +02:00
Michael Krasnyk
cab83555e1 add loops forcing to MLD search 2017-04-06 10:36:40 +02:00
Michael Krasnyk
48a098a9c7 implement MLD shortest path plugin 2017-04-06 10:36:40 +02:00
Michael Krasnyk
a1fa1c610c enable "via" MLD tests 2017-04-06 10:36:40 +02:00
Michael Krasnyk
905ca69301 add Algorithm parameter to SearchEngineData 2017-04-06 10:36:40 +02:00
Michael Krasnyk
d66cc125aa make first heaps algorithm-aware 2017-04-06 10:36:40 +02:00
Michael Krasnyk
3fc0fc65f9 don't disable algorithms explicitly 2017-04-06 10:36:40 +02:00
Michael Krasnyk
8c64b01d67 itroduce ADL via algorithm specific ch, corech and mld namespaces 2017-04-06 10:36:40 +02:00
Michael Krasnyk
2566f64c34 fix unused variable warning 2017-04-06 10:36:40 +02:00
Patrick Niklaus
8cd40b9e90 Bump backed version to latest.4 2017-04-05 11:38:49 +00:00
Patrick Niklaus
45df8568b6 Fix formating 2017-04-05 11:22:39 +00:00
Patrick Niklaus
0da041477b Adjust generation counted array for PR comments 2017-04-05 11:22:39 +00:00
Patrick Niklaus
272ea9b92e Fix test compilation 2017-04-05 11:22:39 +00:00
Patrick Niklaus
571681d019 Use array heap 2017-04-05 11:22:39 +00:00
Patrick Niklaus
9b614c6057 Add generation counted storage 2017-04-05 11:22:39 +00:00
Patrick Niklaus
721f319909 Don't scan back clique arcs 2017-04-05 11:22:39 +00:00
Patrick Niklaus
a3621f3655 [skip ci] Bump package version to latest.3 2017-04-04 23:03:04 +00:00
Pepijn Schoen
789311abd6 Remove osrm namespace indication where possible, wrap out shared_memory_ownership 2017-04-04 17:00:36 +00:00
Pepijn Schoen
091a495632 clang-format 2017-04-04 17:00:36 +00:00
Pepijn Schoen
16665aeb00 Renaming of MemorySetting > Ownership 2017-04-04 17:00:36 +00:00
Pepijn Schoen
d6e56c38d5 Rename SharedMemoryWrapper to vector_view 2017-04-04 17:00:36 +00:00
Pepijn Schoen
87874006c7 rename to vector_view, replace some missing ShM occurences 2017-04-04 17:00:36 +00:00
Pepijn Schoen
703588b684 clang-format 2017-04-04 17:00:36 +00:00
Pepijn Schoen
b21ee1b63b Fixed regression 2017-04-04 17:00:36 +00:00
Pepijn Schoen
427437d49b Use a one-time defined generic signature for SharedMemoryVectors 2017-04-04 17:00:36 +00:00
Pepijn Schoen
01deefc3bc First pass at adjustment for comments 2017-04-04 17:00:36 +00:00
Pepijn Schoen
157ca9161f clang-format 2017-04-04 17:00:36 +00:00
Pepijn Schoen
266e65e6d2 Replace bool for using shared memory with MemorySetting enum 2017-04-04 17:00:36 +00:00
Daniel J. Hofmann
70b3962c35 NodeJS Binding Tests
Does not run the nodejs tests in sanitized builds. We'd have to

    export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libasan.so.2'

the asan lib. But it seems like our Clang from mason does not like the
system's libasan. Also we'd need a suppression file for v8 and node.
2017-04-04 16:57:44 +00:00
Patrick Niklaus
e568b600f0 Tag a new latest version for publishing 2017-04-03 12:50:45 +00:00
Patrick Niklaus
273fd689ce Always check local variables 2017-03-30 20:12:07 +00:00
Patrick Niklaus
0363d64722 Update releasing docs 2017-03-30 20:12:07 +00:00
Patrick Niklaus
d200507424 Fix travis.yml 2017-03-30 20:12:07 +00:00
Patrick Niklaus
fc84f605af Switch from commit message publishing to tag-based publishing 2017-03-30 20:12:07 +00:00
Patrick Niklaus
927dea37bb Fix publishing node binaries 2017-03-30 20:12:07 +00:00
Patrick Niklaus
de98ae57b7 Switch to yarn 2017-03-30 20:12:07 +00:00
Patrick Niklaus
614398ed6c Integrate MLD in node bindings 2017-03-30 20:12:07 +00:00
Michael Krasnyk
2cd4ba9a0a move split_edges to global properties 2017-03-30 11:20:13 +02:00
Michael Krasnyk
57d3f71bf9 added change log entry and documentation 2017-03-30 11:20:13 +02:00
Michael Krasnyk
8f8df969a2 use signed slope to distinguish uphills and downhills 2017-03-30 11:20:13 +02:00
Michael Krasnyk
e39dc3c464 adjust rasterbot test to check split_edges flag 2017-03-30 11:20:13 +02:00
Michael Krasnyk
dbc6535221 add split_edge flag in extracted ways 2017-03-30 11:20:13 +02:00
Michael Krasnyk
e262cac3e8 Flip source and target coordinates for segments in only backward direction 2017-03-29 22:05:37 +00:00
Michael Krasnyk
4ab3165ae3 Fix unnecessary duplication of backward segments for non-split edges
for edges with the split flag false and in_backward_direction true
if in_forward_direction is also true backward segments can be incorrectly duplicated
2017-03-29 22:05:37 +00:00
Michael Krasnyk
7a1a209168 use std::regex_token_iterator instead of boost tokenized 2017-03-29 10:23:42 +00:00
Michael Krasnyk
ac6f07a744 make adaptors::tokenized compatible with boost 1.54 2017-03-29 10:23:42 +00:00
Michael Krasnyk
dac929f8df Make max-cell-sizes parameter a comma-separated list 2017-03-29 10:23:42 +00:00
MichalPP
ebd938a8fc add kerb to foot.profile barrier whitelist 2017-03-29 10:25:28 +02:00
Michael Krasnyk
5ba54a62d6 Fix clang format for 3dcc713 2017-03-28 13:39:22 +00:00
Michael Krasnyk
827a595b6c Enable coverage reports for unit_tests 2017-03-28 10:40:13 +00:00
Michael Krasnyk
c03f74d8b0 Remove unused id parameter 2017-03-28 10:40:13 +00:00
Michael Krasnyk
f5393f44f7 Add minimal representative example for #3866 2017-03-28 10:40:13 +00:00
Patrick Niklaus
ad6e834992 Add regression test 2017-03-28 10:40:13 +00:00
Patrick Niklaus
3439b21177 Fix internal edges for nodes not in the boundary 2017-03-28 10:40:13 +00:00
Pepijn Schoen
730c809395 Fix Win tests by copying data explicitly to test/data 2017-03-28 12:08:49 +02:00
Emil Tin
5a2da798c8 fixes speed on cycleway+oneway #3853 2017-03-28 12:07:38 +02:00
Daniel J. Hofmann
c0e7f6e9f4 Documents the user having to be in the docker group for running our images 2017-03-28 12:05:09 +02:00
Richard Fairhurst
ed83d3ed13 More turn parameters as per @daniel-j-h's comment 2017-03-28 11:58:42 +02:00
Richard Fairhurst
aa1dff3fc4 Update _rate as per @TheMarex's comment 2017-03-28 11:58:42 +02:00
Richard Fairhurst
c1901e9689 Add new property from #3840 2017-03-28 11:58:42 +02:00
Richard Fairhurst
c6e6d9fa94 Explain parameters as per @daniel-j-h's suggestion 2017-03-28 11:58:42 +02:00
Richard Fairhurst
88eabb98b9 Document all options available to Lua profiles
Recent improvements to OSRM have led to a lot of changes to the Lua scripting interface, and refactoring of the default profiles makes them slightly more abstract and difficult to grok for those writing profiles from scratch.

This is therefore an attempt to fully document the attributes that can be read and set from Lua profiles. I've done it from my own understanding and from reading the source, but I may well have missed things or mistaken them!
2017-03-28 11:58:42 +02:00
Michael Krasnyk
3dcc7132b6
Add max-cell-sizes option to partitioner 2017-03-28 11:53:14 +02:00
Daniel Patterson
379380abd8 These don't need to be warning messages, debug is sufficient. 2017-03-22 10:41:10 +00:00
Lev Dragunov
497709da13 Review fixes 2017-03-22 10:39:36 +00:00
Lev Dragunov
b95a58591d Tidying matching without ts case 2017-03-22 10:39:36 +00:00
Lev Dragunov
5727b1387e Test fixes 2017-03-22 10:39:36 +00:00
Lev Dragunov
221cd00b1a Remove redundant bitsetting 2017-03-22 10:39:36 +00:00
Lev Dragunov
cce4f6344c TODO fixes 2017-03-22 10:39:36 +00:00
Lev Dragunov
a49c6f433b Cucumber tests 2017-03-22 10:39:36 +00:00
Lev Dragunov
ef308ac53a Compilation fix. 2017-03-22 10:39:36 +00:00
Lev Dragunov
2fab696bb3 New tidying and gaps parameters. 2017-03-22 10:39:36 +00:00
Lev Dragunov
836a5066c2 CHANGELOG entry 2017-03-22 10:39:36 +00:00
Lev Dragunov
69422cc4e7 Clang formatting. 2017-03-22 10:39:36 +00:00
Lev Dragunov
e9c0987e8a Integration #3149 and #3815 2017-03-22 10:39:36 +00:00
Daniel J. Hofmann
bd9eb76a2d Transparently Tidy Traces in Map Matching, resolves #2840.
The Map Matching plugin currently has issues with:
- high frequency traces and (performance)
- blobs, think noise at traffic signals (correctness)

This changeset implements trace-tidying transparently for the user.

We hopefully will see both performance gains as well as better matches!
2017-03-22 10:39:36 +00:00
Lev Dragunov
441eae9df2 Tidying prarameter for the map matching plugin. 2017-03-22 10:39:36 +00:00
Michael Krasnyk
bfc272f3e8 fix appveyor fail 2017-03-21 20:10:39 +00:00
Daniel J. Hofmann
215489286d Back to Monaco for examples and benchmarks 2017-03-21 20:10:39 +00:00
Daniel J. Hofmann
c772210cc0 Back to Monaco for unit tests 2017-03-21 20:10:39 +00:00
Patrick Niklaus
934f87bcdd Try disabling sanitizer fo GCC6 for now 2017-03-21 20:10:39 +00:00
Patrick Niklaus
ff872b4009 Fix example 2017-03-21 20:10:39 +00:00
Patrick Niklaus
7278f88aa9 Only extract berlin.osm.pbf once and fix windows builds 2017-03-21 20:10:39 +00:00
Daniel J. Hofmann
16621f00c1 Use float literals to silcen Windows warnings 2017-03-21 20:10:39 +00:00
Patrick Niklaus
0c9eb8e16c No osrm-contract run for the MLD dataset 2017-03-21 20:10:39 +00:00
Patrick Niklaus
78cd460395 Use core size 0.2 on berlin for preparing test data 2017-03-21 20:10:39 +00:00
Daniel J. Hofmann
2351b5a084 Merges node-osrm into repository
Build with

    cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On
2017-03-21 20:10:39 +00:00
Daniel Patterson
ff238c2724 Configure Dockerfile for integration with Docker Cloud/Dockerhub for (#3850)
automated image creation.
2017-03-21 12:53:12 -07:00
Patrick Niklaus
810e3c6a66 Add comment to explain branch 2017-03-21 16:23:10 +00:00
Patrick Niklaus
98529ee071 Apply clang format 2017-03-21 16:23:10 +00:00
Patrick Niklaus
e902ab4693 Fix all customization tests 2017-03-21 16:23:10 +00:00
Patrick Niklaus
b085add973 Integrate internal cell scan into customizer 2017-03-21 16:23:10 +00:00
Patrick Niklaus
2b397942fe Fix bug and add test coverage for GetInternalEdgeRange 2017-03-21 16:23:10 +00:00
Patrick Niklaus
655ca803d8 Adds a special graph for MLD with effcient boundary scan
This graph enables efficient boundary edge scans at each level.
Currenly this needs about |V|*|L| bytes of storage.
We can optimize this when the highest boundary nodes ID is << |V|.
2017-03-21 16:23:10 +00:00
Patrick Niklaus
58681fa7ea Refactor StaticGraph generation 2017-03-21 16:23:10 +00:00
Michael Krasnyk
78a199e2fb Add read-only max_turn_weight in ProfileProperties 2017-03-20 20:06:51 +01:00
Michael Krasnyk
851fcf0758 Use _TBB_DEFAULT_INSTALL_DIR as a single-value variable 2017-03-20 13:52:23 +00:00
Michael Krasnyk
7379be90f9 Configure custom TBB builds via TBB_INSTALL_DIR 2017-03-20 13:52:23 +00:00
Michael Krasnyk
af65ccd054 Merge pull request #3788 from Project-OSRM/mld/routing
MLD shortest direct path search
2017-03-17 15:45:38 +01:00
Michael Krasnyk
79ef204e1f
Change edge_id to from_clique_arc in MultiLayerDijkstraHeapData 2017-03-17 13:20:34 +01:00
Michael Krasnyk
f1b88adebe
Avoid dynamic binding in getNodeQureyLevel 2017-03-17 13:20:34 +01:00
Michael Krasnyk
0c6ce6ce08
Implement MLD routingStep with cell restriction and without 2017-03-17 13:20:33 +01:00
Michael Krasnyk
5e40b12450
Add data names to benchmark output 2017-03-17 13:20:33 +01:00
Michael Krasnyk
a75fd560d7
Use correct upper bound condition for MLD routing 2017-03-17 13:20:33 +01:00
Michael Krasnyk
152f77b665
Remove level field from heap node data 2017-03-17 13:20:33 +01:00
Michael Krasnyk
c39690195e
Added traffic tests to MLD testing 2017-03-17 13:20:33 +01:00
Michael Krasnyk
20c6b4682f
MLD regression tests 2017-03-17 13:20:32 +01:00
Michael Krasnyk
97c442482d
Prepare test data for both CH and MLD algorithms
Leaving log files opened was intentional to avoid missing output
that can appear `child.on('exit',...)`.
With this approach cucumber tests hit locally maximum number
of opened files, because node.js keeps all log files opened.
2017-03-17 13:20:32 +01:00
Michael Krasnyk
6586737835
Fix weights and annotations for phantom points on one segment 2017-03-17 12:27:48 +01:00
Michael Krasnyk
fe5d1a6e74
Add MLD testing to cucumber tests 2017-03-17 12:27:47 +01:00
Michael Krasnyk
81771a3bfd
Fix cell storage for tiny maps 2017-03-17 12:27:47 +01:00
Michael Krasnyk
c648711f30
MLD direct shortest path plugin 2017-03-17 12:27:47 +01:00
Michael Krasnyk
6829f46c31
Split routing_base into CH and non-CH parts 2017-03-17 12:27:47 +01:00
Michael Krasnyk
43a7e8e08a
Rename {id|edge_id} to turn_id 2017-03-17 12:27:47 +01:00
Michael Krasnyk
c370ddd89a
Add routing algorithm option 2017-03-17 12:27:47 +01:00
Patrick Niklaus
57c6c6e51c Remove all boundary nodes and use simple u-v-stragtegy to pick id
This commit removes all occurences of unconnected boundary nodes
and switches to the simple heuristic of picking U for the forward
and V for the backward node. This performs better than several
fancy heuristics.
2017-03-17 11:23:48 +00:00
Patrick Niklaus
bf6698f4cc Address @daniel-j-h PR commtents 2017-03-17 11:19:58 +00:00
Patrick Niklaus
44757729b7 Ignore --generate-edge-lookup and not list it anymore 2017-03-17 11:19:58 +00:00
Patrick Niklaus
eb2e4d0aaf Load edge based graph to memory in one block and then update 2017-03-17 11:19:58 +00:00
Patrick Niklaus
4684a498c4 Precompute accumulated segment data 2017-03-17 11:19:58 +00:00
Patrick Niklaus
864543b023 Fix invalid warning 2017-03-17 11:19:58 +00:00
Patrick Niklaus
ed143b503d Consolidate data loading 2017-03-17 11:19:58 +00:00
Patrick Niklaus
809d8a7d03 Remove duration fallback for turn penalties to simplify logic 2017-03-17 11:19:58 +00:00
Patrick Niklaus
5ab882759d First step of moving turn penalty update to own function 2017-03-17 11:19:58 +00:00
Patrick Niklaus
acbaecf45d Remove .osrm.edge_segment_update not needed anymore 2017-03-17 11:19:58 +00:00
Patrick Niklaus
1f238fedd8 Only recompute weights for segments that needs to be updated 2017-03-17 11:19:58 +00:00
Patrick Niklaus
5828f4400d Return sorted list of updated segments and segment_data 2017-03-17 11:19:58 +00:00
Patrick Niklaus
4e2b157db3 Refactor update factor warning 2017-03-17 11:19:58 +00:00
Patrick Niklaus
8f9b4fcdbb Don't copy query nodes 2017-03-17 11:19:58 +00:00
Patrick Niklaus
23c74af2b5 Fix crash in support code when there are no annotations 2017-03-17 11:19:58 +00:00
Patrick Niklaus
2cc22ce098 Update consistency checker 2017-03-17 11:19:58 +00:00
Patrick Niklaus
2df02aa301 Make segment data update work without rtree 2017-03-17 11:19:58 +00:00
Patrick Niklaus
cec1f223e9 Split segment data update and edge update into sub-functions 2017-03-17 11:19:58 +00:00
Patrick Niklaus
17f8339aa6 Split out segment data update function 2017-03-17 11:19:58 +00:00
Daniel J. Hofmann
35c4c2a256 Fixes use-after-move, closes #3820 2017-03-16 14:42:48 +01:00
Bhargav Chippada
3c81baa26e Nearest Service #coordinates >=1 2017-03-15 22:42:08 +00:00
Daniel J. Hofmann
0a917a77f5 Updates Travis builds to Clang 4.0 2017-03-15 13:01:30 +01:00
Daniel J. Hofmann
583699c84d Enables LTO for Travis Release Builds 2017-03-15 13:01:30 +01:00
Daniel J. Hofmann
0f7218c0c4 Adds Dockerfile building the current source tree 2017-03-15 12:44:41 +01:00
Daniel J. Hofmann
2d66fec174 Removes unused Docker scripts 2017-03-15 10:40:00 +01:00
Daniel J. Hofmann
3cae315a76 Silences Clang warnings about unused arguments 2017-03-14 00:44:51 +00:00
Patrick Niklaus
d661f3f31e Move customizer tests to own unit 2017-03-13 23:04:45 +00:00
Patrick Niklaus
907f933a54 Add update functionality to osrm-customize
All speed file flags are compatible with osrm-contract.
2017-03-13 23:04:45 +00:00
Michael Krasnyk
c6e9cc8024 Add heuristic approach to assign edge-based partition IDs
that minimize number of faked source/destination nodes in
the edge case: a single backward edge will be placed
in other than node u partion
2017-03-13 22:00:38 +00:00
Daniel J. Hofmann
40094ceeab Documents roundtrip param, closes #3741 2017-03-13 16:30:48 +00:00
wieringen
24c70e3c8e Added bus_trap and sump_buster to barrier whitelist for bicycle profile 2017-03-10 23:09:27 +00:00
Patrick Niklaus
a636e8cc13 Include datasources in .geometries file and refactor .datasource_names 2017-03-10 20:40:59 +00:00
Patrick Niklaus
ffd6311e7d Address PR comment by @oxidase 2017-03-10 14:43:02 +00:00
Patrick Niklaus
260a84b94b Simplify write/read code 2017-03-10 14:43:02 +00:00
Patrick Niklaus
fb552fd751 Apply clang-format 2017-03-10 14:43:02 +00:00
Patrick Niklaus
94e2a8598d Address PR comments 2017-03-10 14:43:02 +00:00
Patrick Niklaus
4986f5ea2d Consolidate read/write code in updater for compressed geometries 2017-03-10 14:43:02 +00:00
Patrick Niklaus
1b5ab37dfd Refactor compressed geometry in own abstraction with read/write 2017-03-10 14:43:02 +00:00
Patrick Niklaus
83820bf82c Split CSV parsing into nicer interface 2017-03-10 14:43:02 +00:00
Patrick Niklaus
20e028c47b Split updater code from contract into own module 2017-03-10 14:43:02 +00:00
Daniel J. Hofmann
89c62bf67f Removed components flag in travis config; we build it per default 2017-03-10 11:09:59 +01:00
Michael Krasnyk
bc43229055 Make ColumnIterator a random_access_iterator, fixes #3792 2017-03-09 19:06:09 +00:00
Daniel J. Hofmann
e43a8ca528 Changes version to 5.7.0 for master already 2017-03-09 16:11:43 +00:00
Pepijn Schoen
c7fc36a61b Normalize file writes 2017-03-09 14:16:41 +00:00
Mateusz Łoskot
e705ff16e3 Ensure Extractor scheduler is requested with non-Zero number of threads.
By default, ExtractorConfig::requested_num_threads is Zero,
which is an invalid value for tbb task scheduler.
If user does not specify value greater than Zero, then
use tbb::task_scheduler_init::automatic.
2017-03-09 12:28:19 +01:00
Michael Krasnyk
0a13390ab0 Compute correct speed values in tile plugin 2017-03-09 11:18:53 +00:00
Daniel J. Hofmann
bf6b571455 Documents null in Table response if no route can be found 2017-03-09 11:17:22 +00:00
Mateusz Łoskot
e13ba8ba11 Add basic facades for Extractor and Contractor run methods.
Based on idea suggested in comments to #3776, simplifies
use of extractor and contractor as libraries.
2017-03-08 22:48:03 +00:00
Michael Krasnyk
5aba239fc1 removed code duplication in unit tests 2017-03-08 16:08:00 +00:00
Michael Krasnyk
dff8c48842 added reading cell storage in customizer 2017-03-08 16:08:00 +00:00
Michael Krasnyk
ec3cda32fa moved basic type definitions to osrm namespace 2017-03-08 16:08:00 +00:00
Michael Krasnyk
faaf82c837 Added CellStorage statistics 2017-03-08 16:08:00 +00:00
Michael Krasnyk
3f6ae245f6 Added osrm-customizer tool 2017-03-08 16:08:00 +00:00
Michael Krasnyk
bc2e06502e Added cells customizer 2017-03-08 16:08:00 +00:00
Mateusz Łoskot
aa1c4eb262 Allow build with Osmium from external location.
If OSMIUM_INCLUDE_DIR is specified in CMake command line,
use Osmium from that location, instead of /third_party.
2017-03-08 10:27:09 +00:00
Michael Krasnyk
264cec12e9 Fix reading MLD data into shared memory block 2017-03-08 00:56:50 +00:00
Michael Krasnyk
e423aa5511 added TODO for #3783 2017-03-08 00:56:50 +00:00
Patrick Niklaus
9b5458840a Adapt build script for test data for AppVeyor 2017-03-08 00:56:50 +00:00
Patrick Niklaus
fae1c737a3 Disable building test data on windows 2017-03-08 00:56:50 +00:00
Michael Krasnyk
6f9aea4e56 fix clang format style 2017-03-08 00:56:50 +00:00
Michael Krasnyk
d575561d39 adjust free functions naming style 2017-03-08 00:56:50 +00:00
Michael Krasnyk
f42136637d Add edge-based graph loading in MLD facade 2017-03-08 00:56:50 +00:00
Michael Krasnyk
53b0417e36 fix boost::optional warning 2017-03-08 00:56:50 +00:00
Michael Krasnyk
5bb933dd84 allows msb computation only for unsigned types 2017-03-08 00:56:50 +00:00
Patrick Niklaus
821351f56e Simplify bisection->cellid code by counting bits not depth 2017-03-08 00:56:50 +00:00
Patrick Niklaus
a92fa257af Fix off-by-one in fallback MSB function 2017-03-08 00:56:50 +00:00
Patrick Niklaus
c29391636a Change from in-memory to on-disk stxxl for test/data 2017-03-08 00:56:50 +00:00
Patrick Niklaus
c8bd01caae Use unsigned long long for 32bit 2017-03-08 00:56:50 +00:00
Patrick Niklaus
1f39d936c5 Add special .stxxl file for tests to keep it in-memory 2017-03-08 00:56:50 +00:00
Patrick Niklaus
36ab848aba Fix travis 2017-03-08 00:56:50 +00:00
Patrick Niklaus
6cb401b1ff Run clang-format 2017-03-08 00:56:50 +00:00
Patrick Niklaus
fc9b5938e6 Hardcode path to test data dir for library-tests
This was needed because we now need multiple datasets for testing.
CMake will automatically prepare these over the makefile in test/data.
2017-03-08 00:56:50 +00:00
Patrick Niklaus
8ad9a0aa9a parameterize cell size 2017-03-08 00:56:50 +00:00
Patrick Niklaus
8f9e980945 Add class to translate from bisection ids to cell ids 2017-03-08 00:56:50 +00:00
Patrick Niklaus
b2f3b901e0 Fix cell storage tests 2017-03-08 00:56:50 +00:00
Patrick Niklaus
517b27bfc3 Instead of hard fail, just print the number of unconneced nodes 2017-03-08 00:56:50 +00:00
Patrick Niklaus
00d01946cd Moved MultiLevelPartition and CellStorage to partition namespace 2017-03-08 00:56:50 +00:00
Patrick Niklaus
694bf9d8b1 Integrate CellStorage into datafacade 2017-03-08 00:56:50 +00:00
Patrick Niklaus
ef71cc0d12 Clang format 2017-03-08 00:56:50 +00:00
Patrick Niklaus
5f73ac1eda Add unit tests selectiong algorithm 2017-03-08 00:56:50 +00:00
Patrick Niklaus
108fce896b Pull everthing in the facades 2017-03-08 00:56:50 +00:00
Michael Krasnyk
ff0a98196f Initial interation on writing out MLD partition/cell data 2017-03-08 00:56:50 +00:00
Patrick Niklaus
757e7ca936 First step towards mld integration 2017-03-08 00:56:50 +00:00
Michael Krasnyk
74b382d881 Merge pull request #3784 from mloskot/ml/msvc-bigobj
Add MSVC flag /bigobj to CMAKE_CXX_FLAGS
2017-03-07 21:51:16 +01:00
Mateusz Łoskot
a725fb4655 Add MSVC flag /bigobj to CMAKE_CXX_FLAGS
Fix fatal error C1128: number of sections exceeded object file format limit
while compiling src/extractor/scripting_environment_lua.cpp
2017-03-07 19:28:53 +01:00
Emil Tin
ee076e6156 cucumber: enable checking mode in routability tables (#3748)
* cucumber: enable checking mode in routability tables

* show actual mode when expected was none

* minor fixes
2017-03-07 09:56:19 +01:00
Michael Krasnyk
65669f23a1 Allow arguments list in add_dependency_includes 2017-03-06 16:16:17 +00:00
Michael Krasnyk
172b1ff9d1 Enable building osrm-extract-conditionals on travis 2017-03-06 16:16:17 +00:00
Patrick Niklaus
596890a0f4 Fix spelling of access=customer_s_ and add to the restricted list way whitelisted highways 2017-03-06 16:14:26 +00:00
Patrick Niklaus
0770d8b8cf Fix tile datasize check 2017-03-03 16:03:41 +00:00
Patrick Niklaus
cc3a4899a2 Only allow restricted access for road of certain highway type 2017-03-03 16:03:41 +00:00
Patrick Niklaus
93cdd8bb46 Remove unneccessar branch in CoreCH code 2017-03-03 16:02:12 +00:00
Patrick Niklaus
c2a5cc034a Fix formating 2017-03-03 16:02:12 +00:00
Patrick Niklaus
e737700c7b Fix tile encoding 2017-03-03 16:02:12 +00:00
Patrick Niklaus
a32f8a6a59 Fix two typos in tile code 2017-03-03 16:02:12 +00:00
Patrick Niklaus
ed00965d18 Add algorithm selection 2017-03-03 16:02:12 +00:00
Patrick Niklaus
3f485ac09b Addressed PR comments by @daniel-j-h and @oxidase 2017-03-03 16:02:12 +00:00
Patrick Niklaus
a901bda41e Fix algorithm compability check logic 2017-03-03 16:02:12 +00:00
Patrick Niklaus
0ac1f99f9c Fix bug in refactor 2017-03-03 16:02:12 +00:00
Patrick Niklaus
30ff0fa977 Refactor routeStep 2017-03-03 16:02:12 +00:00
Patrick Niklaus
7da86b5984 Implement CoreCH algorithm 2017-03-03 16:02:12 +00:00
Patrick Niklaus
922e155763 Add type traits to disable plugins for specific algorithms 2017-03-03 16:02:12 +00:00
Patrick Niklaus
436b34ffea Refactor routing_algorithms to only contain free functions 2017-03-03 16:02:12 +00:00
Patrick Niklaus
2fa8d0f534 Port OSRM, Engine and Datafacades to be algorithm aware 2017-03-03 16:02:12 +00:00
Michael Krasnyk
71e95c92b6 Fix incorrect forward datasources getter in facade 2017-03-03 10:52:34 +00:00
Patrick Niklaus
fbf7521769 Other flakey test 2017-03-02 15:24:51 +00:00
Patrick Niklaus
7c911b3891 Mark test as flaky and track in own issue. 2017-03-02 14:55:52 +00:00
Patrick Niklaus
9f61f72ee8 Print 0 rate 2017-03-02 14:55:52 +00:00
karenzshea
d32ebd57e6 simplify test, add intersection turn test 2017-03-02 14:55:52 +00:00
karenzshea
8e43c8cbce add restricted penalty on NoTurn turns 2017-03-02 14:55:52 +00:00
Daniel J. Hofmann
7632c20ddf Adds Docker Instructions to Readme 2017-03-01 20:21:26 +00:00
Daniel J. Hofmann
4fa3a5c362 Disables LTO for mason+gcc
See https://github.com/Project-OSRM/node-osrm/pull/301
2017-03-01 16:47:46 +00:00
Patrick Niklaus
886421b43a Fix help texts and .nbg_to_ebg -> .cnbg_to_ebg 2017-03-01 16:09:29 +00:00
Patrick Niklaus
e20cbf673f Make InertialFlow a function 2017-03-01 16:09:29 +00:00
Michael Krasnyk
54c35710f6 return vector with correct edges 2017-03-01 16:09:29 +00:00
Michael Krasnyk
748ade5fea fixed warnings 2017-03-01 16:09:29 +00:00
Michael Krasnyk
f5e9c7df07 adjust extractor scc to new StaticGraph 2017-03-01 16:09:29 +00:00
Michael Krasnyk
1541d32a42 adjust cell_storage tests to new StaticGraph interface 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
ed7438b9ba don't check for files not actually read 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
e8cca36369 fix tbb leaks 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
d473acb56d fix edge duration truncation in partition, pending global fix
fix windows compilation
no multi line warnings
sanitze on mason with newer TBB
2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
b5d63e5ed5 Re-use the extractor edge based edge for loading the ebg in osrm-partition 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
c712fafae3 Sigh. Just randomly pick a side for border nodes for now.. 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
e589ab814d Store flag for artificial bounary edges and walk border nodes in ebg 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
5015e12d59 First try at artificial nodes 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
3e409bea26 Loads the edge based graph edges and constructs a dynamic graph from it 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
e0665856b0 Split Partitioner I/O off into separate headers 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
f71d742b5e Implements Mapping for NodeBasedGraph -> EdgeBasedgraph Translation 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
299d071e9d Fixes asan's detected tbb leak in osrm-partition
Here's all I could get out of a instrumented `osrm-partition`; debug build,
with all the bells and whistles I could think of to make it more verbose:

```
==17928==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1560 byte(s) in 3 object(s) allocated from:
    #0 0x7f4244185b30 in operator new[](unsigned long) ../../../../libsanitizer/asan/asan_new_delete.cc:62
    #1 0x7f4242a788b3  (/usr/lib/libtbb.so.2+0x208b3)

SUMMARY: AddressSanitizer: 1560 byte(s) leaked in 3 allocation(s).<Paste>
``

Symbolizing the address results in

```
echo "/usr/lib/libtbb.so 0x7f4242a788b3" | llvm-symbolizer
_fini
```

Looks like a crt finalizer => static global dtor "leaking" from tbb.

Which turned out to be a missing `tbb::task_scheduler_init` on our end:

> Using task_scheduler_init is optional in Intel® Threading Building
> Blocks (Intel® TBB) 2.2. By default, Intel TBB 2.2 automatically creates
> a task scheduler the first time that a thread uses task scheduling
> services and destroys it when the last such thread exits.

https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm?index.htm#reference/task_scheduler/task_scheduler_init_cls.html

Without an explicit instanz the first call to a tbb algorithm seem to initialize
a global scheduler singleton which then "leaks" until the program exits.

Phew.
2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
075f69acc2 Installs osrm-partition tool and library 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
be41e8b321 generate stats in annotation 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
739ad73ae9 Be -fpermissive with gcc49: required for tbb::parallel_do_feeder compilation bug 2017-03-01 16:09:29 +00:00
Daniel Patterson
b62b09e5f6 Dump memory usage stats after partitioning. 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
b789da45bd add unit tests for the different components of the parttion tool 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
e316dad1cb No longer requires edges to have a .data member in static graph
some fixes to make branch compilable
Removes unneeded edge data from components search
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
c3cc79f798 always emit a small component view
Unit Tests for Reodering by Predicate
2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
b9ed20bb9b Implements Compressed Node Based Graph (De-)Serialization Skeleton
Implements parallel recursion for the partitioner
Fixes osrm-extract's -dump-partition-graph: accept no further tokens

References:
- http://www.boost.org/doc/libs/1_55_0/doc/html/boost/program_options/bool_switch.html

Pulls parameters through to make them configurable from the outside

Defaults are equivalent to:

    ./osrm-partition \
      berlin-latest.osrm \
      --max-cell-size 4096 \
      --balance 1.2 \
      --boundary 0.25 \
      --optimizing-cuts 10

Fixes parallel_do call for Intel TBB 4.2 (Trusty): no range-based overload
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
786be6f570 Optimise Flow Algorithm/Datastructures in use 2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
dd60ae31ae Implement Parallel Spatial-Ordering/Cut Selection
Extends explanation for recursive bisection ids
Cleans up Bisection State
Removes license boilerplate from partitioner config
Sorts Spatially and picks Sources and Sinks
Uses sets for sources and sinks for now; see how large they will get
Runs n cuts in parallel changing the slope and uses the best
Clarifies balance <-> ratio naming
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
db7adfa77b Implement Dinic Algorithm for MaximumFlow/MinimumCut 2017-03-01 16:09:29 +00:00
Daniel J. H
dd3f351874 Partitioner Improvements and Utils on top of #3603 (#3611)
* Implements Random Access Iterator Facade for EdgeIDIterator

* Makes StaticGraph Node and Edge requirements explicit

* Cleans up Bisection Graph, Node and Edge

* Cleans up GraphView
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
d56db500d3 Initial Skeleton for Recursive Bisection via Inertial Flow 2017-03-01 16:09:29 +00:00
Lev Dragunov
07221f5a48 Do not take the current route into account in alternatives_count parameter. 2017-03-01 01:29:00 +00:00
Lev Dragunov
421d336b0f Cucumber test support for alternatives count parameter 2017-03-01 01:29:00 +00:00
Lev Dragunov
5be6f8959a Describe alternatives_count in documentation 2017-03-01 01:29:00 +00:00
Lev Dragunov
f7b8e06c3a Matching alternatives count output. #3508 2017-03-01 01:29:00 +00:00
Moritz Kobitzsch
18a50d357f remove suppressed new names from new tests 2017-02-25 12:17:22 +00:00
Moritz Kobitzsch
6c3390f14d refactor of post-processing
- moves collapse into a dedicated set of functions / files
 - make collapse scenarios distinct (slight performance cost)
 - reduce verbosity for short name segments (now actually working, was supposed to do so before)
2017-02-25 12:17:22 +00:00
Moritz Kobitzsch
8d83c3adbb add locations to turn scenarios
start assigning turn locations to test / further locations
add locations/make roads not overlapping - staggered
larger grid size for utf tests (new name)
2017-02-25 12:17:22 +00:00
Michael Krasnyk
cd1a73dde6 revert 'directly' method on win32 2017-02-24 16:01:56 +00:00
Michael Krasnyk
4161181a6c revert watchdog singleton 2017-02-24 16:01:56 +00:00
Michael Krasnyk
82acd59a8e shared monitor implementation with a conditional variable
or a ring buffer with semaphores
2017-02-24 16:01:56 +00:00
Patrick Niklaus
438aa66b4c Add packed storage of partition information
Right now we need a 64bit integer for every node in the graph.
Depending on the number of cells we will see, we might get away with
32bit eventually.
2017-02-24 15:58:47 +00:00
yuryleb
5739c27ef4 Corrected car's bridge feature tests 2017-02-23 22:35:15 +00:00
yuryleb
b59295e55e Restored pre-fetching bridge tags
Restored bridge tags but as optional way data; highway or route tags
must be always
2017-02-23 22:35:15 +00:00
yuryleb
49862d1bcd Restored foot and bike profiles 2017-02-23 22:35:15 +00:00
yuryleb
544e54894f Excluded 'bridge=*' from all profiles
This commit fixes issue #3588 "OSRM uses man_made=bridge lines to
route?" with exclusion of 'brigde' tag analisys from all profiles to
disable routing on bridges countours (with no highway tags)
2017-02-23 22:35:15 +00:00
karenzshea
046d3128c4 clamp speed value to js max 2017-02-22 16:12:58 +00:00
Moritz Kobitzsch
1ad1ff5fc1 remove unsigned >= 0 checks, unused constnat 2017-02-21 13:55:59 +01:00
Patrick Niklaus
e06ffabf21 Add storage for cell weights used in the MLD algorithm 2017-02-20 16:31:36 +00:00
Daniel J. Hofmann
b2b5e2bb4d Updates TBB to latest stable version for 5.6 release 2017-02-20 13:55:04 +00:00
karenzshea
c2727f2029 expose data about turning onto restricted roads to turn function 2017-02-20 12:40:51 +00:00
Lev Dragunov
a0e7bab598 Add oneway:conditional profile code comment. 2017-02-20 10:34:06 +00:00
Lev Dragunov
67ae86882a Conditional oneway restrictions 2017-02-20 10:34:06 +00:00
Daniel J. Hofmann
e52a8e060b Updates sol2 to v2.15.8, resolves #3733 2017-02-20 10:11:18 +00:00
Daniel J. Hofmann
1bc8dbf139 Updates sol2 to v2.15.8 in dependency script 2017-02-20 10:11:18 +00:00
Patrick Niklaus
73b1a46d15 Change stxxl version to package with mason.ini 2017-02-16 16:08:07 +00:00
Patrick Niklaus
7ecf3410bf Bundle mason.cmake and mason.sh 2017-02-16 16:08:07 +00:00
Moritz Kobitzsch
03bb6dc161 reduce verbosity of use-lane in combination with lane-anticipation 2017-02-15 21:57:48 +00:00
Kajari Ghosh
a45b9e07fc Update http.md
Clarify where optional rotary properties will be added
2017-02-15 21:55:22 +00:00
Moritz Kobitzsch
6567e79ec5 explicitly cast to strings for table diffs 2017-02-15 21:54:37 +00:00
Patrick Niklaus
224848fc11 Merge pull request #3713 from Project-OSRM/mason07
Update mason to 0.7 for Intel TBB library
2017-02-15 14:04:04 +00:00
Daniel J. Hofmann
6468a1ba79 Merge commit 'ce1141982b4f7acf581d62a379f8fb49ac63f6b8' into mason07 2017-02-15 11:48:43 +01:00
Daniel J. Hofmann
ce1141982b Squashed 'third_party/mason/' changes from 6b4c359..c7a9670
git-subtree-dir: third_party/mason
git-subtree-split: c7a967003a7113a17faafe3b41082ad1ae3f1c2f
2017-02-15 11:48:43 +01:00
Daniel J. Hofmann
6e18af2267 Update deps script to mason 0.7 2017-02-15 11:48:26 +01:00
Daniel Patterson
73ce44028f Allow routing on toll roads by default (#3712) 2017-02-14 15:20:10 -08:00
Kajari Ghosh
335362315c Correct a typo in the docs (#3706)
Fix the typo of `summary` parameter table that was mislabeled `steps`.
2017-02-13 13:45:24 -08:00
karenzshea
e75278f9c2 add unit test for annotations=true returning all annotations 2017-02-13 18:00:39 +00:00
karenzshea
a31f401995 parse parameters.annotations into AnnotationsType::All 2017-02-13 18:00:39 +00:00
Karen Shea
6446257a93 add error logging for missing osrm file to library tests (#3704) 2017-02-13 17:57:39 +01:00
karenzshea
1bace1288d use qi - parser to work with 0 speed file lines 2017-02-13 16:09:25 +00:00
karenzshea
23b07c9197 clang format 2017-02-13 15:49:30 +00:00
karenzshea
a61b1a3623 round speed to 1 decimal place 2017-02-13 15:49:30 +00:00
karenzshea
7f39c9fcb0 add unit test to check that speeds are equal to distance/duration 2017-02-13 15:49:30 +00:00
karenzshea
921ff43acf return speed annotations 2017-02-13 15:49:30 +00:00
Quinn Chrzan
1ed1bae249 Unit testing docs (#3698)
* Updating library-tests and associated documentation to be more informative

* Fixing heading markup for updated unit testing docs
2017-02-13 15:58:46 +01:00
Karen Shea
38a1edfe3c Update http.md 2017-02-13 14:59:54 +01:00
Moritz Kobitzsch
dc1d491c15 comments 2017-02-13 10:55:40 +00:00
Moritz Kobitzsch
e4d500f451 fix handling none-tags in presence of multiple turns within 2017-02-13 10:55:40 +00:00
Moritz Kobitzsch
d52ea86cb9 add failing test 2017-02-13 10:55:40 +00:00
Patrick Niklaus
b906f2a628 Fix side road penalties and add test 2017-02-13 09:28:35 +00:00
Michael Krasnyk
2b00d92463 make annotations={true|false|(values)+} grammar 2017-02-10 16:11:24 +00:00
Patrick Niklaus
d28713b845 Make rate support code a little bit more obvious 2017-02-10 14:27:28 +00:00
Patrick Niklaus
2e6428e917 Fix HOV lane support with penalties 2017-02-10 14:27:28 +00:00
karenzshea
1f3a8d4538 remove units from rate columns in routability testing 2017-02-10 14:27:28 +00:00
karenzshea
140f1ad923 convert speed to meters per second when used to set rate 2017-02-10 14:27:28 +00:00
karenzshea
1c25070572 provide rate and weight headers for checking in routability tests 2017-02-10 14:27:28 +00:00
karenzshea
24fe881d03 hov_penalty, use min penalty rather than aggregate 2017-02-10 14:27:28 +00:00
karenzshea
25ab51f4f0 remove calls to handlers now in handle_penalties 2017-02-10 14:27:28 +00:00
karenzshea
46f96af360 fix merge conflicts 2017-02-10 14:27:28 +00:00
Michael Krasnyk
ce685da92c use weight_multiplier to convert fallback durations to weights 2017-02-10 13:24:01 +00:00
Kajari Ghosh
2218658969 Trip with Fixed Start and End points (TFSE) (#3408)
* fixed start and end trip feature to trip service
2017-02-10 05:13:20 -05:00
Michael Krasnyk
3e2db47cc8 cleanup in facade GetUncompressed members 2017-02-10 09:22:24 +00:00
Michael Krasnyk
28a8154cee check weights consistency after updates 2017-02-10 09:22:24 +00:00
Jonathon Rossi
005124fe1c Fix JSON syntax error in HTTP API docs (#3679) 2017-02-09 20:24:21 +01:00
Patrick Niklaus
1e4c8eeeb6 Only use trains when they are marked for bringing bikes 2017-02-08 14:29:28 +00:00
Patrick Niklaus
72455a2733 Don't check access tags of bike against railway 2017-02-08 14:29:28 +00:00
Michael Krasnyk
112cf55aae use white list as a set complement of blacklist for bicycle profile
http://www.openstreetmap.org/way/4788559
2017-02-08 14:29:28 +00:00
Patrick Niklaus
aa3f208032 Add access=permissive check for all profiles 2017-02-08 14:27:55 +00:00
Daniel J. Hofmann
919386bdaf Adds access=permissive routability scenarios, see #3435. 2017-02-08 14:27:55 +00:00
Patrick Niklaus
ae835cc04f Blacklist steps from the car profile 2017-02-08 14:27:55 +00:00
Emil Tin
ef4d32a492 improve diff table output 2017-02-08 11:32:33 +00:00
Daniel J. Hofmann
2a5ebf84bc Installs profiles to /usr/local/share/osrm/profiles by default, resolves #3670 2017-02-08 12:02:20 +01:00
Patrick Niklaus
768dc8d817 Merge pull request #3669 from Project-OSRM/seemoritz-minor_fixes
Port Seemoritz minor fixes to master
2017-02-08 09:34:36 +00:00
Patrick Niklaus
0c04c6cafb Address PR comments 2017-02-07 18:12:49 +00:00
Patrick Niklaus
bf690df97a Merge branch 'minor_fixes' of https://github.com/seemoritz/osrm-backend into seemoritz-minor_fixes 2017-02-07 12:48:29 +00:00
Daniel J. Hofmann
880b982eeb Removes exit field for intersection counting; only used for roundabouts
- f3ebba7a79/src/engine/api/json_factory.cpp (L197-L198)
- f3ebba7a79/src/engine/guidance/post_processing.cpp (L153)
2017-02-07 11:42:57 +00:00
Daniel J. Hofmann
53011755a2 Removes distance field from Waypoint docs
Waypoint objects have
- name
- location
- hint

fields. The only API adding `distance` to waypoints is the Nearest
plugin. And it documents this behavior independently.

The docs are wrong here from what I can tell. See:
- https://github.com/Project-OSRM/osrm-backend/blob/5.5/src/engine/api/json_factory.cpp#L290-L297
- https://github.com/Project-OSRM/osrm-backend/blob/5.5/include/engine/api/nearest_api.hpp#L37-L44
2017-02-07 11:42:57 +00:00
Emil Tin
ddb60c34e6 align cucumber diff tables 2017-02-07 11:42:20 +00:00
Moritz Kobitzsch
543f0e5e44 fix order of parameter initialisation for route parameters 2017-02-07 11:34:29 +01:00
karenzshea
1e9e420d91 clang format 2017-02-07 09:15:16 +00:00
karenzshea
c885d03830 use lambda instead of bindy 2017-02-07 09:15:16 +00:00
karenzshea
ab91a05680 update cucumber suport code to return separate annotations headers 2017-02-07 09:15:16 +00:00
karenzshea
84261fd214 GetAnnotations function 2017-02-07 09:15:16 +00:00
karenzshea
734df348cb a few more parameter tests 2017-02-07 09:15:16 +00:00
karenzshea
41064e2d7b revert 2017-02-07 09:15:16 +00:00
karenzshea
8d7aae8687 fix cucumber outputs 2017-02-07 09:15:16 +00:00
karenzshea
7256b6d0d4 update support code to handle variable annotations fields 2017-02-07 09:15:16 +00:00
karenzshea
3106b5dd9e set RouteParameters annotations member, when constructor only specifies annotations_type, add unit_tests 2017-02-07 09:15:16 +00:00
karenzshea
f1427a834d fix bitwise operators, selectively add annotations to response obj 2017-02-07 09:15:16 +00:00
karenzshea
04954de9c6 implement bitwise and operator 2017-02-07 09:15:16 +00:00
karenzshea
a6cd0863bc store/accept individual annotations parameters in addition to bool 2017-02-07 09:15:16 +00:00
Michael Krasnyk
9f28873cb1 add empty {tracktype,smoothness}_speeds in bicycle profile 2017-02-07 09:06:04 +00:00
Emil Tin
10c5d76909 use data.highway 2017-02-07 09:06:04 +00:00
Emil Tin
d81ef3f4db first round of handlers 2017-02-07 09:06:04 +00:00
Emil Tin
3abab16bf3 move settings to profile table 2017-02-07 09:06:04 +00:00
Michael Krasnyk
6e1c4bfecd Added indexed array data type with variable and fixed group blocks 2017-02-07 07:41:12 +00:00
Daniel J. Hofmann
cedeb15ade Adds surface=sett to bicycle profile, resolves #3649
References:
- http://taginfo.openstreetmap.org/keys/surface#values
- http://wiki.openstreetmap.org/wiki/Key:surface
2017-02-06 10:54:56 +01:00
Michael Krasnyk
f2663acfc6 remove 4 bytes packing of NodeBasedEdgeWithOSM due to alignment fails 2017-02-05 12:54:26 +01:00
Michael Krasnyk
c48fc58eb2 reduce size of InternalExtractorEdge by using single-precision values 2017-02-03 21:52:39 +00:00
Michael Krasnyk
5f1c7efd41 assertion for correct weight data 2017-02-03 18:59:00 +00:00
Michael Krasnyk
9e5d45d86a Added 'distance' weight to car profile 2017-02-03 18:59:00 +00:00
Michael Krasnyk
5fd6355829 add empty speed tables to foot.lua 2017-02-03 12:41:26 +00:00
Michael Krasnyk
6da4d918d0 Allow bicycle routing without access tag for railways with highway tag
http://www.openstreetmap.org/way/24455356
2017-02-03 12:41:26 +00:00
Michael Krasnyk
1628ebb871 Fix assertions in car profile, resolves #3629
restrict direction if access tag is missing and can not be derived
from highway tag

http://www.openstreetmap.org/way/4282676
http://www.openstreetmap.org/way/4621857
http://www.openstreetmap.org/way/4898368
2017-02-03 12:41:26 +00:00
Patrick Niklaus
eaed5c7a8e Split if in ProcessWay to comform to old behavior 2017-02-03 12:41:26 +00:00
Pepijn Schoen
9d2628b74f Don't use bool return values on successful write, instead rely on exception throwing 2017-02-02 10:31:32 +01:00
Emil Tin
11ee632cfe car: add tests oneway:<mode> tags 2017-02-01 16:50:18 +01:00
Emil Tin
97c0a74c04 factor out common lua code to helper files 2017-02-01 16:50:18 +01:00
Michael Krasnyk
b3ef27d104 Make watchdog a singleton instance
References:
https://github.com/Project-OSRM/osrm-backend/issues/3619
https://github.com/Project-OSRM/osrm-backend/pull/3627#issuecomment-276288138
2017-01-31 13:25:59 +01:00
Michael Krasnyk
c22ce3ae1f Use shared memory region mapping at fixed address for OSX 2017-01-31 13:25:59 +01:00
Daniel Patterson
36c944ef53 No need to log the exception stack when it's just a test table difference - this should be a clean error. 2017-01-31 12:05:19 +01:00
Kajari Ghosh
5b24758742 Make docs more consistent.
Change the word `field` to `property` for accuracy.
2017-01-27 16:41:34 -08:00
Patrick Niklaus
a572719484 Smaller grammar and formating fixes for the changelog 2017-01-27 11:19:37 +01:00
Michael Krasnyk
ad594cb2e4 Update review findings 2017-01-27 11:19:37 +01:00
Michael Krasnyk
6b143c5e1d Use duration in SegmentBlock for duration updates 2017-01-27 11:19:37 +01:00
Michael Krasnyk
25baf51a2c Add duration to edges and use it in table plugin 2017-01-27 11:19:37 +01:00
Michael Krasnyk
c059d15cb9 Added weight multipliers for speed and turn updates 2017-01-27 11:19:37 +01:00
Patrick Niklaus
279f8aabfb Allow specifing a weight for routing that is independent of duration 2017-01-27 11:19:37 +01:00
Michael Krasnyk
e463733138 Limit test names to 64 chars to avoid hitting windows MAX_PATH limit
also in the change this.child is reset to null in case of error.
2017-01-27 11:19:37 +01:00
Michael Krasnyk
7deff5837c Throw IO error if the number of read bytes does not match count
and the stream is in failed state
2017-01-27 11:19:37 +01:00
Emil Tin
46ac9d05d9 foot profile: fix missing tracktype/smothness settings 2017-01-27 09:45:02 +01:00
Moritz Kobitzsch
c7640903c3 don't emit invalid turns when having u-turns on ferries 2017-01-26 13:08:00 +01:00
Emil Tin
445225bf6d clean up lua debugging 2017-01-25 16:37:41 +01:00
Emil Tin
47b1a56b12 refactor foot profile (as was done for car) 2017-01-25 11:23:49 +01:00
Moritz Kobitzsch
b5e289adc3 3605 - fix error in treating end-of-road as choiceless (#3607) 2017-01-24 11:23:54 -08:00
Michael Krasnyk
e0a1a43449 Added maxspeed:conditional checker 2017-01-24 10:31:59 +01:00
Michael Krasnyk
337ecefa45 Added osrm-extract-conditionals tool 2017-01-24 10:31:59 +01:00
Michael Krasnyk
7961fa8863 Added conditional restrictions grammar 2017-01-24 10:31:59 +01:00
Michael Krasnyk
88eb9e5499 Added opening_hours grammar 2017-01-24 10:31:59 +01:00
Patrick Niklaus
df449d3b5c Merge pull request #3604 from Project-OSRM/update-boost-1.63
Updates Boost to 1.63 for Mason Build
2017-01-24 10:26:16 +01:00
Daniel Patterson
6f27aae022 Squashed 'third_party/mason/' changes from ed32b1d72..6b4c359bc
git-subtree-dir: third_party/mason
git-subtree-split: 6b4c359bca48b576c4a4732b4117130eaafbf6ad
2017-01-23 17:24:22 -08:00
Daniel Patterson
d8c54fb815 Merge commit '6f27aae022fd10bf7f709dae3233134cedc6d550' into update-boost-1.63 2017-01-23 17:24:22 -08:00
Daniel J. Hofmann
5c93609142 Updates Boost to 1.63 for Mason Build 2017-01-23 17:59:29 +01:00
Daniel J. Hofmann
c277b95f03 Implements Zero-Copy String Views onto Contiguous Memory, resolves #3265.
- http://www.boost.org/doc/libs/1_61_0/libs/utility/doc/html/string_ref.html
- http://en.cppreference.com/w/cpp/string/basic_string_view
2017-01-23 15:22:39 +01:00
Michael Krasnyk
b1f1c26703 Remove decltype(Value::source), fixes xcode 7.3 compilation 2017-01-23 15:17:08 +01:00
Daniel J. Hofmann
a5d0707dd0 Removes the -DBUILD_COMPONENTS option; on by default now.
Quick follow up for https://github.com/Project-OSRM/osrm-backend/pull/3570:
there is no reason not to build the `osrm-components` tool by defualt.

Backwards compatible. Users still specifying the option will see:

> Manually-specified variables were not used by the project:
>   BUILD_COMPONENTS
2017-01-23 12:15:03 +01:00
Moritz Kobitzsch
d129b0ef24 remove templates from routing algorithms 2017-01-21 23:59:15 +01:00
Daniel J. Hofmann
f2c3b9859e Rewrites the osrm-components tool to dump GeoJSON, resolves #2176 #1738 #1602
http://bl.ocks.org/d/9d6265b064c0f29a71503e0f6527769d
2017-01-20 17:50:06 +01:00
Michael Krasnyk
bb1f4a025a Merge pull request #3592 from Project-OSRM/merge/libosmium-2.11.0
Merge libosmium 2.11.0
2017-01-20 16:27:38 +01:00
Moritz Kobitzsch
8c36012653 remove CRTP leftovers in search algorithms 2017-01-20 14:11:16 +01:00
Michael Krasnyk
0c6dee4bef Squashed 'third_party/libosmium/' changes from d5ecf4d..c1f34c4
c1f34c4 Release v2.11.0
d3b72e0 Updated change log.
2982b8d Update embedded Protozero to version 1.5.1.
cc1ab2a Add non-const WayNodeList::operator[].
3da372e Add missing example to examples/README.md.
30604ba Add OSMIUM_USE_SLOW_MERCATOR_PROJECTION define.
47a92e0 Clearer CheckOrder handler doc.
f11106d Formatting fixes.
a870737 Use faster implementation of web mercator projection.
041bb42 Test cleanups.
8933bc5 Cleanup *Map::get() functions.
6b989ca Document that (Multipolygon)Collectors only work with unique Ids.
8fb5bd2 Updated included Protozero to version 1.5.0.
76e153d Removed Makefile.
35d7ec9 Update copyright date.
a7f8126 Rename guard define to common scheme.
a923c69 Cleanup I/O tests.
d353993 Add Map::get_noexcept() method for all index maps.
94fa5ac Add const overload for mmap_vector_base::operator[].
3cf9184 Add default constructed "invalid" Coordinates.
358f170 Add Tile constructor from web mercator coordinates.
006aa4c Add index::RelationsMap(Stash|Index) classes.
9cc842e Updated catch to v1.5.9.
bd8c3b6 Use initializer_list trick instead of recursive template.
2c82a6f Merge pull request #183 from daniel-j-h/rvalue-apply
0bf5404 Implements rvalue handler support for apply, resolves #180.
ccaab08 Merge pull request #182 from AMDmi3/freebsd-endianess
bffe626 Handle endianess on FreeBSD properly
7250222 Code formatting and test cleanup.
6652436 Merge pull request #179 from oxidase/add_match_key_std_regex
afadf5b Rename centroid variables and function in example.
8355284 Add envelope() functions to NodeRefList, Way, and Area.
fc83d2e Remove unnecessary include.
9ddd00e Add match_key<std::regex> tag
9c54a53 Update README. Moved some infos to manual.
89a90a6 Update readme and developer docs.
c3446ec Simplify subitem iteration code and made it more flexible.
542b07c Add some static_asserts.
f0fd690 Memory reporting on M68k doesn't work properly.
e8957c6 Compare doubles in test using Approx().
58ae4a6 Add amenity_list example.
53783f8 Fix doxygen config for reproducible builds.
de4e52d Release v2.10.3
0cc42a2 ObjectPointerCollection constructor can't be noexcept.
4472dfb Round out ObjectPointerCollection implementation and test it.
28cb35d Build with XCode 8 and GCC 6 on travis.
03e3e66 Upgrade to new protozero version 1.4.5.
2102c2f Add assertion in queue handling code.

git-subtree-dir: third_party/libosmium
git-subtree-split: c1f34c45507e233a2b9028663906679c610fe179
2017-01-20 14:05:21 +01:00
Michael Krasnyk
66cb75f4a3
Merge commit '0c6dee4befebf823d839d1092bcae79afbf4f12e' into merge/libosmium-2.11.0 2017-01-20 14:05:21 +01:00
Michael Krasnyk
49d3467ec7
Update Libosmium Dependency to 2.11.0 2017-01-20 14:02:12 +01:00
Michael Krasnyk
a48cf58468 Move IPC tools functionality into osrm-datastore 2017-01-20 12:40:37 +01:00
Michael Krasnyk
fbc7189cf8 Added speed round-off error test 2017-01-20 12:31:45 +01:00
Michael Krasnyk
e8167b2e4e Use round for float to fixed coordinate transformations 2017-01-20 12:31:45 +01:00
Michael Krasnyk
c03aa8a273 Regression test for #3516 2017-01-20 12:31:45 +01:00
Huyen Chau Nguyen
a40abacfca Refactors the Turn Handler's Fork Abstraction, resolves #3457. 2017-01-19 19:49:40 +01:00
Moritz Kobitzsch
b8beac2d00 unite process/shared_memory datafacades into a single type using an allocator scheme 2017-01-19 17:18:35 +01:00
Michael Krasnyk
75e0b5a5c4 Fix Lua static library linking 2017-01-19 17:06:00 +01:00
Michael Krasnyk
c03b230e84 Refactor ShMemIterator, resolves #3458 2017-01-19 15:30:18 +01:00
Moritz Kobitzsch
6b06c5bd32 fix emitting invalid turn types, now surfacing due to changes in obvious detection 2017-01-18 15:56:48 +01:00
Moritz Kobitzsch
226ee62981 refactor graph contractor for readability
move to a dedicated dijkstra, separate code and header
reduce heap size, we don't use more than 2000 nodes, so why allocate 170k?
2017-01-18 15:03:15 +01:00
Daniel J. Hofmann
fce3bb180c Provides OSRM_ASSERT_WITH_LOC macros for asserting with location, resolves #3533 2017-01-18 00:43:03 +01:00
Michael Krasnyk
1ae69fe40d Added missing backward_speed for cycleways 2017-01-17 12:51:38 +01:00
Daniel J. Hofmann
e4dc2aa45c Removes Base64 Unit Test Dead Code.
- https://github.com/Project-OSRM/osrm-backend/pull/2139
- 6c9ddde682
2017-01-17 12:50:53 +01:00
Michael Krasnyk
d0f1347ff1 Adjusted number of nodes in annotation, resolves #3515 2017-01-16 23:54:00 +01:00
Patrick Niklaus
70e899378d Replace shmctl with waiting on all on-Linux platforms 2017-01-14 01:14:29 +01:00
Patrick Niklaus
dbd70d4884 Throw exception with more helpful error message when shmctl fails 2017-01-14 01:14:29 +01:00
Michael Krasnyk
71044e88f3 try to fix npm tests on windows by direct data loading 2017-01-14 01:14:29 +01:00
Michael Krasnyk
b8f631f6f6 fake waiting by sleep on windows 2017-01-14 01:14:29 +01:00
Michael Krasnyk
3837f9d015 fix windows build 2017-01-14 01:14:29 +01:00
Patrick Niklaus
763ad0d047 Print warning on Windows that we can't wait for clients 2017-01-14 01:14:29 +01:00
Michael Krasnyk
b6f9ec2a33 make facades const to be consistent with const shmem block 2017-01-14 01:14:29 +01:00
Michael Krasnyk
5d3a348b76 removed stale code 2017-01-14 01:14:29 +01:00
Patrick Niklaus
104e23abf3 Restore --max-wait and file_lock for osrm-datastore 2017-01-14 01:14:29 +01:00
Patrick Niklaus
a7bb26f2d6 Remove unnecessary includes and rename in Engine 2017-01-14 01:14:29 +01:00
Michael Krasnyk
710ba20acc Add 1ms delay as a workaround for "faster" requests than facade update
in osrm-routed
2017-01-14 01:14:29 +01:00
Michael Krasnyk
fce8d72895 Change to condvar signaling if data region swapped 2017-01-14 01:14:29 +01:00
Michael Krasnyk
774b8688ca read_only if shmem size is 0, read_write otherwise 2017-01-14 01:14:29 +01:00
Michael Krasnyk
fe2beb6f68 Respect data constness in Write methods 2017-01-13 22:37:46 +01:00
Michael Krasnyk
71e7d6d6b8 Refactor R-Tree updates and edges loading 2017-01-13 22:37:46 +01:00
Michael Krasnyk
29f736f1c8 Make CSV parsing function generalized 2017-01-13 22:37:46 +01:00
Michael Krasnyk
bb4f13a47c Use internal logger instead of std stream 2017-01-13 19:55:25 +01:00
Moritz Seemann
bb0b03bbce fix: do not check datasource_indexes_path twice
In storage_config.cpp the file paths are validated, but
datasource_indexes_path got validated twice and datasource_names_path
not at all.
2017-01-13 11:12:02 +01:00
Moritz Seemann
59ad7dddb2 make osm_elements a loop variable, not a local variable
The vector osm_elements was created and destroyed in each loop
iteration. It can be kept and cleared instead.
2017-01-13 11:12:02 +01:00
Moritz Seemann
f12fdeb23e some comments for dynamic_graph.hpp 2017-01-13 11:12:02 +01:00
Moritz Seemann
f896aaf881 fix for DeallocatingVector::back
This method actually returned a reference to the one-past-the-last
element instead of the last element.
2017-01-13 11:12:02 +01:00
Moritz Seemann
a2a2cf84d1 fix: do not add duplicate edges
Previously duplicate edges were added if their weight was worse.
2017-01-13 11:12:02 +01:00
Moritz Seemann
4e897aad50 constexpr implies const, no need to state it twice 2017-01-13 11:12:02 +01:00
Moritz Seemann
5e8bdbfa0c fix to prevent (very unlikely) overflow of originalEdges
If originalEdges gets initialized with 1 << 28, it will overflow and
thereby be set to 0.
Which defeats the point of checking for overflows in the first place.
2017-01-13 11:12:02 +01:00
Daniel J. Hofmann
fd57c5b48b Supports destination:street, resolves #3541 2017-01-13 11:07:01 +05:30
Michael Krasnyk
1d4d3b80b5 Fix possible division by zero by clamping latitude to 85.05°
Resolves #3530
2017-01-12 16:44:58 +01:00
Daniel J. Hofmann
f82740ed93 Logs the current thread's id in assertions and for requests, resolves #3534 2017-01-12 16:43:03 +01:00
Moritz Kobitzsch
c1f833c80f fix forks exiting a ferry 2017-01-12 09:58:51 +01:00
Daniel J. Hofmann
813e16b9b4 Fixes default profile symlink not being available
Adaption for b8e13d9b - people are running into this.
2017-01-12 09:34:38 +05:30
Moritz Kobitzsch
06ef3053de fix coordinate assertion for walking profile with steps 2017-01-11 22:44:23 +01:00
Mathias Gug
9fa7e6c74f Add BUILD_PACKAGE option. 2017-01-11 03:09:04 +01:00
Mathias Gug
a7d63283ab Update Package Contact information. 2017-01-11 03:09:04 +01:00
Mathias Gug
78a443bfb2 Add changelog entry. 2017-01-11 03:09:04 +01:00
Mathias Gug
84b8d3cfb9 Support rpm packages. 2017-01-11 03:09:04 +01:00
Daniel J. Hofmann
b3483f95a7 Fixes Sliproads onto a roundabout to be classified as sliproads, resolves #3540 2017-01-09 17:46:05 +01:00
Moritz Kobitzsch
32f63e5e0c add tests for dedicated turn roads 2017-01-09 17:46:05 +01:00
Daniel J. Hofmann
185e9dc7f3 Removes mlock for osrm-routed, closes #3484 2017-01-09 16:25:28 +01:00
Patrick Niklaus
6794f52cb2 Merge pull request #3526 from Project-OSRM/llvm-391
Upgrades LLVM 3.8.1 -> LLVM 3.9.1 on Travis
2017-01-09 16:23:10 +01:00
Daniel J. Hofmann
06e6b9ea6f Squashed 'third_party/mason/' changes from cf3561b..6b4c359
git-subtree-dir: third_party/mason
git-subtree-split: 6b4c359bca48b576c4a4732b4117130eaafbf6ad
2017-01-09 14:26:44 +05:30
Daniel J. Hofmann
93d89ad686 Updates vendored mason to v0.4 for LLVM 3.9.1 2017-01-09 14:26:44 +05:30
Daniel J. Hofmann
7c8176b077 Updates mason to v0.4 in dependency script 2017-01-09 14:26:26 +05:30
Daniel J. Hofmann
7ef95e9918 Upgrades LLVM 3.8.1 -> LLVM 3.9.1 on Travis
LLVM 3.9.1 is now packaged in mason: https://github.com/mapbox/mason/issues/308
Upgrade our Clang compiler to the latest stable release.

Keeps clang-format at 3.8.1 for consistency.
2017-01-09 14:25:34 +05:30
Huyen Chau Nguyen
f313cb9913 Refactor fork handling in guidance (#3264)
refactor fork handler
2017-01-07 14:13:32 +01:00
Moritz Kobitzsch
15c8fd326f Remove assertions that could be triggered by bad data. (#3469)
When two consecutive nodes have identical coordinates, there is no valid
bearing.  For now, make equal nodes have bearing 0.

Full fix still needs to be done via https://github.com/Project-OSRM/osrm-backend/issues/3470.
2017-01-06 17:10:02 -08:00
Daniel Patterson
f7e8581a1b Replace fingerprint with semver-based scheme. (#3467) 2017-01-06 13:45:08 -08:00
Daniel J. Hofmann
c01ea2ea3e Disables link-time optimization unless -DENABLE_LTO=ON is passed.
This disables the `-flto` LTO flag by default since we're seeing
segfaults in compiler lto plugins, binutils and linker errors again and
again for various clang / gcc / binutils combinations.

Pass `-DNEBALE_LTO` to `cmake` in order to re-enable LTO.

LTO situation in short:
- LTO does not work at all for gcc<4.9
- With gcc>=4.9 the "slim" LTO format is getting used dumping IR
- Older binutils need LTO plugins which know how to read this IR
- Recent binutils handle this format all by themselves
- LLVM is more or less the same with some Clang versions segfaulting

If you need the performance benefit of LTO, make sure your compiler and
binutils are up to date and see for yourself if LTO builds work for you.

References:
- https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ
- https://github.com/Project-OSRM/osrm-backend/pull/3481#issuecomment-270618997
- https://github.com/Project-OSRM/osrm-backend/issues/3501
- https://github.com/Project-OSRM/osrm-backend/issues/3441

(and a ton of other LTO tickets if you search for them)
2017-01-06 16:49:49 +01:00
Daniel J. Hofmann
1153b78c06 Fixes various compiler diagnostics
Found with LLVM 3.9.1 and then fixed the most severe categories.
2017-01-06 16:47:52 +01:00
Daniel J. Hofmann
b5d5f309a3 Consider number of lanes to cross, resolves #3025.
Lane Anticipation currently triggers on quick steps with lanes. This
changeset makes the "quick" part more dynamic by taking lanes left and
right of the turn into account. The reasoning for this is as follows.

The user can drive on the leftmost or rightmost lane and has to cross
all lanes left or right of the turn, respecitvely.

We scale our threshold appropriately, which now means the threshold
describes the duration the user needs for crossing _a single lane_.

Note: this is a heuristic and assumes the worst case. Which in my
opinion is fine to do since triggering Lane Anticipation in complex
scenarios is desirable.
2017-01-06 12:44:40 +01:00
Daniel J. Hofmann
5100f2cc7b Guards against no lanes for lanes left and right of turn, resolves #3518 2017-01-06 12:44:02 +01:00
Moritz Kobitzsch
f6fef5c166 refactor graph contraction: flush moved into dedicated function 2017-01-05 16:28:38 +01:00
Daniel J. Hofmann
559c88b36d Adds runtime alignment assertions, see #3267 2017-01-05 16:27:53 +01:00
Michael Krasnyk
7dea7476f1 Removed unused structure and fixed "multi-line comment" warning 2017-01-05 12:59:12 +01:00
Michael Krasnyk
dc81f581a0 [skip ci] Added info to CONTRIBUTING.md about automatic format checks 2017-01-04 17:31:58 +01:00
FILLAU Jean-Maxime
300283d572 Adding a new command line option osrm-extract --with-osm-metadata
This keep the metadata reader flag disabled by default unless explicitly specified.

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-01-04 14:35:45 +01:00
FILLAU Jean-Maxime
aad2124faa Adding nodes's and ways's version access in lua binding.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-01-04 14:35:45 +01:00
Michael Krasnyk
aced058c4a Use clang-format from mason 2017-01-04 08:46:16 +01:00
Michael Krasnyk
24ab71a346 Fix c++ formatting 2017-01-04 08:46:16 +01:00
Michael Krasnyk
2640a319c1 Wrap way.nodes() returned reference into sol::as_table 2017-01-04 08:29:27 +01:00
Moritz Kobitzsch
e6ff17ab2a refactor merging of segregated roads
adjust to generalFindMaximum function
moved parallel detection to ratio/absolute based regression testing
considerably improved detection quality using normalised regression lines
only follow initial direction/narrow turns for parallel detection
2017-01-03 12:32:51 +01:00
Patrick Niklaus
f7ad2e1e26 Don't retain SharedDataFacade between queries (#3485)
* Don't retain SharedDataFacade between queries

* More caching code
2017-01-03 12:06:55 +01:00
Daniel J. Hofmann
2ed6b181c8 Reworks the Readme Landing Page 2017-01-03 11:06:07 +01:00
Michael Krasnyk
f48bbb78de Enable npm and library tests on windows 2017-01-03 10:24:48 +01:00
Michael Krasnyk
bd2a5ebe10 Don't report error if osrm-routed was killed by js script 2017-01-03 10:24:48 +01:00
Michael Krasnyk
f8499957fa Unhandled exceptions lead to error 0xC0000409 on windows 2017-01-03 10:24:48 +01:00
Michael Krasnyk
5db134bbba Help strings may contain windows extensions 2017-01-03 10:24:48 +01:00
Michael Krasnyk
8645d8c7fc Make osrm::util::range a model of SinglePassRangeConcept
References:
- http://www.boost.org/doc/libs/1_63_0/libs/range/doc/html/range/concepts/single_pass_range.html
2017-01-03 10:22:03 +01:00
Daniel J. Hofmann
b8e13d9b1b Removes Profile Symlink 2017-01-03 10:14:51 +01:00
Jihyun Yu
421caa1856 Fix copying vector on std::sort comparator (#3504) 2016-12-30 13:57:21 -08:00
Michael Krasnyk
ed9d10e96c Tests for profile API version 2016-12-23 15:02:10 +01:00
Patrick Niklaus
0f3a463854 Add api_version gloabal variable to profiles
Currently only `0` is supported (the default).
2016-12-23 15:02:10 +01:00
Moritz Kobitzsch
b9b52cb857 clean-up unused headers, use NoTurn for ferries instead of suppressed 2016-12-23 15:01:02 +01:00
Daniel J. Hofmann
9af67c5a9f Refactors Karen's work a bit 2016-12-23 15:01:02 +01:00
karenzshea
8ffe915395 do not emit turns on ferries 2016-12-23 15:01:02 +01:00
Michael Krasnyk
b376c97db8 Join LAYOUT and DATA shared memory blocks into REGION 2016-12-23 11:56:22 +01:00
Daniel J. Hofmann
7b11cd3a11 Makes Types in Squared Dist Calculation Explicit, see #3483. 2016-12-22 15:43:04 +01:00
Michael Krasnyk
76de3b6ace Make a hard reset of named barrier mutexes on signal 2016-12-22 15:13:12 +01:00
Moritz Kobitzsch
bc081b7132 refactor route step / intermediate intersections
rename intersection (engine version) to IntermediateIntersection
follow coding convention for existing functions, move invalidate into routeStep
moved elongate into route step
move forward-step-signage into route step
replace post-processings `forwardInto` with `RouteStep` functionality. Don't change maneuver in step
separete declaration and implementation
2016-12-22 08:33:27 +01:00
Patrick Niklaus
3cbac0f012 Revert "Smarter search radius formula for map matching"
This reverts commit b73c59088c.
2016-12-21 22:41:48 -08:00
Patrick Niklaus
f40b34af9d Revert "Fix capture"
This reverts commit 4f81e31d63.
2016-12-21 22:41:42 -08:00
Patrick Niklaus
cc14fb8bff Revert "Hardcode search radius parameters"
This reverts commit 2c9e18d5a9.
2016-12-21 22:41:34 -08:00
Patrick Niklaus
c5e3fa916f Revert "Fix call to std::min"
This reverts commit 8bb183bc8c.
2016-12-21 22:41:22 -08:00
Moritz Kobitzsch
dff7fe214b don't assign exit in arrive when ending in roundabout 2016-12-21 17:48:23 +01:00
Michael Krasnyk
3b2ca720a8
Revert "Make a hard reset of named barrier mutexes on signal"
This reverts commit df4231341f.
2016-12-21 13:48:16 +01:00
Michael Krasnyk
df4231341f
Make a hard reset of named barrier mutexes on signal 2016-12-21 13:37:16 +01:00
Moritz Kobitzsch
0a2f934c87 add test for falsely classified obvious turn (#3364) 2016-12-20 11:55:10 -08:00
Moritz Kobitzsch
3721f8c887 test showing failure to unpack route with u-turns at both ends 2016-12-20 17:41:43 +01:00
Moritz Kobitzsch
1ba5ff44cc reduce warnings when compiling tests, add constructor to base parameters, fixes gcc49 unit tests building 2016-12-19 14:24:17 -05:00
Daniel J. Hofmann
5ecd2e4c67 Fixes GCC 4.9's protected keywork issues 2016-12-19 14:22:17 +01:00
Daniel J. Hofmann
b1f6797aab Adds generate_hints=true for dropping hints in response, resolves #1789.
Adds an `generate_hints=false` option which lets us skip generating and
emitting hints for Waypoints. This can be used to decrease the response
size when the user does not need hints anyway.

We should think about making `false` the default here in v6.
2016-12-19 12:09:36 +01:00
Moritz Kobitzsch
f04d146ca3 improve ascii art reflecting tunnels 2016-12-19 09:57:34 +01:00
Kajari
8c50a42ec4 add ascii art to a set of tests 2016-12-19 09:57:05 +01:00
Patrick Niklaus
c4b3cdfd80 Fix changing shared memory in multi-process setup (#3462)
This change fixes two bugs:

1. A dead-lock that occurs between osrm-datastore and libosrm when an
   old dataset is free during a data update. This happened because the
   mutexes where acquired in a different order.

2. A region is deleted eventhough it is still in use. This happens when
   libosrm gets overtaken by osrm-datastore, so the new dataset is in
   the same region the old one was.
2016-12-16 13:50:17 -08:00
FILLAU Jean-Maxime
37051e1583 Adding the location validity access for lua scripting.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2016-12-16 16:02:24 +01:00
Daniel Patterson
d3ef993d5f Bump SOL2 to v2.15.5 to fix OSX compilation problems. 2016-12-16 10:13:33 +01:00
Patrick Niklaus
9832825abd Merge pull request #3451 from Project-OSRM/update/mason
Update mason to v0.3.0 and change update script
2016-12-15 14:28:14 +01:00
Moritz Kobitzsch
d584bcad11 fix roundabout handling with lanes
instead of artificially removing lanes from a roundabout, we don't assing them in the first place.
this also prevents a problem where we would end up collapsing turns with lanes in a roundabout
2016-12-15 13:07:26 +01:00
Daniel J. Hofmann
e48ca65af4 Advanced Roundabouts
These kind of roundabouts came up during Lane Handling for roundabouts.
They're called Turbo-roundabouts or Turbine-roundabouts and are very
popular e.g. in Germany and the UK.

Seems like our roundabout handler sometimes is getting confused.

Trying to figure out why, and codifying some scenarios for cucumber.

References:
- https://github.com/Project-OSRM/osrm-backend/pull/2693
2016-12-15 13:07:26 +01:00
Michael Krasnyk
f429e08851 Enforce Boost>=1.62 for MSVC
Reference:
https://github.com/Project-OSRM/osrm-backend/issues/3088#issuecomment-256485167
2016-12-15 12:47:50 +01:00
Daniel J. Hofmann
de062d4ca3 Explain Workaround for Broken Setups to Users 2016-12-15 12:47:50 +01:00
Daniel J. Hofmann
d83ab9d905 Enforces Boost>=1.54 requirement with CMake 2016-12-15 12:47:50 +01:00
Daniel J. Hofmann
4618b502ac Enforces GCC>=4.9 and Clang>=3.4 requirement with CMake 2016-12-15 12:47:50 +01:00
Daniel J. Hofmann
94854b5c90 Adds barrier=gate regression tests, see #581 2016-12-15 12:03:24 +01:00
Patrick Niklaus
f8dd965435 Squashed 'third_party/mason/' content from commit cf3561b
git-subtree-dir: third_party/mason
git-subtree-split: cf3561bf78cb146821dba3d95c308fc44db05f46
2016-12-15 10:31:15 +00:00
Patrick Niklaus
6e29f9889b Merge commit 'f8dd96543542220181c76afb8c084f4908213fb5' as 'third_party/mason' 2016-12-15 10:31:15 +00:00
Patrick Niklaus
48d4e91d98
Change the update script to allow recreation 2016-12-15 10:30:51 +00:00
Patrick Niklaus
708ac04562
Remove old mason 2016-12-15 10:28:43 +00:00
Patrick Niklaus
38b2ad298d
Update mason to 0.3.0 2016-12-15 10:28:43 +00:00
Daniel Patterson
a51ef67db8 Use common function for clamping logic for all user-visible bearings. 2016-12-15 10:59:17 +01:00
Moritz Kobitzsch
67ce19cb14 fix problem at the source 2016-12-15 10:59:17 +01:00
Daniel Patterson
1b51163b1d Clarify API and ensure bearings returned to users are in the range 0-359 2016-12-15 10:59:17 +01:00
Michael Krasnyk
84b618ed1a Add headers consistency check 2016-12-15 10:58:17 +01:00
Moritz Kobitzsch
dc8e6bd8d9 use correct type in graph contractor to avoid overflows in nodes 2016-12-15 10:56:07 +01:00
karenzshea
68e38880df switch back to lua based env naming 2016-12-15 10:55:16 +01:00
karenzshea
d5904d5756 increase template depth on clang and gcc builds 2016-12-15 10:55:16 +01:00
Daniel J. Hofmann
0f59b78c02 Rewrite lua bindings using sol interface 2016-12-15 10:55:16 +01:00
Daniel J. Hofmann
6e7fe5feb0 Clean plate: luabind ripped out and sol2 basic integration 2016-12-15 10:55:16 +01:00
Daniel Patterson
3dfbf42e61 Don't mark all lanes as designated when there are blank lane specifiers in the tag. 2016-12-15 10:55:16 +01:00
Daniel Patterson
f88f51fd98 Log some memory usage statistics after preprocessing tasks. 2016-12-13 21:59:12 +01:00
Daniel J. Hofmann
98659fb0a0 Adds failing tests for directional access overrides, discovered in #3345 2016-12-13 17:37:42 +01:00
Daniel J. Hofmann
8a1afe456f Works around Unreachable Warning for Debug Build 2016-12-13 12:41:25 +01:00
Patrick Niklaus
f1384f5e44 Merge pull request #3434 from Project-OSRM/fix/invalid-assertions
fix invalid assertion in coordinate_extractor
2016-12-12 19:19:47 +01:00
Moritz Kobitzsch
1cd5394a16 fix invalid assertion in coordinate_extractor 2016-12-12 10:12:32 +01:00
Daniel Patterson
8c7f744b1a Update node weights if traffic data is applied. 2016-12-11 16:02:58 +01:00
Patrick Niklaus
896445a337
Fix path to node binaries 2016-12-09 16:43:32 +00:00
Patrick Niklaus
8c21e1267e
nvm -> install_node 2016-12-09 16:30:14 +00:00
Patrick Niklaus
ad3fd46da5
Try to use mapbox node mirror 2016-12-09 15:28:28 +00:00
Huyen Chau Nguyen
62f0e11bfa assert that there is an open logger file when trying to log geojson output (#3417) 2016-12-09 14:58:20 +01:00
Patrick Niklaus
03d653c0bb Fix removing shared memory segments in a multi-process setup 2016-12-09 12:18:05 +01:00
Daniel J. Hofmann
cbfb055f81 Changes Single Coordinate Geoms from Point to LineString, closes #3425. 2016-12-09 11:53:06 +01:00
Moritz Kobitzsch
2288704bb5 don't assign unused name to exception 2016-12-08 13:35:28 +01:00
Daniel J. Hofmann
97dcf4eef9 Fixes Compiler Crashes on Windows 2016-12-08 13:23:21 +01:00
Daniel Patterson
17e15033e1 Log helpful error message if mmap fails. 2016-12-07 22:03:49 +01:00
Daniel J. Hofmann
875f482203 Refactors and improves the Sliproad Handler, resolves #3109 2016-12-07 19:22:03 +01:00
Moritz Kobitzsch
df3c39cef5 clean-up guidance code/code in general
removes duplicated includes
removes unused includes
eliminates dedicated toolkits that resulted in circular dependencies
moves functionality close to data, where possible
2016-12-07 12:10:56 +01:00
Moritz Kobitzsch
a28a20a1ba fix errors in coordinate extractor due to duplicated coordinates
fix offset calculation in curve detection
2016-12-07 11:33:58 +01:00
Daniel Patterson
17a18b5c7c Revert "Add simple code review checklist to PR template."
This reverts commit 3f07a830e6.
2016-12-06 17:21:38 -08:00
Daniel Patterson
423c083038 Refactor logging, improve error handling workflow, clang-format. (#3385) 2016-12-06 12:31:13 -08:00
Daniel Patterson
468d8c0031 Refactor logging, improve error handling workflow, clang-format. (#3385) 2016-12-06 12:30:46 -08:00
Pepijn Schoen
6f4c6e84ae Handle file output through a FileWriter, align interfaces for FileWriter and FileReader 2016-12-06 15:59:12 +01:00
Michael Krasnyk
4b1aae40af Decoding should not fail for incomplete polyline strings (#3404)
Possible fails in
1) correct lattitude, longitude is missing
2) no end-of-number (0 5th bit) marker in the last character
2016-12-06 14:09:18 +01:00
Daniel J. Hofmann
0e6863aec1 Removes access and service restriction list from bike and foot profile 2016-12-05 14:15:47 +01:00
Daniel J. Hofmann
949d505783 Removes access_restricted flag internally 2016-12-05 14:15:47 +01:00
Emil Tin
d11927046f car profile: remove use of is_access_restricted flag 2016-12-05 14:15:47 +01:00
Emil Tin
9461c83511 car profile: handle forward/backward access 2016-12-05 14:15:47 +01:00
Emil Tin
532cbfce13 profiles: Directional helper, some car refactoring 2016-12-05 14:15:47 +01:00
Michael Krasnyk
0fbd18b0dd Make absolute fixtures path 2016-12-04 16:34:42 +01:00
Daniel Patterson
3f07a830e6 Add simple code review checklist to PR template.
Add some checkboxes for common, mechanical parts that we should aim to hit for all PRs.
2016-12-02 23:18:57 -08:00
Moritz Kobitzsch
24b01fae00 fix extraction of coordinate along a way (#3397)
Also fix interpolation when coordinates are duplicated at the end of the vector
2016-12-02 13:11:04 -08:00
Daniel Patterson
0817cd6dfd Enforce iteration order so that tiles are encoded consistently on all platforms (#3393) 2016-12-02 08:59:39 -08:00
Daniel J. Hofmann
9d8b92f418 Abstracts away over differences in IntersectionView and Intersection.
Usage:

    struct MyIntersection : EnableIntersectionOps<MyIntersection> {

    };

Done.

We require MyIntersection having at least the member attributes from
IntersectionViewData but don't enforce a inheritance hierarchy.
2016-12-02 12:32:07 +01:00
Daniel Patterson
928a6f0c7d Variant got re-packaged, need to update search paths. (#3392) 2016-12-01 16:59:29 -08:00
Daniel Patterson
29b3caf529 Upgrade to mapbox/variant 1.1.4 2016-12-01 15:44:27 -08:00
Patrick Niklaus
20c8ac0272
Bump osrm version to 5.5 2016-12-01 22:12:28 +00:00
Patrick Niklaus
c99c8bccbc Make the binutil detection work the same for clang and gcc
This uses the cmake internal find_program that will utilize the PATH at
configuration time. This way we don't need to pass CXXFLAGS to clang.
2016-12-01 21:55:17 +01:00
Patrick Niklaus
735191255d No need to set ccache explicitly if its in the path 2016-12-01 21:55:17 +01:00
Dane Springmeyer
da6ca640a7 only install/enable binutils gold and llvm-ar when building in Release 2016-12-01 21:55:17 +01:00
Dane Springmeyer
f6f7a9290f no need for llvm package 2016-12-01 21:55:17 +01:00
Dane Springmeyer
9687a9325c remove llvm-nm 2016-12-01 21:55:17 +01:00
Dane Springmeyer
43566bfd14 support -flto with clang++ 2016-12-01 21:55:17 +01:00
Michael Krasnyk
110e6c3689 Fix failing on windows io read test (#3390) 2016-12-01 11:44:28 -08:00
Moritz Kobitzsch
561b7cc58e Rember Intersection Shapes
Changes the processing order in the edge based graph factory.
Instead of iterating over all outgoing edges in order, we compute the edge
expanded graph in the order of intersections.
This allows to remember intersection shapes and re-use them for all possible ingoing edges.

Also: use low accuracry mode for intersections degree 2 intersections

We can use lower accuracy here, since the `bearing`
after the turn is not as relevant for off-route detection.
Getting lost is near impossible here.
2016-12-01 15:24:20 +01:00
Moritz Kobitzsch
5775679f64 fix coordinate extraction / errors in offset detector 2016-12-01 12:16:25 +01:00
Daniel Patterson
560d8ffec0 Restructure API docs so that they can be formatted with Docbox. (#3355)
Generate Docbox browseable HTML with `npm run build-api-docs`
2016-11-30 19:38:53 -08:00
Daniel Patterson
2544c3f20e Update changelog for FileReader change. 2016-11-30 19:10:44 -08:00
Daniel Patterson
5a311012af Consolidate file reading through the new FileReader class/interface. (#3321) 2016-11-30 19:08:01 -08:00
Karen Shea
ef087f963d Merge pull request #3324 from Project-OSRM/constrain-staggering
Constrain staggered intersection detection by mode change and intermediary intersections
2016-11-30 07:35:17 -05:00
Moritz Kobitzsch
a1127c3e09 reduce numbers of intersections in findNextIntersection, don't normalise for turn lanes 2016-11-30 10:21:53 +01:00
Patrick Niklaus
01a57ff1d8 Merge pull request #3367 from Project-OSRM/fix/rpath4all
Rework RPATH and building as subproject
2016-11-29 23:02:57 +01:00
karenzshea
37824e2954 don't staggered intersections on intermediary mode changes 2016-11-29 14:39:16 -05:00
Patrick Niklaus
4489c8dfc2
Expose LibOSRM find_package style variable to work as subproject 2016-11-29 15:38:51 +00:00
Patrick Niklaus
ee63e39ff5
Add $ORIGIN and @executable_path to RPATH 2016-11-29 15:37:11 +00:00
karenzshea
ce5bcc797b opening typo 2016-11-29 09:39:05 -05:00
Daniel J. Hofmann
fe5cc55b0e support junction = circular in all profiles, add additional tests
References:
- https://wiki.openstreetmap.org/wiki/Tag:junction%3Dcircular
- https://lists.openstreetmap.org/pipermail/tagging/2016-November/030520.html
- https://github.com/Project-OSRM/osrm-backend/issues/3361
2016-11-29 13:44:32 +01:00
Moritz Kobitzsch
12d58ace10 add support for junction=circular, allowing named circular junctions to be treated as rotaries 2016-11-29 13:44:32 +01:00
Moritz Kobitzsch
4636aaabfe make can be ignored false by default 2016-11-29 11:47:35 +01:00
Moritz Kobitzsch
186cc8340a handle service roads next to roundabouts - ambiguous exit... :( 2016-11-29 11:47:35 +01:00
Michael Krasnyk
e343f71541 Refactor Hilbert values computation 2016-11-28 14:17:12 +01:00
Michael Krasnyk
0df0d31d83 Fix nodes file reading in rtree benchmark 2016-11-28 14:17:12 +01:00
Moritz Kobitzsch
aaf42a1caf add a follow-up section on testing to help decide what to do on guidance tests 2016-11-24 10:12:14 +01:00
Moritz Kobitzsch
d02dd67e95 fix update to length cache 2016-11-23 11:27:59 +01:00
Moritz Kobitzsch
a49bd70985 add low precision intersection_generator mode for faster graph traversal 2016-11-22 18:25:19 +01:00
Dane Springmeyer
b2c27fbd25 test xcode8.2 2016-11-22 18:03:51 +01:00
karenzshea
9fe0e91d92 add tests for bridleways 2016-11-22 10:18:55 +01:00
Daniel J. Hofmann
08b7270f5c Fixes accidentally registering types twice to Luabind, closes #2811. 2016-11-22 10:09:08 +01:00
Kajari Ghosh
fc52dd85fe refactor graph_loader (#3333)
Refactors the GraphLoader class to use the safer FileReader wrapper for better error handling.
2016-11-21 17:32:00 -08:00
Karen Shea
6d961d4a15 Merge pull request #3217 from Project-OSRM/refactor/obviousness
Refactor find obvious turn handling
2016-11-21 14:50:44 -05:00
karenzshea
0bd08224bf add comments, refactor find obvious turn 2016-11-21 13:16:30 -05:00
Daniel J. Hofmann
2a383efbf6 Makes Throughput Numbers Integral Types 2016-11-21 12:41:25 +01:00
Patrick Niklaus
b84d70d305 Add regression test for nil values 2016-11-21 12:17:44 +01:00
Patrick Niklaus
3bade8625f Don't crash on assigning nil to a string in lua 2016-11-21 12:17:44 +01:00
Patrick Niklaus
844300b95a Print number of used jobs 2016-11-19 17:02:31 +01:00
Patrick Niklaus
dd811539a3 Remove overriding c++ compiler from cmake on mason build 2016-11-19 17:02:31 +01:00
Patrick Niklaus
79c2ae46d8 Determine number of jobs over ncpu + 1 2016-11-19 17:02:31 +01:00
Patrick Niklaus
d023e7c581 Don't use mason clang on OSX 2016-11-19 17:02:31 +01:00
Patrick Niklaus
4ccb08983f Fixed installing clang for mason builds 2016-11-19 17:02:31 +01:00
Patrick Niklaus
8c941d1344 Don't install clang when CLANG_VERSION is not set 2016-11-19 17:02:31 +01:00
Patrick Niklaus
841c032a0d Don't warn in example on 32bit only print message 2016-11-19 17:02:31 +01:00
Patrick Niklaus
a764fd1f29 Don't expose all OSRM flags only the ones needed by external code 2016-11-19 17:02:31 +01:00
Patrick Niklaus
3687864cc1 Only run OSX in release 2016-11-18 17:49:05 +01:00
Dane Springmeyer
4b5466629f test with assertions+release on travis 2016-11-18 17:49:05 +01:00
Patrick Niklaus
f19bf70b55 Account for imprecision in distance computation 2016-11-18 17:46:32 +01:00
Patrick Niklaus
24fa94af59 Remove obsolete test code 2016-11-18 17:46:32 +01:00
Patrick Niklaus
95a584a30d Make rounding when computing PhantomNode weight symmetric
Resolves a problem where the duration in forward and backward direction
was slightly different.
2016-11-18 17:46:32 +01:00
karenzshea
6ba36a2bc7 test and control for pushing both ways 2016-11-18 10:13:38 -05:00
karenzshea
039989a339 fix overlapping roads 2016-11-18 09:58:03 -05:00
karenzshea
a7559077a0 add modes columns to bike tests 2016-11-18 09:21:48 -05:00
Daniel J. Hofmann
bbe80192aa Staggered Intersections for Bike 2016-11-18 08:52:48 -05:00
karenzshea
9b16b757a4 halfway staggered intersection test 2016-11-18 08:52:48 -05:00
karenzshea
3680fc9d90 add check/test for intermediary intersections 2016-11-18 08:52:47 -05:00
karenzshea
836e8bdff0 don't collapse with mode changes 2016-11-18 08:52:47 -05:00
Patrick Niklaus
3d4b39be7d Include changed car.lua dependencies in changelog 2016-11-18 00:21:34 +01:00
Emil Tin
193dfd9d8b lua: add changelog item 2016-11-18 00:21:34 +01:00
Emil Tin
305e813489 lua: improve naming 2016-11-18 00:21:34 +01:00
Emil Tin
a5756fc764 fix c++ formatting 2016-11-18 00:21:34 +01:00
Emil Tin
f5bf788814 lua: simplify destination helper 2016-11-18 00:21:34 +01:00
Emil Tin
00f7d7776d lua: refactor destination helper 2016-11-18 00:21:34 +01:00
Emil Tin
dce685c780 ensure we don't pass empty tags to LUA 2016-11-18 00:21:34 +01:00
Emil Tin
173a39fd8b lua: fix typo 2016-11-18 00:21:34 +01:00
Emil Tin
5d564ee510 lua: Set and Sequence 2016-11-18 00:21:34 +01:00
Emil Tin
24c2708d1e lua: eliminte tag cache, simplify tag checks 2016-11-18 00:21:34 +01:00
Emil Tin
d87a972c66 don't return empty tags strings to lua 2016-11-18 00:21:34 +01:00
Emil Tin
f90736b6b3 lua: handle_hov() 2016-11-18 00:21:34 +01:00
Emil Tin
9aeb3086cb lua: cleanup handle_blocking(), move common cases up early 2016-11-18 00:21:34 +01:00
Emil Tin
9e361a8178 lua: exit earlier when possible 2016-11-18 00:21:34 +01:00
Emil Tin
c3aeef4e09 lua: eliminate TagCache.set_tag() 2016-11-18 00:21:34 +01:00
Emil Tin
50090e6447 lua: some cleanup 2016-11-18 00:21:34 +01:00
Emil Tin
b9e5d26e3a remove dead code 2016-11-18 00:21:34 +01:00
Emil Tin
184cfab33b increase performance by passing vars instead of a table 2016-11-18 00:21:34 +01:00
Emil Tin
fd95b2da76 streamline way_function 2016-11-18 00:21:34 +01:00
Emil Tin
ce04a608b8 lua: refactor car.lua into smaller functions 2016-11-18 00:21:34 +01:00
Emil Tin
cff69178e8 lua: simple tag cache enabling factoring way_function into smaller functions 2016-11-18 00:21:34 +01:00
Emil Tin
6c682b2258 lua: helpers for debugging 2016-11-18 00:21:34 +01:00
Alex Barth
c1087eaecc Update http.md 2016-11-17 23:59:18 +01:00
Kerrick Staley
8bb183bc8c Fix call to std::min 2016-11-17 17:56:23 +01:00
Kerrick Staley
15359befdc Update docs 2016-11-17 17:56:23 +01:00
Kerrick Staley
2c9e18d5a9 Hardcode search radius parameters 2016-11-17 17:56:23 +01:00
Kerrick Staley
4f81e31d63 Fix capture 2016-11-17 17:56:23 +01:00
kerrick-lyft
b73c59088c Smarter search radius formula for map matching 2016-11-17 17:56:23 +01:00
Michael Krasnyk
44e4728bde Added gcc 4.9 release build 2016-11-17 16:02:56 +01:00
Michael Krasnyk
ba2629456f Added a copy of std::align due to missing implementation in gcc < 5
References:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
2016-11-17 16:02:56 +01:00
Daniel J. Hofmann
1b4779a58c Avoids Shuffling Data Around for Nothing, closes 3306 2016-11-17 12:51:18 +01:00
Michael Krasnyk
1eaf9f3269 Fix ubsan runtime error: left shift of negative value -9 2016-11-16 12:12:20 -08:00
Daniel J. H
73e365d398 Conditionally checks std::is_trivially_copyable only if available. (#3327) 2016-11-16 12:07:45 -08:00
Michael Krasnyk
d5bf508046 Fix alignments in shared facade via alignof/std::align 2016-11-16 18:20:19 +01:00
Moritz Kobitzsch
47b097038a fixes warning due to type only used in debug 2016-11-16 12:20:05 +01:00
Moritz Kobitzsch
a4264c7849 fix node-based-graph-walker 2016-11-16 12:03:59 +01:00
Daniel J. H
463228d0bf Merge pull request #3323 from Project-OSRM/libosmium-2.10.2
Osmium 2.10.2, resolves #3303
2016-11-16 12:01:56 +01:00
Daniel J. Hofmann
6f885b5bdb Squashed 'third_party/libosmium/' changes from 40c4a48..d5ecf4d
d5ecf4d Release v2.10.2
7c04564 Update embedded protozero to version 1.4.4.
e209d81 Write code for 64bit systems, so it compiles on 32bit w/o warning.
640217c Fix buffer overflow.
8b4620f Release v2.10.1
38bf3ab Update protozero to 1.4.3.
f81b3c6 Fix IdSet on 32 bit.
5ff4753 Workaround so the test works on 32bit systems.
7542694 Include our endian.hpp before using the endianness test macros.

git-subtree-dir: third_party/libosmium
git-subtree-split: d5ecf4df90e2995c816886d2a002c3d3de7062ee
2016-11-16 11:33:59 +01:00
Daniel J. Hofmann
1dde5d288d Merge commit '6f885b5bdb2d220eb49e7d0fabcd520f56f2b419' into libosmium-2.10.2 2016-11-16 11:33:59 +01:00
Daniel J. Hofmann
820feb3a04 Update Libosmium Dependency Script to 2.10.2 2016-11-16 10:58:52 +01:00
Daniel Patterson
46b00e1378 Update docs for tile plugin. 2016-11-15 18:56:03 -08:00
Daniel Patterson
eb12c16fd6 Output newlines for each progress indicator when not on a tty. 2016-11-15 18:14:05 -08:00
Daniel Patterson
17c32f5ce7 Fully revert 04f8b653c94614 2016-11-15 16:55:02 -08:00
Daniel Patterson
53ef2e2955 Use an enum type for the 'should read fingerprint' flag, rather than a mysterious boolean
Fix tests.
2016-11-15 16:55:02 -08:00
Daniel Patterson
7b1131b982 Consolidate vector deserialization. 2016-11-15 16:55:02 -08:00
Daniel Patterson
1fc969e6c8 Fix naming convention, and pass-by-reference for data layout. 2016-11-15 16:55:02 -08:00
Daniel Patterson
49f960064c Partial revert of 04f8b653c94614 - the PackedVector is special. 2016-11-15 16:55:02 -08:00
Daniel Patterson
83a9d0590d Pass-by-reference instead of pointer. 2016-11-15 16:55:02 -08:00
Daniel Patterson
d8b016b92a Simplify read error detection. 2016-11-15 16:55:02 -08:00
Daniel Patterson
608044305d Rename the datafacades to more clearly describe what they do. 2016-11-15 16:55:02 -08:00
Daniel Patterson
4760b85930 Add checking assertions for all copy operations. 2016-11-15 16:55:02 -08:00
Daniel Patterson
9e2782d923 Fix undefined behaviour - we were referring to two different temporaries. 2016-11-15 16:55:02 -08:00
Daniel Patterson
2dfeb0cabc Remove unused code. 2016-11-15 16:55:02 -08:00
Daniel Patterson
2f9b5788d0 Destructor should fail hard if an exception is raised. 2016-11-15 16:55:02 -08:00
Daniel Patterson
be496eb4e3 Return the type we claim it will return. 2016-11-15 16:55:02 -08:00
Daniel Patterson
97244557b1 Don't need to use new, make_unique<> can do what we need here. 2016-11-15 16:55:02 -08:00
Daniel Patterson
e2e5eb0169 Remove use of ShM<>::vector in favour of the boost::iterator_range 2016-11-15 16:55:02 -08:00
Daniel Patterson
6949d7ee5b Remove ownership of block pointers from base class. 2016-11-15 16:55:02 -08:00
Daniel Patterson
02303904b8 Update changelog. 2016-11-15 16:55:02 -08:00
Daniel Patterson
4ad6d88888 Refactor file loading to use a common class that has proper error handling. 2016-11-15 16:55:02 -08:00
Daniel Patterson
e226b52f21 const-ify things, use RAII for file closure, and start to use io:: to read some stuff. 2016-11-15 16:55:02 -08:00
Daniel Patterson
b1125b7f1f Rename base class to something more in line with it's actual function. 2016-11-15 16:55:02 -08:00
Daniel Patterson
33ff92d27e Remove debugging code. 2016-11-15 16:55:02 -08:00
Daniel Patterson
de4fd76d57 Clean up some todo notes. 2016-11-15 16:55:02 -08:00
Daniel Patterson
bf6df74d44 Consolidate datafacade file loading logic.
Both datafacades now use a single large memory block and common
file loading logic.
2016-11-15 16:55:02 -08:00
Daniel J. Hofmann
8f6dd805e5 Fixes ODR Violation in Graph Loader, closes #3308 2016-11-15 12:04:13 +01:00
Patrick Niklaus
3235f30a98
[skip ci] clarify release branches 2016-11-14 23:21:48 +00:00
Daniel J. Hofmann
7e4020c010 Allocates memory for the node info list upfront.
Turns out we were not doing this. Huh.

Callstack:
- 78583d2c8c/include/util/graph_loader.hpp (L65-L68)
- 538bbd47d1/src/extractor/extractor.cpp (L423-L424)
- 78583d2c8c/src/extractor/extractor.cpp (L465-L466)
- 78583d2c8c/src/extractor/extractor.cpp (L254-L261)
2016-11-15 00:06:52 +01:00
Moritz Kobitzsch
538bbd47d1 fix length limited graph walker 2016-11-14 18:38:15 +01:00
Moritz Kobitzsch
78583d2c8c fix getTurnDirection, widen straight range, adjust tests accordingly 2016-11-14 11:09:14 +01:00
Dane Springmeyer
fa1a0a1325 Ensure pkg-config reports OSRM_LIB_LINKER_FLAGS 2016-11-12 14:35:32 +01:00
Dane Springmeyer
6df1437cfc drop md5sum dependency, depend on node.js script 2016-11-12 02:48:13 +01:00
Dane Springmeyer
15ed53d4a7 install ccache/cmake via consistent method 2016-11-12 02:48:13 +01:00
Dane Springmeyer
63be191775 speed up osx builds by avoiding homebrew 2016-11-12 02:48:13 +01:00
Moritz Kobitzsch
6ec505281e fix edge discovery in tile plugin 2016-11-12 02:15:04 +01:00
Patrick Niklaus
5a293e891b Merge pull request #3296 from Project-OSRM/libosmium-2.10.0
Osmium 2.10
2016-11-12 02:12:49 +01:00
Michael Krasnyk
b57169e221 Flush stxxl vectors before using in PrepareData 2016-11-12 02:09:51 +01:00
Lev Dragunov
045d25041f Review fixes. 2016-11-12 02:05:48 +01:00
Lev Dragunov
170923874b Add request duration to routed logs. 2016-11-12 02:05:48 +01:00
Dane Springmeyer
8137e95fbb Merge pull request #3274 from Project-OSRM/customize-tool-root
Improve support for customized build directory
2016-11-11 13:54:11 -08:00
Daniel J. Hofmann
0375af197d Skips OSM object metadata reading, closes #3278 2016-11-11 16:35:57 +01:00
Daniel J. Hofmann
babbda98a6 Squashed 'third_party/libosmium/' changes from 80df1d6..40c4a48
40c4a48 Release v2.10.0
6addb2e Search for protozero also in the place where libosmium was found.
9c0d4bb Consistently use lhs and rhs as parameter names in operators etc.
6179759 Update change log.
894eb7d Explicitly use size_t to get no narrowing conversions.
e549e73 Fix CMake config for index_lookup.
ccf0bc2 Fix bug where some compilers deduce the wrong type.
fc3507d Cleaned and documented index example and renamed to osmium_index_lookup.
d3c3036 Rename serdump example to dump_internal and document it.
0e9822e Also forward set_uid_from_signed() function.
29ef95c Rename build_taglist function because it was to similar to build_tag_list.
c088dd0 Move static constant out of class so clang will compile it.
606cdc4 Fix CMake build script: Path for finding libosmium.
65f91fe Removed unused typedef.
07174f5 Use condition_variable to tell producer when thread queue is not full.
b35e957 Some code cleanup in XML parser.
c703dff Fix problem with MemberMeta.
1ccbbef Refactoring CompressionFactory.
6561bd6 Use our own exception type for map factory errors.
56e31fa Throw not_found error directly instead of using helper function.
28230c3 Test empty value for node location store, reorganize tests.
2ba316c Reorganize and fix projection tests.
f949485 Don't run quite as many tests with projections because they are slow.
1bad16d Add information about build environment to benchmark output.
99617bb Change proj_geojson benchmark into mercator benchmark.
553b946 Allow optional parameters on Reader in any order.
dcc3d8f Factor out some common code.
004d8cd Fix forwarding constructor.
9702978 Fix metadata check.
6cfb6c4 Faster implementation of decode_dense_nodes without reading metdata.
4ba4638 Add additional read_metadata parameter to other Reader constructors.
d005937 Optionally ignore metadata when reading file.
63961da Mark all CRC32 update functions as noexcept.
cc4ca75 Refactor set_user() function to speed it up.
38d19dc Update comments with file sizes. OSM has grown...
f7d0824 Add new benchmark that shows performance when main thread is busy.
25070dc Use const ref params.
88e8d96 Mark add_user() as deprecated.
f58d9db Refactor some low-level collection code to clean up code.
4680def Add example showing how to create OSM data out of thin air.
d42fd50 Add an example showing how tags in OSM files can be changed.
49bf5bc Add additional constructors to Builders taking a reference to parent.
7b91d63 Change Builder::add_item() to take a reference instead of pointer.
2957e48 Some cleanup of examples.
d0b458d Calculate size of object at compile time.
3fbb6e7 Use explicit cast.
1851f3d Remove a test that depends on math details.
f6a0802 Various cleanups of example programs.
ba4921f Rename add_user() to set_user().
d7637c9 Various cleanups related to builders.
07827bc Fix add_user().
9a5b395 Also refactor OSMObjectBuilder like ChangesetBuilder before.
b1f423c Use call chaining on the builder.
e49473d Get rid of ObjectBuilder class.
67d70b9 Refactor ChangesetBuilder::add_user().
8199c33 Make ChangesetBuilder derive directly from Builder.
61d1b67 Simplify some code.
d38467a Change derivation hierarchy of some builder classes.
b52f8af Refactor Builder code.
d012bfa Refactored some code setting attributes on objects using builder instead.
6a05f60 Also forward set_removed function from builders.
8d63b7d Return *this from Builder setter functions and test it.
72a1266 Update catch.hpp to newest version.
3424a74 Check GEOS version is <= 3.5.
aee9f9d Cleanup test code.
aef198c Improved asserts in Buffer.
a98b9bf Code cleanup in tests.
a150466 Use GDAL/OGR instead of GEOS to test our WKB implementation.
b04a525 Refactor test.
39aa932 Refactored test_factory_with_projection so it works without GEOS.
648f43a Remove unused dependency on geos from tile test.
f1748ae Add setters to Builder classes forwarding to underlying objects.
8166879 In debug mode check that Builders are correctly called and destructed.
1c4257e Call commit() on buffer only after all builders are destructed.
2618636 Add functions to check availability of relation members.
b45a4d9 Mark RelationMember::set_ref() as deprecated.
7886771 Move "basic" and "buffer" tests to "osm" and "memory", respectively.
b664685 Use functions instead of macros in location test for faster compile.
b4929ac Add more tests for number parser.
02662a7 Merge pull request #171 from lonvia/fix-long-exponentials
5344a6c fix parsing of numbers in e-notiation with many post-comma digits
3aeaff3 Add some typedefs to NodeRefList and memory::Collection.
e750665 Add iterators to IdSetSmall and add docs and tests to IdSet classes.
50ecb2a Add more features to IdSetDense, including unset and iterator.
e3dec78 Make IdSet virtual base class with two implementations.
8ea0153 Use C array instead of std::array in IdSet and clear explicitly.
3ba9905 Deprecate osmium::index::BoolVector in favour of new IdSet.
453d1ca Add osmium::index::IdSet.
c78254e Add function to (temporarily) disable the progress bar.
4d88a9f Better document osmium::io::Header class.
320e3af Look for protozero includes in CMake config.
838d25e Allow optional checking for libosmium version number in CMake config.
6ce60c1 Fix entity_bits static_assert() tests.
f054731 Update change log.
77ac4c2 Make sleep duration for full queues much smaller.
7e39c01 Make some entity_bits functions constexpr.
69ea72f Fix ~ operator on entity_bits and more tests for entity bits.
dafe4cf Update embedded Catch unit test header to version 1.5.7.
a41c832 Fixed parsing of location coordinates starting with decimal dot.
6523bae README cosmetics.
229acac Add tests for some examples.
f1e753d Merge pull request #163 from sebastic/executable-not-elf-or-script
ccea2d5 Remove executable bit from .cpp files.
af77fb4 Changelog formatting fixes.

git-subtree-dir: third_party/libosmium
git-subtree-split: 40c4a48f88d25edace6f0b9e079c306308c7760b
2016-11-11 15:50:02 +01:00
Daniel J. Hofmann
72bfbed1f1 Merge commit 'babbda98a6ea1d53a8bc5015ef5dfb313c47186a' into libosmium-2.10.0 2016-11-11 15:50:02 +01:00
Daniel J. Hofmann
feeae05f1c Update Libosmium Dependency Script 2016-11-11 15:16:07 +01:00
Moritz Kobitzsch
f88ac989ea reserve when possible 2016-11-11 14:48:50 +01:00
Dane Springmeyer
41f083cded test customized build directory, make test/data/Makefile customizable 2016-11-10 11:56:51 -08:00
Patrick Niklaus
12ded539aa Merge pull request #3235 from Project-OSRM/mason-improvements
Mason improvements
2016-11-10 16:58:18 +01:00
Moritz Kobitzsch
827a1fbd7a separate intersection generation and intersection normalization 2016-11-10 12:56:46 +01:00
Moritz Kobitzsch
e84a0ea37c reduce coordinate_extraction overhead. slowdown reduced by 30 percent 2016-11-10 10:44:54 +01:00
Moritz Kobitzsch
88208bfa5d add testscases for mode changes / additional assertions 2016-11-09 12:55:28 +01:00
Moritz Kobitzsch
7073403f1b rip out dedicated file for single function (minor refactor) 2016-11-09 12:52:39 +01:00
Michael Krasnyk
2501882adb Remove duplicated linking of boost and tbb libraries 2016-11-09 12:44:49 +01:00
Michael Krasnyk
4f2bb19b0f Use single precision values in vector<float> initializer list (#3270) 2016-11-08 21:06:55 -08:00
Dane Springmeyer
de77befb23 Merge commit 'a5db3d72f1bc9a8253e327a18d535d244a635b6a' into mason-improvements 2016-11-08 15:30:44 -08:00
Dane Springmeyer
a5db3d72f1 Squashed 'third_party/mason/' changes from 1b3085e..8df1478
58ae447 bump to v0.1.1
c5ef33f rename llvm 4.x to 4.0.0 [skip ci]
5d5d26b add llvm 4.x based sub-packages
9708680 only set LIBCXX_ENABLE_STATIC_ABI_LIBRARY for linux [skip ci]
6918fb0 install LLVMgold.so on linux [skip ci]
ab20ff7 binutils: using 'all-gold' breaks make install on linux [skip ci]
cb8b15f fix binutils install [skip ci]
df77b02 properly set LLVM_BINUTILS_INCDIR value [skip ci]
295d4db binutils gold fixes [skip ci]
ac85676 enable LLVMgold.so for linux [skip ci]
acc4249 add binutils 2.27
16d4452 add lldb and llvm-cov 3.8.1 packages
757b908 remove patching no longer needed [skip ci]
69415b5 better fix for statically linking/linked libc++ with llvm 3.8.1 [skip ci]
43933ed Added mesa-13.0.0-glx (non-CXX11ABI)
2bb81cc Added mesa-13.0.0-glx
d70e3ef LLVM_EXTERNALIZE_DEBUGINFO is osx specific
ba737bf llvm 3.8.1 linux build fixes
4279f58 Updates for mesa 13.0.0
d544278 Revert typo in mason.sh
03ecb2c Add mesa 13.0.0 (Gallium-OSMesa)
0997905 Add expat 2.2.0
f41eb6d mason.cmake: multiple static libs also need to be split
c9fcd1a add lldb to llvm 3.8.1 [skip ci]
6d8e16c minor llvm/clang++ improvements
b2bdb33 Add note that we need to create a github release [skip ci]

git-subtree-dir: third_party/mason
git-subtree-split: 8df14782dda0c2c7314b5c6dba98e9e36a67eedc
2016-11-08 15:30:44 -08:00
Dane Springmeyer
b8898ef410 mason improvements 2016-11-08 15:29:49 -08:00
Daniel Patterson
d0543e6c3b Changelog fix. 2016-11-08 14:38:15 -08:00
Daniel Patterson
cef53c4b56 Fix key/val offset bug. 2016-11-08 11:45:28 -08:00
Daniel Patterson
481b03baeb Review changes. 2016-11-08 11:45:28 -08:00
Daniel Patterson
f96e61ee06 Construct adjacency list and properly traverse it. 2016-11-08 11:45:28 -08:00
Daniel Patterson
d21c8e3800 Add simple check for number of turns found in the tile. 2016-11-08 11:45:28 -08:00
Daniel Patterson
af7960a796 Fix buffering of query box - it was shrinking in the Y axis, rather than growing. 2016-11-08 11:45:28 -08:00
Daniel Patterson
4c6d6aeaa7 Fix retrieval of forward/reverse data. 2016-11-08 11:45:27 -08:00
Daniel J. Hofmann
ef2261661c Remove {highway: type} fallback from bike / walk profile, fixes #3231
References:
- https://github.com/Project-OSRM/osrm-text-instructions/issues/62#issuecomment-257889721
- https://github.com/Project-OSRM/osrm-text-instructions/pull/63
2016-11-08 14:28:56 +01:00
Moritz Kobitzsch
9c11f4231c add locations feature to allow testing turn locations, fix minor bug breaking the arrival location 2016-11-08 13:42:15 +01:00
Moritz Kobitzsch
837ab105ad fix error in ordering arguments for requiresNameAnnounced versions 2016-11-08 12:14:23 +01:00
Daniel J. Hofmann
6ac9617d49 Adapt test to returning ref, Take Pronunciation into Account, Fixes name change heuristic usage in UTurn check 2016-11-08 12:14:23 +01:00
Moritz Kobitzsch
ccdebccde1 adjust sliproad handler for empty-name check, illustrate testcase 2016-11-08 12:14:23 +01:00
Daniel J. Hofmann
c1651ccb12 Uses Name Change Heuristic Instead of Comparing Name Ids
References:
- https://github.com/Project-OSRM/osrm-backend/issues/2857
- https://github.com/Project-OSRM/osrm-backend/pull/2900
- https://github.com/Project-OSRM/osrm-backend/issues/2909
2016-11-08 12:14:23 +01:00
Kajari Ghosh
f33180f092 request polyline with precision of 5 or 6 positions (#3220) 2016-11-07 15:11:21 -05:00
Moritz Kobitzsch
1b03b8df6d raising timeout limit for cucumber on clang 2016-11-07 18:29:49 +01:00
Moritz Kobitzsch
3eeb3cb6c6 fix collapsing of roundabout instructions 2016-11-07 17:16:44 +01:00
Michael Krasnyk
3e18e31bc9 Added percent-encoding to URL parser
Reference:
https://tools.ietf.org/html/rfc1738
2016-11-07 14:16:51 +01:00
Moritz Kobitzsch
2fb40944bf pull in intersection finder accumulator 2016-11-04 13:28:09 +01:00
Michael Krasnyk
b108d8ea21 Use explicit std::function for to_lane_count instead of auto 2016-11-04 10:46:24 +00:00
kerrick-lyft
79917d2c8e Fix typo: Ẁaypoint -> Waypoint 2016-11-03 21:25:10 +00:00
Daniel J. Hofmann
d2cd4fac2d Fixes Always-Zero Lane Count Introduced in #3237 2016-11-03 15:52:18 +01:00
Moritz Kobitzsch
cd03877c90 link ConnectedRoad and TurnOperation via class hierarchy
and empower intersection by adding basic functionality to pod type
refactor extractor/toolkit into intersection
2016-11-03 13:42:29 +01:00
Moritz Kobitzsch
388d84a89e check for compatibility in post-processing (#3227) 2016-11-02 16:59:35 -06:00
Michael Krasnyk
9d24a4422a FindOsmium invoke is required for MSVC build dependencies
The commit is aprtial revert of
87d09f7 | * make adjustments based on PR review from @themarex
because osmium requires ws2_32
2016-11-02 18:40:17 +00:00
Patrick Niklaus
9693f9269b Add regression test 2016-11-02 17:52:41 +00:00
Patrick Niklaus
08a5648e3e Use coorect osm ids for start/target segment 2016-11-02 17:52:41 +00:00
Daniel J. Hofmann
ccf5552406 Fixes Cucumber's Unknown Node Error Reporting
Before: `unknown node %s`
After: `unknown node t`

https://nodejs.org/api/util.html#util_util_format_format_args
2016-11-02 16:46:51 +00:00
Patrick Niklaus
b749d9bd2f Address PR comments 2016-11-02 16:45:20 +00:00
Patrick Niklaus
d342a18324 Add regression test 2016-11-02 16:45:20 +00:00
Patrick Niklaus
8f00936790 Fix non-overlap logic for simplified geometries. 2016-11-02 16:45:20 +00:00
Moritz Kobitzsch
8a3aec301a add a segment on turn restrictions to the cucumber guide 2016-11-02 16:06:37 +01:00
Moritz Kobitzsch
faa5185440 add node-based-graph traversal capabilities 2016-11-02 15:38:09 +01:00
Moritz Kobitzsch
4ba8ccfcce add a geojson debugger that allows creating features for easy inspection 2016-11-02 14:54:00 +01:00
Kajari Ghosh
c30f43b148 added max_speed to the profiles (#3089) 2016-11-01 17:13:10 -04:00
Denis Koronchik
5da63998d6 Add support of custom ServiceHandler 2016-10-31 15:38:03 +01:00
Kajari Ghosh
6fc0609a62 Map matching test coverage fix (#3201)
* fixed map matching test coverage
2016-10-29 11:22:09 -04:00
Patrick Niklaus
f02b7b0910
[skip ci] Fix formating using format.sh 2016-10-28 14:45:05 -07:00
Dane Springmeyer
9435254661 Merge pull request #3119 from Project-OSRM/masonize
Masonize
2016-10-28 13:39:37 -07:00
Dane Springmeyer
de14a72931 adjust example build setup to new mason location 2016-10-28 12:48:20 -07:00
Michael Krasnyk
164f4ffc32 Updated cmake version to 3.7.0-rc2 2016-10-28 12:42:36 -07:00
Michael Krasnyk
b5c77de923 Fix msvc linking of boost libraries 2016-10-28 12:42:36 -07:00
Dane Springmeyer
6067fdf27f tell mason.cmake where the mason command is 2016-10-28 12:34:34 -07:00
Dane Springmeyer
a34a885031 Squashed 'third_party/mason/' content from commit 1b3085e
git-subtree-dir: third_party/mason
git-subtree-split: 1b3085e812b08ef092ba43945e3ab9f802632280
2016-10-28 12:21:21 -07:00
Dane Springmeyer
f39eb999e5 Merge commit 'a34a885031fcb1797621e8968497561a4837e06a' as 'third_party/mason' 2016-10-28 12:21:21 -07:00
Dane Springmeyer
87d09f78e6 make adjustments based on PR review from @themarex 2016-10-28 12:18:13 -07:00
Dane Springmeyer
83b7d75121 Add support for building against mason-provided deps 2016-10-27 23:26:33 -07:00
Dane Springmeyer
4598599f52 # This is a combination of 4 commits.
# The first commit's message is:
Add support for building against mason-provided deps

# This is the 2nd commit message:

back to just one travis job: linux/release

# This is the 3rd commit message:

remove pkg-config debugging [skip ci]

# This is the 4th commit message:

use clang++ 3.8.1 for mason builds since 3.8 is what we have been using
2016-10-27 23:26:33 -07:00
Daniel Patterson
da77edfc83 Explicitly set minimum OSX version, and detect SDK path.
This fixes situations where XCode is installed with a newer SDK than the current OS. (#3198)
2016-10-27 16:29:27 -06:00
Dane Springmeyer
2917122287 Merge pull request #3196 from Project-OSRM/build-fixes
Minor build fixes
2016-10-27 14:43:36 -07:00
Dane Springmeyer
a22e0fa62e minor build fixes
- Travis: Upgrade clang from 3.8.0 to 3.8.1 (provides smaller package for faster downloading)
  - Travis: Makes BUILD_COMPONENTS an option
  - Followup after #3130 (Boost_LIBRARIES variable no longer exists)
2016-10-27 13:39:33 -07:00
Denis Koronchik
dc7e61c25d Fix declaration of makeRouteStep function 2016-10-27 20:12:02 +02:00
Moritz Kobitzsch
8dc667f20d fix warnings due to superfluous ; 2016-10-27 20:06:14 +02:00
Moritz Kobitzsch
8ff4bc09ac fix breaking the sorting order by node adjustments 2016-10-27 19:55:56 +02:00
Moritz Kobitzsch
88c3f4c481 Considering multiple small turns, right after each
other can result in a combined turn angle that is
straight instead of turning left and right.
2016-10-27 19:19:23 +02:00
Moritz Kobitzsch
01a2c66472 rip out unused m_node_info_list 2016-10-27 18:51:59 +02:00
Huyen Chau Nguyen
cf35bbeb50 refactor function names; consolidate readCount() functions;
remove templated types as much as possible for type safety;
add more comments;
clean up code, add const if possible;
2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
fe94977c9b refactor loading code of .ramIndex files and move to io.hpp 2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
69a60686dc refactor loading code of .datasource_indexes and .datasource_names files and move to io.hpp 2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
7b97e1035f refactor loading code of .nodes and .edges files and move to io.hpp 2016-10-26 13:18:52 -07:00
karenzshea
c4f010e363 read properties stream to size of properties object, not 1 2016-10-26 13:18:52 -07:00
karenzshea
51ebadfc45 deduplicate code for loading profile properties into io.hpp 2016-10-26 13:18:52 -07:00
Daniel Patterson
ceddfada3d Don't mark all lanes as designated when there are blank lane specifiers in the tag. 2016-10-25 14:37:59 -06:00
Daniel J. Hofmann
a933b5d949 Prevents the Matching getting confused when users are time-travelling. 2016-10-25 10:42:24 -07:00
Moritz Kobitzsch
ba5871cfa1 fix turn scenarios 2016-10-25 10:12:25 -07:00
Moritz Kobitzsch
e8b947bca6 fix coordinate extraction with less than 1 meters past lane distance 2016-10-25 10:07:09 -07:00
Michael Krasnyk
7753845f5c Make thread-locked access to stxxl containers
From stxxl FAQ: "you should not share a data structure between
threads (without implementing proper locking yourself)."
The access to name_char_data can be implicitly parallelized
if _GLIBCXX_PARALLEL is defined and invalidate local-thread iterators.
2016-10-25 10:03:26 -07:00
Dane Springmeyer
19eec48207 Merge pull request #3163 from Project-OSRM/pc-fixes
Add -l to rt and gcov
2016-10-24 18:53:49 -07:00
Dane Springmeyer
293856981f add -l to rt and gcov 2016-10-24 17:09:03 -07:00
Michael Krasnyk
86b70f2632 Don't fail on incorrect lane tags '1; 2' 2016-10-24 15:25:46 -07:00
Daniel J. Hofmann
1905a0f473 Documents InvalidValue response code, resolves #3150 2016-10-24 09:54:09 -07:00
Moritz Kobitzsch
d05b85c227 fix turn restriction and make route unique 2016-10-22 06:48:49 +02:00
Daniel J. Hofmann
19f00589de Removes constant speed offset from calibration two years ago, resolves #3023.
Our fine-tuned profiles are better in modelling real speed by now. This
constant offset is no longer needed. We still scale maxspeed, though.

https://github.com/Project-OSRM/osrm-backend/issues/3053
2016-10-22 06:48:49 +02:00
Daniel J. Hofmann
7f28a14c76 Fixes Grammar in Github Pull Request Template 2016-10-21 16:52:05 -07:00
karenzshea
fead71da54 add comment on find() [skip ci] 2016-10-21 14:23:02 -07:00
karenzshea
c26e90cac0 sort/unique turn penalty lookup 2016-10-21 14:23:02 -07:00
karenzshea
d4e5710928 parse turn penalties in parallel, add unique and sorting steps 2016-10-21 14:23:02 -07:00
karenzshea
5c2783310a add pr todo for updating wiki [skip ci] 2016-10-21 13:58:51 -07:00
Patrick Niklaus
b8795c7341 Rename increasingly inaccuratly named distance member of QueryEdge to weight 2016-10-21 21:00:02 +02:00
Daniel J. Hofmann
1d994da12b Makes Scripts Fail Fast and Loud 2016-10-21 17:56:56 +02:00
Dane Springmeyer
46994e87be Merge pull request #3130 from Project-OSRM/cmake-fixes
cmake fixes
2016-10-20 15:34:24 -07:00
Moritz Kobitzsch
40bfe89d97 add test 2016-10-20 14:28:33 -07:00
Moritz Kobitzsch
e3c2d4dddc use-lane can occur in roundabouts as well 2016-10-20 14:28:33 -07:00
Dane Springmeyer
502d9e10c2 cmake fixes:
- Builds up ENGINE_LIBRARY_LISTING correctly to pass to pkg-config
    - Previous behavior had major flaw and would result in paths in libosrm.pc like: "-L-L"
      when the data was "-L/path -lfoo" or just "-lpthread" with no -L/path. It only worked correctly for static libraries
  - Refactors to call find_package for boost in one place (helps prepare for upcoming mason PR)
2016-10-20 12:09:27 -07:00
Daniel J. Hofmann
865c6590fa Limits the object cache size to 256M 2016-10-20 11:33:28 -07:00
jakepruitt
c30784895d clang-format and remove debug 2016-10-20 11:32:28 -07:00
jakepruitt
fa1fc810ea std::for_each -> std::copy 2016-10-20 11:32:28 -07:00
jakepruitt
052b0e831d Remove debug logging 2016-10-20 11:32:28 -07:00
jakepruitt
42271d99b2 Store node ID's and weights separately in CompressedEdgeContainer
Removes CompressedEdges from the extractor and shared data format by
directly serializing vectors of node ID's, forward weights and reverse
weights for each node-based-edge

Refs #2575
2016-10-20 11:32:28 -07:00
Moritz Kobitzsch
ecee13bffa actually calculate distance instead of using .distance which is a timing value 2016-10-20 12:27:02 +02:00
Moritz Kobitzsch
5e167b8745 Turn Angles in OSRM were computed using a lookahead of 10 meters.
This PR adds more advanced coordinate extraction, analysing the road
to detect offsets due to OSM way modelling.

In addition it improves the handling of bearings. Right now OSM reports
bearings simply based on the very first coordinate along a way.
With this PR, we store the bearings for a turn correctly, making the
bearings for turns correct.
2016-10-20 10:47:29 +02:00
Moritz Kobitzsch
1f8ca2879f fix u-turn collapsing onto empty name / in presence of turning use lane 2016-10-20 09:39:38 +02:00
Huyen Chau Nguyen
2d13116487 fix memory leak of char[] initialization 2016-10-19 17:26:21 -07:00
Huyen Chau Nguyen
316ef305de Refactor loading code for timestamp file 2016-10-19 17:26:21 -07:00
Daniel J. Hofmann
ab1a9271c8 Canonicalizes Spaces in Semicolon Stringlists, fixes #3086 2016-10-19 14:14:18 -07:00
Daniel J. Hofmann
18bc02f087 Collapses Double OSRM <-> Engine <-> .. PImpl Indirection, Resolves #3019. 2016-10-19 13:42:08 -07:00
Moritz Kobitzsch
2a2abe9e0f remove unused class DiscreteAngle 2016-10-19 21:40:45 +02:00
Patrick Niklaus
b7ee38eca7 Refactored loading code for .hsgr file 2016-10-19 19:59:23 +02:00
Moritz Kobitzsch
ae157d0b4f fix changelog to not include 5.5.1 ahead of time 2016-10-19 18:37:53 +02:00
Patrick Niklaus
769485cc2f Initilialize tbb task scheduler correctly. Thanks @oxidase! 2016-10-19 18:30:06 +02:00
Patrick Niklaus
983ad3513a Enabled address sanitizer 2016-10-19 18:30:06 +02:00
Patrick Niklaus
ca914b8b1f Use newest bintools with gcc 6, thanks @oxidase 2016-10-19 18:30:06 +02:00
Daniel J. Hofmann
ca21b8833a Removes Gnu Date Usage 👴
\U+1Fstallman-emoji
2016-10-19 18:26:20 +02:00
Kajari Ghosh
3f0f0e306b Directional Destination Tags (#3061)
* cucumber test scenarios, #3027

* post review comments

* two tests are still failing

* fixed one test

* passing tests

* cleaner code refactor

* possible sceanrios for destination:ref:forward/backward

* added code for direction:ref:forward/backward, tests pass

* changelog

* store direction in variable

* added tags to taginfo

* fixed dumb error

* use boolean flags

* null pointer checks

* hopefully better null pointer checks
2016-10-18 23:09:19 -04:00
Patrick Niklaus
f77a2474ea
[skip ci] Forgot to add changelog entries 2016-10-18 22:20:42 +02:00
Patrick Niklaus
8205c34abe Fix duplicated code in tile plugin 2016-10-18 22:11:43 +02:00
Daniel J. Hofmann
ee4fb89336 Adds missing routable service tags
http://taginfo.openstreetmap.org/keys/service#values
2016-10-18 22:11:13 +02:00
Patrick Niklaus
81c5cba0e5 Recover from stale mutexes with force unlocking and retry 2016-10-18 21:58:50 +02:00
Patrick Niklaus
caa7c994a0 Make SharedDataFacade try to cleanup 2016-10-18 21:58:50 +02:00
Patrick Niklaus
847f530c8e Only keep reader lock on shared memory during queries. 2016-10-18 21:58:50 +02:00
Patrick Niklaus
c69545c47a Don't block all requests to switch data
This switchtes the data even if there are requests still running on the
old data. osrm-datastore then waits until all of these old requests have
finished before freeing the old regions.

This also means that osrm-datastore will return with an error if there
is a data update currenlty in progress.
2016-10-18 21:58:50 +02:00
Patrick Niklaus
1557ff81bc Simplify the locking logic 2016-10-18 21:58:50 +02:00
Patrick Niklaus
ebac9f586b Adapt SharedMemory ownership changes from @oxidase
We don't leak any pointers anymore and make owning the shared memory
explicit.
2016-10-18 21:58:50 +02:00
Patrick Niklaus
2512cf386d Add better debug log output 2016-10-18 21:58:50 +02:00
Patrick Niklaus
da04563e26 Added header guards 2016-10-18 21:58:50 +02:00
Patrick Niklaus
ceaf362326 Make SharedDataFacade immutable 2016-10-18 21:58:50 +02:00
Johan Uhle
9af00b1925 Docs: Rotaries can have exits as well 2016-10-18 02:20:18 +02:00
karenzshea
f540485cb0 Add a speed for driveway to service speeds 2016-10-17 15:45:31 -07:00
karenzshea
5617d3886d Fix cucumber support code for routability testing to actually test
input/output for speed and time values, adjust resulting broken tests
2016-10-17 15:45:11 -07:00
Huyen Chau Nguyen
06d13b6954 run clang-format on edited files 2016-10-17 15:27:14 -07:00
Huyen Chau Nguyen
d0c142b9c7 remove util self-written make_unique and use C++14 stdlib make_uniqe 2016-10-17 15:27:14 -07:00
Moritz Kobitzsch
ef1f14550f max all trips roundtrips again 2016-10-17 15:26:38 -07:00
Moritz Kobitzsch
5839bf334b fix random feature fail 2016-10-17 15:26:38 -07:00
Moritz Kobitzsch
46c936b48e handle trips with identical coordinates 2016-10-17 15:26:38 -07:00
Daniel J. Hofmann
8ed6bb8a1b Asserts on valid v5 conforming maneuver types, resolves #3035 2016-10-14 15:59:26 +02:00
Daniel Patterson
b72dc8c0cf Enable use of other build types than Debug and Release, and properly default to Release. 2016-10-14 12:37:01 +02:00
karenzshea
72fa35da10 add a toolkit function to find lanes to the left/right of turn lanes 2016-10-13 17:59:25 +02:00
Moritz Kobitzsch
17eb664597 don't get disturbed by service roads in obvious discovery 2016-10-13 16:10:59 +02:00
Daniel J. Hofmann
77931ffe24 Changes Lua detection to be less strict 2016-10-12 23:09:59 +02:00
Karen Shea
45df2c991f Merge pull request #3045 from Project-OSRM/fix/tilez-limit
Add max zoom limit of z12 to tile plugin parameters
2016-10-12 19:14:44 +02:00
karenzshea
615e302b8c test for tile that fails IsValid() check 2016-10-12 11:20:01 -04:00
karenzshea
1ed8e7e98c test a z12 tile 2016-10-12 10:20:14 -04:00
karenzshea
ee012ae2da valid tiles are >= z12 2016-10-12 10:03:43 -04:00
Daniel J. Hofmann
32dcce88f7 Fixes missing memory include for make_unique; reported in #3018.
https://github.com/Project-OSRM/osrm-backend/issues/3018#issuecomment-253118518
2016-10-12 12:55:05 +02:00
Daniel J. Hofmann
a13cf3f2be Route over alternating oneways but not reversible ones, closes #2837.
- alternating: high frequency, route over them with penalty
- reversible: low frequency, do not route over them - time dependence

- http://wiki.openstreetmap.org/wiki/Tag:oneway%3Dreversible
- http://wiki.openstreetmap.org/wiki/Tag:oneway%3Dalternating

This distinction was made at the Elbe-Labe Meetup in Dresden, with
accompanying Wiki pages and tagging scheme. Thanks all involed!

- https://github.com/Project-OSRM/osrm-backend/issues/2837
- http://wiki.openstreetmap.org/wiki/Key:oneway
2016-10-12 12:53:07 +02:00
Moritz Kobitzsch
6cf99c886f don't emit invalid on sliproads with incompatible modes 2016-10-11 10:59:10 +02:00
Emil Tin
7cbb1807e7 cucumber: change syntax of node maps 2016-10-11 09:07:48 +02:00
Patrick Niklaus
d47d03c15b Add explicit test for malformed coordinate 2016-10-11 00:04:53 +02:00
Patrick Niklaus
240a7696da Catch boost bad_numeric_cast exception and let parser return an error 2016-10-11 00:04:53 +02:00
Patrick Niklaus
14b024e4dc
[skip ci] Document InvalidQuery. Fixes #3026 2016-10-10 17:37:34 +02:00
Patrick Niklaus
339ebe8f81
[skip ci] Update changelog 2016-10-10 13:54:06 +02:00
Patrick Niklaus
9eb7fc03ce Use a shared (!) reader writer lock to protect CURRENT_REGIONS
This fixes issue #3016.
2016-10-10 12:13:45 +02:00
Moritz Kobitzsch
036475afd0 restructure for readability 2016-10-07 09:35:16 +02:00
Moritz Kobitzsch
378322f6e3 don't provide turn-straight next to suppress-straight 2016-10-07 09:35:16 +02:00
Daniel J. Hofmann
d964b81308 Silence static visitor upstream deprecation warnings. 2016-10-06 21:08:48 +02:00
jakepruitt
49a28b478c Remove TODO - tiles are tested and seem to work 2016-10-06 10:09:57 -07:00
Lauren Budorick
a75e16e26b Deduplicate foward/reverse geometries
Changes the internal representation of compressed geometries to be a
single array shared between forward and reverse geometries that can be
read in either direction. Includes a change on
extractor::OriginalEdgeData to store via_geometry ids that indicate
which direction to read the geometry for that edge based edge.

Closes #2592
2016-10-06 10:09:57 -07:00
Moritz Kobitzsch
73179641b1 clang-format code 2016-10-06 14:06:19 +02:00
Patrick Niklaus
58316c608d Fix verison detection for multiple lua installations
If both lua 5.3 and lua 5.2 are installed the old code threw an error
that 5.2 was not found since FindLua always picks the neweste version.
2016-10-06 13:36:34 +02:00
Patrick Niklaus
1c2ead8fb8 Make DataFacade local to every request
This is the first step to having fine grained locking on data updates,
see issue #2570.
2016-10-06 12:56:38 +02:00
Moritz Kobitzsch
66f2cc5184 fix detection of forks in present of oneways 2016-10-05 17:49:54 +02:00
Daniel J. Hofmann
dbd108df8c Reworks how we search for Lua in CMake and constrain to Lua 5.1 5.2
At the moment we have a FindLua52.cmake module that is happy with
Lua52 but also Lua51 and even Lua53. Let's instead pull in the official
one from CMake (since it's not yet in CMake 2.8 which we support).

https://github.com/Kitware/CMake/blob/master/Modules/FindLua.cmake

BSD licenced.

Requires Lua 5.1 or Lua 5.2, since seeing memory issues on 5.3:

https://github.com/Project-OSRM/osrm-backend/issues/2926
2016-10-05 13:23:48 +02:00
Michael Krasnyk
ff1ab217ba Debug and i686 builds 2016-10-04 16:37:29 +02:00
Patrick Niklaus
49a9d7f57a Try switching to GCC 6 2016-10-04 16:37:29 +02:00
Michael Krasnyk
da15c014f5 Avoid doubled reprocessing for scenarios without caching 2016-10-04 14:35:21 +02:00
Daniel J. Hofmann
9a85a50586 Implements Cucumber shared vs. static library detection, fixes #2999 2016-10-04 14:14:37 +02:00
Daniel J. Hofmann
94ca782816 Bumps version to 5.4.0 2016-10-04 10:46:56 +02:00
Daniel J. Hofmann
d17eacc52b Makes the OSRM interface threadsafe.
Technically speaking we're changing the `libosrm` API.

But since we're only lifting restrictions by marking the API threadsafe,
we should be fine here.
2016-10-04 09:32:22 +02:00
Daniel J. Hofmann
d86bba3e24 Re-introduces the old RouteParameters ctor for API compatibility, see #2978 2016-10-03 20:00:12 +02:00
karenzshea
7f7b47611d add note about dangers of post subtree merges rebases [skip ci] 2016-10-03 13:51:30 -04:00
Karen Shea
2d4c128ea2 Merge pull request #2994 from Project-OSRM/retry/libosmium
Update to libosmium@2.9.0
2016-10-03 19:43:14 +02:00
karenzshea
5d9fc83db4 adjust test cases that specify coords without leading 0 2016-10-03 13:15:39 -04:00
karenzshea
879f7eb042 Squashed 'third_party/libosmium/' changes from 2282c84..80df1d6
80df1d6 Release v2.9.0
110dc5c Update change log.
6ad5829 Better handling of areas with duplicate segments.
f5985ed Better exception message for invalid areas.
fa09300 Explicit cast to make intent clear.
6f9b522 Fix name of struct stat on Windows.
6b0a47b Clean up code in data tests.
aa1226c Fix progress bar.
3663a19 Extend ProgressBar class so that it works with multiple files.
40c4d5a Add version of file_size() taking a file name.
43a2fac Merge pull request #162 from osmcode/windows-build-scripts
cc2305d [skip travis] 1st iteration of new build scripts
7abe4e1 Clean up disk location cache examples.
48841d5 Update change log.
cf854e9 Change timestamp parser.
01aa8c7 Add examples osmium_pub_names and osmium_road_length.
483c9f2 Benchmark code cleanup.
3ffea2d Cleaned up some test code.
80f0ff7 Explicit conversion from int to bool.
0ba5918 Write space after progress bar to defend against glitches in output.
8584423 Change progress bar to take max_size on construction.
d2c7585 Only call gzoffset when compiling with zlib > 1.2.4.
1b417e5 Add support for a progress report in osmium::io::Reader().
3b4c8c8 Minor cleanup of appveyor config.
d787e25 Fix OPL parser: Relation member without role at end of line.
53ca080 Make lots of variables const.
d776ab2 Add to change log.
eec3b62 Properly initialize m_data field.
cc607e1 Take argument by const ref.
be1e346 Remove unused function.
2a356ee Make lots of one-argument constructors explicit.
adca74f Add comments to and cleanup up examples.
381e535 Simplify WKB code.
b49efd8 Fix opl_parse_changeset_id() return type.
bb52e57 Use uint64_t for line count and column to be on the safe side.
243f6a7 Use parentheses to make sure the right precedence is used.
5a7648e Consistently catch by const ref unless var needs to be non-const.
e3be990 Avoid some warnings.
c436d92 Do not include unistd.h on Windows.
95b228c Add dummy function to avoid warnings.
f276ca3 Fixed includes and changelog update.
8c54bd9 Change timestamp error message.
27e1d5c Add OPL parser.
1d2caab Add more includes to osm.hpp to make usual osmium use simpler.
9d88361 More tests for area CRC.
4f8964d Initialize Item::m_diff member on construction.
f2b648b Parse coordinates in scientific notations ourselves.
b01323f More include fixes.
69f39d4 Fix some includes.
156536d Make padded_length a plain function, not a template function.
65cd1dc Extend functions to set Location lon/lat.
98b7b17 Update to protozero 1.4.2.
a6420cf Add diff indicator to items and use for diff opl and debug output.
0ef02a3 Add workaround for YCM.
3a986f4 Update protozero version.
5245c5b Document osmium_count example program and add memory usage output.
796ca13 Document handler class.
2ba1c1f Add example for mercator projection and tiles.
201f744 Restrict tiles to zoom <= 30.
202291d Add member_type_string class.
494ed6e Cleaned up Tile tests.
af13a8b Add documentation and range checks to Tile struct.
9df5d91 Some small changes to avoid conversion warnings.
afac031 Explicit cast to avoid warning.
8188f66 Better contribution info.
fa89d1d Fixed a problem limiting cache file sizes on Windows to 32 bit.
23a89df Remove obsolete info about versioning from CONTRIBUTING.md file.
115ae23 Release v2.8.0
4174b3c Style fix.
1795dcb Function wait_and_pop_with_timeout() is not needed any more.
4a3a71b Fix for possible threading problem.
cc85925 Updated change log.
67bc8b1 Use unordered_map instead of map in PBF string table code.
18b7b66 Set better default for string table chunk size and document it.
e6d7410 Remove dependency on sparsehash and boost program_options for examples.
14d92d6 Fix regression: Debug output of invalid location works again.
ef91ce1 Bugfix: PBF String table corruption when there are many strings.
649af78 Remove DeltaEncodeIterator completely.
56e5ac2 Function getting queue sizes from environment uses default when getting 0.
bfaab7d Add change log.
d260339 Remove use of PROTOZERO_STRICT_API macro.
c61722d Remove use of DeltaEncodeIterator simplifying code.
f7c60b6 Updates for new protozero.
0bdfb9d Updated change log.
bb56cbb Switch to newest protozero 1.4.0.
9e19a82 Add ccache support to CMake cnfig, better travis builds.
00d8868 Make I/O max queue sizes configurable via environment.
dc7e504 Remove unused debugging code.
13f66a0 Track pop() calls and queue underruns when OSMIUM_DEBUG_QUEUE_SIZE is set.
5c2e367 Add EWKT support.
8f7c7d3 Automatically set correct SRID when creating geometries.
ff11893 Better check of optional components in CMake config.
4562429 Use fallback implementation for coordinates given in scientific notation.
3bdf46e Mark enable_debug_output() as deprecated.
ea1093e Update catch unit test framework.
8623f1e Release v2.7.2
e135dd8 Fix data corruption regression in mmap based indexes.
adbd3b0 Do not output empty discussion tags in changeset XML output.
8126fbb Formatting.
c6970fd Fix coordinate output.
3471b4b Resize output string once in output_int().
0ddf0e7 Use our own function to convert integers to strings instead of printf.
f9a1dd3 Reading and writing coordinates is now independant of locale.
8104294 Use hand-crafted function for hex output (faster than printf).
0bb452a Fix links in change log.
1862d06 Release v2.7.1
8bfe2ba Release v2.7.0
c3604f3 Use 64bit counter in area stats.
9e589b3 Update gdalcpp.hpp from upstream.
fd55d9b Cleanup of OGR-related code.
d0c53e0 Fix bug: Relation wasn't found correctly from member.
24145f9 Use make_iterator helper function.
a8a287d Refactor count_not_removed function. (No template necessary.)
389332a Also print removed flag from member_meta.
5e7c5d0 Remove unnecessary overload of begin() and end() function in iterator_range.
2ec007f Do not add rings to invalid area, even if create_empty_areas is set.
fee8b73 Optionally keep type tag in area assembler. Better doc for config.
c7e1f8a Fix timer output in assembler code.
032ab40 Update change log.
dcfa439 Node location store keeps track of whether node ids are ordered.
54d5eb8 Add tests for new file based index code.
4fe5b30 Use correct empty value when initializing index.
40b5c79 Static or not static, that is the question.
aaa9b46 Open index file with minimum size, because zero-sized mmap is not allowed.
fea2337 Fix for disk-based indexes.
428a413 More tests of corner cases for id to location index.
9d2a31b Add config option to areas assembler for only creating some areas.
d11bf8d Count and report inner rings with the same tags as relation/outer rings.
bde10c4 Speed up copy of tags.
e4c9f87 Revert "Consistently remove some tags from area."
9cd7a03 Set areas assembly config setting create_empty_areas to true by default.
660fb63 Better ordering of OSMObjects.
b4199c2 Use std::strcmp instead of just strcmp.
579c34b Better field width/precision in problem reporter.
a2ebeeb Use field names with 8 characters or less in OGR problem reporter.
ef523fe Switch remaining "typedef"s to "using".
19425f8 Switching from "typedef" to "using" in geom code.
b13c2be More cases of switching from "typedef" to "using".
7f53977 Refactoring iterators: Not derived from std::iterator any more.
1922224 Consistently remove some tags from area.
295495f Fix check for detecting wrong role.
9aa6d46 Report more IDs in problem reporters.
d7a5da7 Remove now unused spike segment reporter.
0666d66 Only report duplicate segments if they belong to the same way.
9e17f89 Improved error reporting for area assembler.
e983a48 More code cleanup and docs.
927eeda Replace awkward std::pair construct by real class.
d0543b9 Various area code refactorings.
0ae8f07 Do not build areas for ways with tag area=no.
d4cabe7 Add some convenience functions to check for tags in TagList.
99f4be9 Add missing include.
a8dda78 Travis: Only run tests if build succeeded.
9db3034 Add missing "nodes" fields.
50e9fcb Report ways that are in multiple rings as errors.
58a3669 Add some paranoia asserts.
3958c1d Use iterator_range to make equal_range results easier to use.
c12c710 Add for_each_member() function to iterate over members of an mp relation.
ca35452 Change argument order in create_area() functions.
4473ae1 Keep stats on multipolygons with no tags on the relation.
12c5335 Bugfix: Check that there is a problem reporter before using it.
ec2afce Update change log.
5af2ec9 Use new area assembler interface in multipolygon collector.
73e3440 Some code cleanup in area code and new interface for calling assembler.
7737479 Add the number of nodes in area to problem reporter.
b4f9343 Use const_iterator where possible.
02372b2 Simplify code that checks for open rings.
8d6099e Pull out location_to_ring_map into details ns and add == and < ops.
1a05042 Mixed code cleanups and added comments.
4b8d1be Ignore empty role when checking inner/outer roles on multipolygons.
e22f573 Now GCC is complaining about the clang pragma...
48000c0 Add some missing includes and forward declarations.
ba9504a Workaround for bug in old libc.
a138265 Completely new algorithm for assembling multipolygons.
74054bd Add specialization of std::hash function for Location.
5ed4c90 Use newest gdalcpp.hpp with implicit transaction support.
676949e Add "locations_on_ways" support for OPL format, too.
ce05c19 Add support for reading/writing XML/PBF files with locations on ways.
62b2ee4 Fix checksum test.
bd512a8 Added "add_crc32" file option for adding CRC32 checksum to debug output.
3a100fa Incorporate locations in NodeRefs into CRC32 checksum.
ac02f86 Update catch.hpp to newest version. Removed outdated info in README.
481f48b When assembling areas ignore ways containing no or only a single node.
a0ae33a Fix unsigned overflow in pool.hpp.
91b8adf Fix undefined behaviour in WKB writer.
697f460 Check results of dynamic casts.
f1e4571 Fix from_item_type() implementation so it also works with undefined type.
65df99b Add future_queue_type alias to simplify code.
4340e4d Removed SortedQueue implementation which was never used.
cdd8f8c Add version.hpp with macros defining version of the library.
ff5d42a Update to newest gdalcpp.hpp.
a184f66 Update change log.
0ea76f7 Add osmium::Area::outer_rings() and inner_rings() functions.
b0404b7 New ItemIteratorRange class for iteration over buffers and subitems.
eff8a7c Add default type to string_to_object_id for IDs without type prefix.
e877a6f Clean up code inner vs. outer ring in geometry factory.
9224be5 Disable use of XML entities in OSM files.
9d9fa08 Output operator of location shows full precision of coordinates.
9a8e7c0 Documentation fixes.

git-subtree-dir: third_party/libosmium
git-subtree-split: 80df1d6850bdfa661587839b77dcea0ab8fc814a
2016-10-03 13:08:59 -04:00
karenzshea
5b4e2950d9 Merge commit '879f7eb04200d7d2c28af565229bf6e3d54274fd' into retry/libosmium 2016-10-03 13:08:59 -04:00
karenzshea
050585bbd9 rename dep update file, bump to osmium@2.9.0 2016-10-03 13:08:45 -04:00
karenzshea
89007ae669 Adapts Tile tests to protozero's strict iterator_range API from @daniel-j-h 2016-10-03 13:07:18 -04:00
Daniel J. Hofmann
b821a1dd98 Disables ld.gold on binutils < 2.26, resolves #2984 2016-10-03 15:41:40 +02:00
Moritz Kobitzsch
d1f1358e48 adjust for comments by daniel-j-h 2016-09-30 17:27:14 +02:00
Daniel Patterson
805d93912d Construct an adjacency list in order to discover turns. 2016-09-30 17:12:23 +02:00
Daniel Patterson
0b7b16abc0 Include new method in test mock objects. 2016-09-30 17:12:22 +02:00
Daniel Patterson
3dd7732ffc Add code comments and document some magic constants. 2016-09-30 17:12:22 +02:00
Daniel Patterson
c8eb2b2d11 Refactor edge unpacking so that it's CH indepenent and we don't repeat ourselves so much. 2016-09-30 17:12:22 +02:00
Lauren Budorick
14e7460465 Include turn information in debug tiles. 2016-09-30 17:12:20 +02:00
Daniel J. Hofmann
6290aeea93 Fixes Tile Unit Test Compilation 2016-09-30 16:58:50 +02:00
Moritz Kobitzsch
10b93c6908 re-introduce space into summaries 2016-09-30 14:36:09 +02:00
Moritz Kobitzsch
e4d0d49300 move summaries to car profile, test for references, use boost adaptors 2016-09-30 10:59:23 +02:00
karenzshea
cbb96ce7f4 handle empty names in summaries 2016-09-30 10:43:36 +02:00
karenzshea
54aaf574d9 removing caching from edge weight update test, so it runs fresh each time 2016-09-30 00:12:47 +02:00
Moritz Kobitzsch
a824e64682 Merge branch 'master' into guido/notification 2016-09-29 16:03:44 +02:00
Moritz Kobitzsch
df6186f0f1 fix documentation 2016-09-29 12:05:19 +02:00
Moritz Kobitzsch
78d530ddae fix polyline decoding 2016-09-29 11:56:51 +02:00
Moritz Kobitzsch
da15e1fc5e adjust case/add clarification 2016-09-29 10:50:28 +02:00
Ansis Brammanis
7e2663f2ad calculate roundabout radius from circumference, fix #2716 2016-09-29 10:42:42 +02:00
karenzshea
1a96483f7b prefer notification over new-name/suppressed types 2016-09-29 10:26:56 +02:00
karenzshea
3d5a53566c implement flag edge-weight-updates-over-factor, to log edge weight
updates over provided x factor
2016-09-28 15:19:59 +02:00
karenzshea
eafe3fa928 remove luajit support 2016-09-28 11:12:11 +02:00
Moritz Kobitzsch
6cfb1d6a85 add changelog for trip-changes 2016-09-28 10:51:21 +02:00
Moritz Kobitzsch
0abd32fca3 prefer first result 2016-09-28 10:32:33 +02:00
Daniel J. Hofmann
d1f555dcef Removes unused JSON logger.
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2769
2016-09-28 10:01:56 +02:00
Moritz Kobitzsch
6cfd1c92e1 make changelog readable 2016-09-28 09:40:25 +02:00
Daniel J. Hofmann
bbbbacb073 Reworks Restriction Whitelist / Blacklist, resolves #2833
Takes a stricter aproach for whitelisting / blacklisting restrictions:

- uses `restriction=`
- uses more specific `restriction:<type>=`
- uses `except=<type>` to invert

Where `type` is the type of transportation to restrict, e.g. `motorcar`.

https://github.com/Project-OSRM/osrm-backend/issues/2833
2016-09-28 09:35:02 +02:00
Moritz Kobitzsch
e7b2f85a20 correct changelog 2016-09-28 09:34:10 +02:00
Moritz Kobitzsch
75de7c8eaf changelog updated 2016-09-28 09:06:44 +02:00
Michael Krasnyk
3f3c85ba72 Added profile files per test generation 2016-09-28 09:04:58 +02:00
Daniel J. Hofmann
89264eb89b Better documents profile request parameter, resolves #2952 2016-09-28 09:03:06 +02:00
Daniel Patterson
fa5714ab82 Unset FORTIFY_SOURCE before setting to avoid warnings for compilers where FORTIFY_SOURCE is predefined. (#2946) 2016-09-27 21:32:22 -07:00
Moritz Kobitzsch
8aa93f32cc add changelog entry for reduction of name changes 2016-09-21 12:45:59 +02:00
Daniel J. Hofmann
60010dd998 Reduce NewName Instructructions / Name Changes
With @karenzshea's name / ref split (ref. #2857) in master we want to
make use of it and reduce `NewName` instructions when ever possible.
This is a first step towards #2744 by using the already existing name
change heuristic from the extractor now in post-processing as well.

Limitations: at the moment we don't have the `SuffixTable` in
post-processing; this would require us serializing and subsequently
deserializing the table, passing it through from the profiles to the
API.
2016-09-21 12:42:39 +02:00
Moritz Kobitzsch
7ffe832ff8 add changelog entry for HOV change 2016-09-21 11:48:50 +02:00
Daniel J. Hofmann
a63b10972b Handle HOV designated-only Lanes, resolves #2929
In https://github.com/Project-OSRM/osrm-backend/issues/2711 we made
`hov=designated` routability configurable.

We want to handle designated-only lanes in the same way. Example:

    hov:lanes:forward=designated|designated
    hov:lanes:backward=designated

should have more or less the same effects as

    hov=designated

In contrast

    hov:lanes:forward=designated|no|yes hov:lanes:backward=yes

should not be handled. See

    https://github.com/Project-OSRM/osrm-backend/issues/2711

for explanation wrt. tag semantics with the difference that
backward/forward only set the backward/forward mode to inaccessible.

References:
- http://wiki.openstreetmap.org/wiki/Key:hov#hov:lanes.3D.2A
2016-09-21 10:56:42 +02:00
Michael Krasnyk
3eac6effbb
Fix "Error: write after end" and removed @bug tags
https://nodejs.org/api/child_process.html#child_process_event_exit
Note that when the 'exit' event is triggered, child process stdio streams might still be open.
2016-09-20 20:40:53 +02:00
Patrick Niklaus
7d124ce54d Close GH-2795: Rewrite cucumber test caching (and support logic). Fixes #2745 2016-09-19 14:13:44 -07:00
Moritz Kobitzsch
8522cddd61 Prevent loops in extraction based on merge 2016-09-19 13:33:52 +02:00
Daniel J. Hofmann
bf2b1a64b9 Fixes sign mismatch in Nearest limit comparison 2016-09-16 15:40:05 +02:00
Moritz Kobitzsch
70ee624e5c make changelog reasonable 2016-09-16 08:46:02 +02:00
Moritz Kobitzsch
3a49635eb7 remove dead code 2016-09-16 07:14:44 +02:00
Moritz Kobitzsch
aa5f8dce23 fix may be uninitialised warnings 2016-09-15 08:25:17 +02:00
Daniel J. Hofmann
c186e51a08 Do Not Copy Lane Strings Into Fn 2016-09-14 20:27:17 +02:00
Moritz Kobitzsch
861314256e fix roundabout-intersection on immediate exit 2016-09-13 19:16:45 +02:00
Moritz Kobitzsch
38f5adbe5c we can count 2016-09-13 16:22:22 +02:00
Moritz Kobitzsch
092e77e89b fix false positives in sliproads 2016-09-13 14:11:29 +02:00
Moritz Kobitzsch
64a72f574d also reserve entry for refs 2016-09-13 13:48:28 +02:00
Daniel Patterson
1b4a52e99c Update changelog for issue #2896 fix. 2016-09-12 15:14:50 -07:00
Michael Krasnyk
1d94eb88f6
Test for PR #2898
Test checks that osrm-extract terminates for
http://www.openstreetmap.org/way/198481519
2016-09-12 22:20:11 +02:00
Moritz Kobitzsch
b3c5a9c010 fix looping in sliproad handler for lanes 2016-09-12 18:20:28 +02:00
Daniel J. Hofmann
e3c1b133bf Adds a limit for number of results returned in Nearest service, resolves #2872 2016-09-12 11:59:08 +02:00
Daniel J. Hofmann
e6fe9d0d67 Fixes issue where two ways with same name but different pronunciation where deduplicated, resolves #2860 2016-09-09 18:28:44 +02:00
Daniel J. Hofmann
05c1fe7f46 We do duration based routing (also see #77); closes #2885 2016-09-09 16:27:00 +02:00
Daniel J. Hofmann
e3a38a6b0d Fixes compilation against newer Boost versions; seems like we were lucky before; closes #2889 2016-09-09 16:14:25 +02:00
Moritz Kobitzsch
2b9cf742c5 make sure to reserve enough external memory 2016-09-09 15:38:26 +02:00
Daniel J. Hofmann
a289e1cd96 Fixes bearing range of zero exhaustive graph traversal 2016-09-08 17:33:50 +02:00
Moritz Kobitzsch
c306a59854 make sure to not-collapse different travel modes 2016-09-08 15:01:25 +02:00
karenzshea
dcc1b5ab2b return name and reference separately 2016-09-08 14:28:23 +02:00
Moritz Kobitzsch
938dff011f handle all our new strings correctly, introduce rotary_pronunciation 2016-09-07 16:09:13 +02:00
Moritz Kobitzsch
9123c93a90 fix interaction between sliproads/segregated intersections 2016-09-07 12:36:29 +02:00
Moritz Kobitzsch
a551286a8f adjust testscases for collapse of use lane 2016-09-07 12:17:36 +02:00
Daniel J. Hofmann
86fd04e556 Improves lane handling for subsequent going straight, resolves #2625
Before we only worked on subsequent quick turns, as in:
`right, right` keeps the user on the rightmost lanes.

This changeset modifies the logic to work on any subsequent steps
that are "quick" and have lane information we can constrain later.

Because we do not have a from-lane => to-lanes mapping we take the
lanes left and right of the turn lanes into account when heuristically
assigning the leftmost / rightmost lanes.

There are some edge cases where this still does not give us the optimal
solution but it gets close to what is actually possible at the moment
without having a lane mapping in post-processing.

References:
- https://github.com/Project-OSRM/osrm-backend/issues/2625

fix rebase
2016-09-07 12:17:36 +02:00
Moritz Kobitzsch
b6dbf81206 don't assign lanes on delayed turns 2016-09-07 12:17:34 +02:00
Daniel J. Hofmann
af47252efe Do not collapse away lane information as long as it is necessary 2016-09-07 12:17:00 +02:00
Moritz Kobitzsch
3b81b39998 turn lane handler moved to scenario based handling 2016-09-07 12:16:59 +02:00
Moritz Kobitzsch
802b93fa9a fix testcases, one case only works by turn restriction, needs investigation 2016-09-07 12:04:17 +02:00
Daniel Patterson
7899444135 Add example request to the route API esection 2016-09-06 10:31:08 -07:00
Daniel Patterson
1ab2b87cc0 Update turn penalty function to better fit measured data 2016-09-06 09:07:00 -07:00
Moritz Kobitzsch
97c66c6c82 added some concerns regarding the angles/length of the turns 2016-09-06 09:57:33 +02:00
Daniel J. Hofmann
733207d4a1 Be more strict classifying staggered intersections, resolves #2824 2016-09-06 09:57:33 +02:00
Moritz Kobitzsch
a0ed70f0a2 don't detect sliproads at wrong locations, don't emit invalid instructions 2016-09-06 09:01:06 +02:00
Moritz Kobitzsch
d3a6b5a77e detect broken roundabout-taggings 2016-09-05 16:49:57 +02:00
Moritz Kobitzsch
7a523713c7 remove broken assertion 2016-09-05 15:06:56 +02:00
Moritz Kobitzsch
f7265892ed correctly detect loss of prefix/suffix 2016-09-05 15:03:21 +02:00
Moritz Kobitzsch
be266c7c2b fix copy-paste typo in guidance lib 2016-09-05 15:00:42 +02:00
Moritz Kobitzsch
b1b41435b6 Revert "make sure collapse only happens on valid indices"
This reverts commit 47a6cd5462.
2016-09-05 14:54:30 +02:00
Moritz Kobitzsch
8f32a80778 changelog entry 2016-09-05 14:52:14 +02:00
Moritz Kobitzsch
5d79e0ac2f catch infinite loops 2016-09-05 14:52:13 +02:00
Moritz Kobitzsch
47a6cd5462 make sure collapse only happens on valid indices 2016-09-05 12:41:33 +02:00
Moritz Kobitzsch
7528b27f99 mark broken case todo 2016-09-05 11:50:36 +02:00
Daniel Patterson
a4f9499305 Invalid string values in lanes:psv:backward should result in 0 lanes,
not `nil`.
2016-09-04 14:23:43 -07:00
Daniel J. Hofmann
bb244e28bb Adds a failing test case for 255 unicode code points
The OSM spec says "up to 255 full unicode chars", so we should be able
to handle 255 x 🐼 --- but we don't.

The internal limit is on 255 _bytes_ in the `std::string`, but there can
be up to four bytes in a utf8 encoded code point.

References:
- http://wiki.openstreetmap.org/wiki/API_v0.6#Tags
- http://www.fileformat.info/info/unicode/char/1f43c/browsertest.htm
- https://en.wikipedia.org/wiki/UTF-8#Description
2016-09-02 16:10:32 +02:00
Moritz Kobitzsch
6fac14dbd8 ignore invalid only_* restrictions 2016-09-01 09:14:01 +02:00
Daniel J. Hofmann
8b144f22c9 Exposes osrm::exception for client usage, resolves #2813 2016-09-01 09:12:35 +02:00
karenzshea
146eb3a20e add test case for ignoring unknown restrictions 2016-08-31 09:52:05 -04:00
karenzshea
d8e444e620 explicitly return false for no_* restrictions 2016-08-31 08:33:56 -04:00
Patrick Niklaus
da9d63a384
Always overwrite m_is_core_node on data swap
This fixes a seg fault when swapping between core/no core datasets
2016-08-30 17:31:08 +02:00
Patrick Niklaus
c5e85f3d6d
Set parent nodes of core entry nodes not to themselves 2016-08-30 17:31:08 +02:00
Patrick Niklaus
e05750547c Merge pull request #2800 from oxidase/fix/2785
[ready] Don't use --gc-sections gold option for binutils < 2.25
2016-08-29 15:13:33 +02:00
Patrick Niklaus
315823cce1 Use service tag to penaltize alleys and forbid emergency access 2016-08-29 14:15:22 +02:00
Patrick Niklaus
6ff07f4e82 State all turn penalties in seconds 2016-08-29 13:54:56 +02:00
Michael Krasnyk
41b54cf25d
Don't use gold gc-sections for binutils < 2.25
Issue 2785: check gold binutils version and don't use gc-sections for versions prior 2.25
due to https://sourceware.org/bugzilla/show_bug.cgi?id=17639

readelf --debug-dump=frames build/libosrm_extract.so
Contents of the .eh_frame section:
...
readelf: Warning: Invalid length 0xfff01dd8 in FDE at 0x000020
2016-08-25 23:51:25 +02:00
Patrick Niklaus
5ee15ee339
Use webkit code snippet to detect GNU gold 2016-08-25 22:45:49 +02:00
Patrick Niklaus
01b0bce2d5
Use gold linker by default if available 2016-08-25 22:45:49 +02:00
Patrick Niklaus
cb57ccacef Merge pull request #2805 from rkcpi/centos-build-fix
Fix build on CentOS
2016-08-25 10:43:43 +02:00
Moritz Kobitzsch
7e0d14b113 make collapse work by better detecting continue/non-continue situations 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
d06eec5e42 improve segregated road detection 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
9648821a79 handle missing cases, cleaning up 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
21fb18fe5e identify merges on non-perception cases 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
6a2518c0df handle stronger merge cases as well 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
7886d06839 adjust angles pre-merge as well 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
5a9eb6ef72 prepare solution 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
b6c3d1d5bf Cucumber Scenario for #2725 2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
9b2f6585fb handle non-through case 2016-08-24 10:12:27 +02:00
Moritz Kobitzsch
46fd17a9ff moved obviousness discovery. updated sliproad handler. back to original cases failing 2016-08-24 10:12:27 +02:00
Daniel J. Hofmann
da73bae9c6 Scenario for unnecessary slight left onto Stralauer Str 2016-08-24 10:12:27 +02:00
Moritz Kobitzsch
766e2713ab fix segmentation fault for via-routes with invalid intermediate segments 2016-08-23 14:17:32 +02:00
Sandra Thieme
9957254a5a Use c++1y instead of c++14 2016-08-23 13:01:07 +02:00
Patrick Niklaus
9f6859561c Merge pull request #2796 from frodrigo/update_car_profile_from_omim
Add local maxspeed for Netherland
2016-08-22 23:20:17 +02:00
Frédéric Rodrigo
88573a66cd Add local maxspeed for Netherland 2016-08-22 18:53:33 +02:00
Moritz Kobitzsch
3ccbe9842c
add a PR template to the repo 2016-08-19 14:21:20 +02:00
Daniel J. Hofmann
5971822f82
Enable data flow guided fuzzing using traces 2016-08-19 13:59:59 +02:00
Daniel J. Hofmann
cdf6baba1d
Add fuzz testing drivers for json escaping and uri decoding 2016-08-19 13:59:59 +02:00
Daniel J. Hofmann
4b7ddb6826
Add fuzz testing drivers for url and request parser 2016-08-19 13:59:59 +02:00
Daniel J. Hofmann
06b74c1f08
Add fuzz testing drivers for all parameters 2016-08-19 13:59:59 +02:00
Daniel J. Hofmann
3a0eed2ee5
Make sanitizer used for Fuzz testing configurable via FUZZ_SANITIZER 2016-08-19 13:59:59 +02:00
Daniel J. Hofmann
2557bdcf39
Basic Fuzz Testing.
[100%] Fuzzing libosrm
    /tmp/osrm-backend/build/fuzz/driver -max_len=4096 corpus  > fuzz-0.log 2>&1
    /tmp/osrm-backend/build/fuzz/driver -max_len=4096 corpus  > fuzz-1.log 2>&1
    /tmp/osrm-backend/build/fuzz/driver -max_len=4096 corpus  > fuzz-2.log 2>&1
    /tmp/osrm-backend/build/fuzz/driver -max_len=4096 corpus  > fuzz-3.log 2>&1

References:
- http://llvm.org/docs/LibFuzzer.html
- http://llvm.org/releases/3.8.0/docs/LibFuzzer.html
- https://github.com/Project-OSRM/osrm-backend/issues/1678
2016-08-19 13:59:59 +02:00
Patrick Niklaus
12d478784b
Enable toll roads by default again.
Currently we don't route over the Golden Gate bridge by default.
This sets the value to false by default. To test the behavior for
tolls when ignored, we would need issue #2781 implemented.
2016-08-19 13:01:15 +02:00
Moritz Kobitzsch
38fef77d70
additional collapse cases 2016-08-19 12:43:51 +02:00
Moritz Kobitzsch
e8bae78749
fix errors introduced in refactor 2016-08-18 11:36:36 +02:00
Moritz Kobitzsch
e14bc30428
adjusted for comments 2016-08-18 11:36:36 +02:00
Moritz Kobitzsch
9485c97738
adjusting u-turn handling in lane matching to fully fix 2706 2016-08-18 11:36:36 +02:00
Patrick Niklaus
11aed6c93e Merge pull request #2734 from oxidase/gdb-printers
Added gdb pretty printers
2016-08-18 11:24:16 +02:00
Daniel J. Hofmann
d53c267129
Be more aggresive classifying Roundabout Intersections.
Roundabout Intersections are roundabouts with up to four ways and turn
angles which makes the turns obvious, e.g. as in:

```
    *
    *
* *   * *
    *
    *
```

but not

```
     *
    *
* *   *
    * *
     * *
```

For Roundabout Intersections we issue instructions such as
"turn <direction>" instead of "take the <nth> exit".

At the moment we have a limit on the radius for these Roundabout
Intersections of 5 meters. Which fails to classify a wide range of
Roundabout Intersections in the US (with the US-wide streets).

This changeset removes the Roundabout Intersection radius limit:

- if the roundabout is larger than a threshold and is named we classify
  it as a rotary

- if the roundabout matches our criteria for Roundabout Intersections
  we classify it as a Roundabout Intersection

- else fallback to plain old Roundabout

There is a second issue with determining a roundabout's radius.
But that's for another pull request (tracking in #2716).

References:
- https://github.com/Project-OSRM/osrm-backend/issues/2716
2016-08-18 10:50:32 +02:00
Patrick Niklaus
2f6de614c1
Ignore any following columns in a CSV file 2016-08-18 10:19:36 +02:00
Moritz Kobitzsch
087080a6c3 mark via-case todo to prevent known failure to show up in local cucumber 2016-08-15 15:52:47 +02:00
Patrick Niklaus
41b22916f3 Merge pull request #2756 from gojuno/turn_annotation_bugfix
JSON instruction serialization fix.
2016-08-12 19:14:47 +02:00
Lev Dragunov
89f1071947 Static checks for guidance array sizes. 2016-08-12 18:52:54 +03:00
Moritz Kobitzsch
464de785cb fix removal of multiple geometries for first vertex 2016-08-09 12:02:07 +02:00
Lev Dragunov
8986777c58 JSON instruction serialization fix. 2016-08-08 20:32:01 +03:00
Daniel Patterson
65def1a9e2 We should be returning an error if any errors that occur during reprocessing. 2016-08-05 15:11:12 -07:00
Daniel Patterson
176c2244ad Catch and report errors during osrm-contract tests. 2016-08-05 14:19:22 -07:00
Daniel J. Hofmann
b161e10b73 No Go To 2016-08-05 18:32:42 +02:00
Daniel J. Hofmann
5bef5dcb04 Disable our added failing cucumber tests for now 2016-08-05 18:32:42 +02:00
Daniel J. Hofmann
46a4c27582 Fall back to generic match finding if not a reverse-lane 2016-08-05 18:32:42 +02:00
Daniel J. Hofmann
acc6da86de Skip handling none values for our edge cases for now..
Conflicts:
	src/extractor/guidance/turn_lane_augmentation.cpp
2016-08-05 18:32:42 +02:00
Daniel Patterson
4d84bc0f01 Add a minimal version of the failing test case. 2016-08-05 18:32:42 +02:00
Daniel J. Hofmann
c737635a3b Reproducing breaking intersection in cucumber scenario
Conflicts:
	src/extractor/guidance/turn_lane_augmentation.cpp
2016-08-05 18:32:42 +02:00
Daniel J. Hofmann
b7eeafb183 Try to come up with a small test case 2016-08-05 18:32:42 +02:00
Patrick Niklaus
677306eeee Merge pull request #2707 from oxidase/left_side_driving
Left side driving
2016-08-05 18:09:10 +02:00
Patrick Niklaus
2284ebaacb
[skip ci] Iterate on the release docs 2016-08-05 18:07:28 +02:00
Patrick Niklaus
6b4975b2e4
Fix the release branch 2016-08-05 18:07:28 +02:00
Johan Uhle
94c38d115a
Fixing up the release flow docs
- Clarifying guarantees between patch/minor/major versions
- Consolidating version release flow into one flow for patch/minor/major versions
- Add constraint that all minor/major released code needs to have had a release candidate before
2016-08-05 18:07:28 +02:00
Daniel J. Hofmann
b1e309b4eb
Collapse Staggered Intersections.
Staggered intersection are very short zig-zags of only a few meters.
They are common in rural and exurban areas, especially in the US.

(In addition, these cases could as well be tagging issues)

We do not want to announce these short left-rights or right-lefts:

          * -> b      a -> *
          |       or       |       becomes  a   ->   b
     a -> *                * -> b

Here is one example:

- https://www.openstreetmap.org/edit#map=20/39.26017/-84.25182

And here are two edge-cases that we don't handle at the moment:

- http://www.openstreetmap.org/edit#map=20/38.87900/-76.98519
- http://www.openstreetmap.org/edit#map=19/45.51056/-122.63462

and probably should not handle since the distance in between is
quite long (roughly 7-15 meters). For these we want to announce
two turns to not confuse the user.

Thanks to @1ec5 for raising this issue and @karenzshea for
providing additional US examples and cultural insights.
2016-08-05 14:35:13 +02:00
Patrick Niklaus
e8ce119972 Merge pull request #2743 from Project-OSRM/avoid-10m-timeout
Set cacher timeout just under 10 minutes
2016-08-05 10:32:12 +02:00
Dane Springmeyer
8b7cd2931b set cacher timeout just under 10 minutes 2016-08-04 17:16:53 -07:00
Daniel J. Hofmann
8bee57b0b0 Makes toll=yes way's routability configurable in profiles.
The primary use-case is conditionally filtering ways such as:

https://www.openstreetmap.org/edit#map=18/38.94198/-77.28127

which we are guiding the user onto in the route from DC to IAD:

http://map.project-osrm.org/?z=12&center=38.934443%2C-77.167969&loc=38.902656%2C-77.029095&loc=38.952210%2C-77.453424&hl=en&alt=0

This changeset makes `toll=yes` configurable in the profiles, disabling
them by default. Neither do we support time-based fees nor vehicle
category fees at the moment.

References:
- http://wiki.openstreetmap.org/wiki/Key:toll
2016-08-04 14:29:22 +02:00
Patrick Niklaus
6bfe3a2d41 Merge pull request #2733 from gavinsherry/master
Remove unused variable node_info_list
2016-08-04 11:24:33 +02:00
Daniel J. Hofmann
7f71f0ed12 Warn on unused return values in guidance code, resolves #2686.
https://github.com/Project-OSRM/osrm-backend/pull/2685/files

fixes an issue where we did

    elongate(fstStep, sndStep);

instead of

    newStep = elongate(fstStep, sndStep);

we didn't get any warnings.

The only way to trigger a warning here is to use

```cpp
__attribute__((warn_unused_result))
```

This changeset does exactly that: for the new guidance code prone to
these kind of issue we add such an attribute to the declaration.
2016-08-03 12:26:07 +02:00
Daniel J. Hofmann
583aaff286 Makes designated HOV way's routability configurable in profiles.
Why only `hov=designated` and not all access tags, such as `hov:yes`,
`hov=no` and so on? From the Wiki:

- designated: The way is designated to high occupancy vehicles.
- yes: High occupancy vehicles are allowed. This by itself does not imply that other vehicles are restricted from using the way.
- no: High occupancy vehicles are not allowed on the way. This by itself does not imply that other vehicle types are allowed to use it.

The primary use-case is conditionally filtering ways such as:

http://www.openstreetmap.org/way/11198593#map=19/37.82571/-122.30521&layers=D

In addition there is a notion of HOV lanes for lane handling:

http://wiki.openstreetmap.org/wiki/Key:hov#hov:lanes.3D.2A

This changeset does not handle lanes at all, only designated HOV ways.
For HOV lane support, a logic similar to the lane access handling needs
to be implemented. This needs to go hand in hand with the existing lane
handling introduced in:

7d076e9344

References:
- #2711
- http://wiki.openstreetmap.org/wiki/Key:access
- http://wiki.openstreetmap.org/wiki/Key:hov#Values
2016-08-03 12:24:43 +02:00
Daniel J. Hofmann
b24f5c7c1a Adapt lane dump to lanes at intersection (#2675), resolves #2709 2016-08-03 12:19:14 +02:00
Daniel J. Hofmann
026f71934b Adds Cucumber Scenario for sharp left turn at traffic light 2016-08-03 12:18:31 +02:00
Michael Krasnyk
1353d55880
Added gdb pretty printers 2016-08-02 23:32:42 +02:00
Gavin Sherry
b09f637d02 Remove unused variable node_info_list 2016-08-02 14:17:57 -07:00
Michael Krasnyk
979f9cab20
Added test for issue #2706 2016-08-02 19:06:10 +02:00
Michael Krasnyk
eb6083daf5 Fix travis build 2016-08-02 12:31:46 +02:00
Daniel J. Hofmann
c4718495a0
Add Florida Ave NW scenario for TurnLeft instead of MergeRight 2016-07-30 23:55:39 +02:00
Moritz Kobitzsch
0d36d472c9
change paradigm of merge to only emit on motorway-like roads 2016-07-30 23:55:39 +02:00
Daniel Patterson
35422a0fb5
Clang format. 2016-07-30 23:53:38 +02:00
Daniel Patterson
d012b44b7f
Filter out edges that have any speed=0 segments.
They become non-snappable and non-routable.  Note that a single segment
of speed=0 will eliminate the entire edge.
2016-07-30 23:53:38 +02:00
Patrick Niklaus
eda6d9dc7c
Builds components on travis again 2016-07-30 23:49:35 +02:00
Patrick Niklaus
63c86198a3
Fix compilation of components.cpp 2016-07-30 23:49:35 +02:00
Patrick Niklaus
33bdfe9cf9 Merge pull request #2720 from oxidase/issue/2706
Fix #2706 by using correct fallback u-turn
2016-07-30 16:25:26 +02:00
Michael Krasnyk
a87c5998a1
Fix #2706 by using correct fallback u-turn
Regression is due to a combination of 08248e3853
and http://www.openstreetmap.org/changeset/40938983
where in ways http://www.openstreetmap.org/way/27292481
and http://www.openstreetmap.org/way/432488408
nodes
4315134884 (part of way 432488408)
4315134891 (part of way 432488408)
4315134886 (part of way 432488408)
form a u-turn that has index 0 after sorting and used as an allowed one
with a reversed edge.
A u-turn that corresponds to the condition uturn_could_be_valid == true has index 1
and ignored.
2016-07-30 12:15:22 +02:00
Michael Krasnyk
c918a7957b
Updated format and ChangeLog 2016-07-28 22:59:22 +02:00
Michael Krasnyk
61e6afdef0
added a lanes test in clockwise roundabouts 2016-07-28 22:59:22 +02:00
Michael Krasnyk
95dc36e908
addressed comments
Signed-off-by: Lauren Budorick <lauren@mapbox.com>
2016-07-28 22:59:22 +02:00
Lauren Budorick
951a4dc112
commit test file 2016-07-28 22:59:22 +02:00
Lauren Budorick
c09b9b4c99
Initial left hand driving implementation 2016-07-28 22:59:22 +02:00
Patrick Niklaus
b0873e2aa4 Merge pull request #2712 from Project-OSRM/talk-to-us
Talk to us!
2016-07-28 11:11:00 +02:00
Daniel J. Hofmann
2bdb8fce63 Talk to us! 2016-07-28 11:01:51 +02:00
Konstantin Shalnev
d8a692740a Added 'return EXIT_SUCCESS' (#2710) 2016-07-27 16:31:57 -07:00
Patrick Niklaus
14797c421e Reformated the docs for annotations 2016-07-27 15:51:11 -07:00
Daniel Patterson
280b000f07 Include datasources for each segment in route annotation. 2016-07-27 15:51:11 -07:00
Daniel J. Hofmann
fb4834458e No longer hard crash datastore on unrecognised options 2016-07-27 11:33:56 +02:00
Patrick Niklaus
c7a1576100
Apply clang-format again 2016-07-26 15:00:58 +02:00
Daniel Patterson
aebf6fa0b1
[skip ci] Update format script to enforce clang-format version, and work on OSX 2016-07-26 15:00:14 +02:00
Johan Uhle
f76e3d4522 Docs: Clarify turn lanes on missing data
After https://github.com/Project-OSRM/osrm-backend/issues/2675#issuecomment-235230198
2016-07-26 13:18:01 +02:00
Daniel J. Hofmann
eaf42ba437
Moves invalid id warnings to debug, closes #2630 2016-07-26 13:01:31 +02:00
Patrick Niklaus
e83905b783
Fix exception handling around unrecognised options 2016-07-26 11:43:08 +02:00
Daniel Patterson
0b868969be
Remove generic std::exception handlers, they don't seem to be adding value, and they hide useful info. 2016-07-26 11:43:08 +02:00
Patrick Niklaus
b4710633b1
Rename function to reduce confusion 2016-07-26 11:23:14 +02:00
Moritz Kobitzsch
7d076e9344
handle access flags for lanes 2016-07-25 20:01:58 +02:00
Dane Springmeyer
71d64e8cd9
Default to c++14 / drop g++-4.8 from testing matrix 2016-07-25 19:30:43 +02:00
Daniel J. Hofmann
748fd3efa9
Remove lanes from roundabouts, closes #2626
After half a day of looking at the tagging and the data came to the
following conclusion:

We can't keep the user to the innermost / outermost lanes depending on
the exit the route takes: we found situations where both heuristics were
wrong.

Even on popular roundabouts the tagging is often wrong or in the best
case not present at all.

There are at least two different ways to interpret roundabout
indications: 1/ where e.g. a right arrow on the lane indicates turn
restrictions for the roundabout and the need to take this lane to exit
the roundabout to the right (possibly skipping multiple exits) and 2/
where a right arrow just means this is a lane in a immediate right turn.

Example: Australia marks lanes with arrows that seem to indicate
"angles you can exit the roundabout from", for example, these two ways:
- http://www.openstreetmap.org/way/320941710
- http://www.openstreetmap.org/way/42918021

Whereas Germany marks lanes with "directions you can travel in these
lanes immediately after entering the roundabout":
- http://www.openstreetmap.org/way/52578338

These two different interpretations of how to draw the arrows on the
roads mean we have conflicting solutions to "which lanes can you use to
take exit B from entry A" based on locality.

Continuing to tag ways based on lane markings is no problem, but
unfortunately, we can't reliably resolve good advice for navigation
system users (like "use the inside lane to take the second exit at the
roundabout"), there are too many situations that would generate bad
instructions (instructions that tell users to go into a lane they
shouldn't use).
2016-07-25 19:29:55 +02:00
Moritz Kobitzsch
1fc63e1e72
move hardcoded road priorities into profiles, change road classification 2016-07-25 13:07:54 +02:00
Daniel J. Hofmann
fd6bb5ec1f Lane Handling for multiple indications per lane as in left;left|, fixes #2694
Before we asserted on unique lane indications per lane. Turns out the
OSM data contains lane strings such as:

    left;left|right

Which represents two lanes as in:

    <<     >
     ||    |

The two left indications _on a single lane_ look like data issue.
And we can't represent this with our enum-approach at the moment.

We don't want to crash there, so silently swallow this and
generate a single left|right for it.
2016-07-25 12:17:23 +02:00
Patrick Niklaus
261dbf3edd
Fix log output of osrm-extract 2016-07-25 12:03:30 +02:00
Moritz Kobitzsch
9e323d2d42
improve sliproad / fork handling 2016-07-22 15:16:59 +02:00
Konstantin Käfer
1309dd2a0f
Switch profiles from Lua to library interface
There's now an abstracted interface and no direct calls to Lua anymore.

fixes #1974
2016-07-22 15:03:57 +02:00
Patrick Niklaus
9b737230d6
Reenable ARM builds 2016-07-22 13:57:57 +02:00
Patrick Niklaus
ecbd709535
Update the changelog for 5.3.0 2016-07-22 13:57:28 +02:00
Patrick Niklaus
060ec99678
Fix devide by zero when updating speeds 2016-07-21 18:57:21 +02:00
Dane Springmeyer
3601d1d262
increase travis cacher timeout to ensure large caches are able to be uploaded and downloaded 2016-07-21 17:58:57 +02:00
Moritz Kobitzsch
41ba20ca9a switch api format to new structure 2016-07-21 17:42:10 +02:00
Patrick Niklaus
57e3f173d3
[skip ci] Update docker files to gcc 5 2016-07-21 17:19:35 +02:00
Patrick Niklaus
92c298c7cf
[skip ci] Fix example URLs in readme 2016-07-21 17:08:39 +02:00
Moritz Kobitzsch
b25011ee60 fix use-lane handling 2016-07-21 16:37:54 +02:00
Moritz Kobitzsch
0e017a6ce5 collapse use-lane instructions if possible 2016-07-20 10:23:26 +02:00
Moritz Kobitzsch
2431e15ffa mark second case as todo, see https://github.com/Project-OSRM/osrm-backend/issues/2661 2016-07-20 09:55:30 +02:00
Moritz Kobitzsch
396add1e9d make roundabout maneuvers continuous with respect to lane changes 2016-07-20 09:55:30 +02:00
Patrick Niklaus
86241a2793
[skip ci] Add docs for contributing 2016-07-19 17:38:03 +02:00
Moritz Kobitzsch
ee47afbe17 fix 2672 2016-07-19 17:06:47 +02:00
Moritz Kobitzsch
8831ca2f32 fix roundabouts with traffic lights 2016-07-19 14:49:09 +02:00
Daniel J. Hofmann
abde215bc3 Remove semantically wrong ordering for LaneTupel 2016-07-18 12:33:56 +02:00
Daniel J. Hofmann
130d5298fc Fixes Undefined Behavior in LaneTupel (Strict Aliasing), resolves 2665
It's complicated :sigh: read this please:
http://dbp-consulting.com/tutorials/StrictAliasing.html

tl;dr: has to go through a memcpy (in C++) as in:
184cc11cee/src/support/utilities.h (L29-L40)
2016-07-18 12:32:25 +02:00
Moritz Kobitzsch
50cbba1620 adding a todo testscase / regression test-case 2016-07-15 10:35:25 +02:00
Patrick Niklaus
2cc293ad16
[skip ci] Update changelog for RC3 2016-07-13 21:57:07 +02:00
Patrick Niklaus
6ac65a922f
Disable ARM builds until sourceforge comes up again 2016-07-13 14:19:33 +02:00
Patrick Niklaus
3d80f989d0
Fix tests after cucumber update and changed escaping. 2016-07-13 11:48:53 +02:00
Patrick Niklaus
4fcb5d28a4 Merge pull request #2624 from oxidase/issues/2617
Fix ambiguous data issues
2016-07-13 11:20:40 +02:00
Patrick Niklaus
3ebdacf369 Merge pull request #2629 from ssuluh/master
Fix windows compilation with regard to struct/class packing
2016-07-13 11:08:34 +02:00
Moritz Kobitzsch
2ddc00c21e
update cucumber to 1.2.1 and remove hack 2016-07-13 11:04:35 +02:00
Daniel J. Hofmann
e76e39a398
Improves Lane Handling for Multi-Hop Roundabout Instruction
This changeset implements Lane Anticipation on roundabouts, delimited
by enter / leave step pairs. It does not handle lane anticipation
within a roundabout.

Lane anticipation happens on the granularity of a valid roundbaout:

We discard partial roundabout (enter without exit or exit without
enter) or data issues (no roundabout, exit before enter).

Related:

- https://github.com/Project-OSRM/osrm-backend/issues/2626 for lanes
  within a roundabout

- https://github.com/Project-OSRM/osrm-backend/issues/2625 for handling
  going straight in lane anticipation
2016-07-13 10:44:12 +02:00
Patrick Niklaus
04667f1ed8
Log incoming requests before they are processed 2016-07-11 16:50:09 +02:00
Surya Suluh
2091c3443b Fix windows compilation with regard to struct/class packing 2016-07-11 09:47:04 -04:00
Michael Krasnyk
2b466b2fb2
Fix ambiguity in edges by using names lexicographical order 2016-07-11 05:54:30 +02:00
Michael Krasnyk
e17b306265
Fix ambiguity in edge weights by using minimal weight 2016-07-08 18:20:55 +02:00
Daniel J. Hofmann
b00b15ab98 Manual modernize run with LLVM 3.8
More is blocked by:
- https://github.com/Project-OSRM/osrm-backend/issues/2631
2016-07-07 12:45:24 +02:00
Moritz Kobitzsch
f4db79fe9b fix obvious turn collapsing for straight turns 2016-07-06 10:50:47 +02:00
Moritz Kobitzsch
0e4061f858 deduplicate code for roundabout handling 2016-07-01 11:34:44 +02:00
Moritz Kobitzsch
043a1446e1 adjust changelog (mention both files) and update a typo 2016-06-30 10:39:05 +02:00
Moritz Kobitzsch
49221995e8 add documentation on use lane type 2016-06-28 17:53:31 +02:00
Moritz Kobitzsch
247a7488b8 Adjusting Changelog 5.3.0-rc.2 to follow scheme 2016-06-28 13:25:35 +02:00
Moritz Kobitzsch
1806198971 Prepare Update to 5.3.0 RC2 2016-06-28 13:22:33 +02:00
Moritz Kobitzsch
375331b80c fixing lua issue in profile 2016-06-28 12:59:02 +02:00
Patrick Niklaus
8fdbe965cc
[skip ci] Fix documentation 2016-06-28 11:08:37 +02:00
Patrick Niklaus
dc77d02e8a
Change OSRM version to 5.3.0 2016-06-28 10:35:45 +02:00
Moritz Kobitzsch
6265b8fa77
fix broken assertion 2016-06-28 10:30:02 +02:00
Moritz Kobitzsch
311b348d09
handle sliproads at traffic lights 2016-06-28 10:23:22 +02:00
Daniel Patterson
ec02cdc4cc Use mmap instead of read - it's a lot faster here.
Also clean up construction of STRONG_TYPEDEF so that it can be
packed properly in structs (this explains all the () -> {}) changes
here.
2016-06-27 17:24:30 -07:00
Moritz Kobitzsch
5905708111 expose lanes as enums, adjusted for comments 2016-06-27 11:12:02 +02:00
Moritz Kobitzsch
5d91b759d1 Implement Turn Lane Api 2016-06-27 10:07:48 +02:00
Daniel J. Hofmann
ec0a1a4ab1 Anticipate Lane Changes 2016-06-27 10:07:43 +02:00
Moritz Kobitzsch
efa29edf09 basic turn lane handling 2016-06-27 10:07:41 +02:00
Moritz Kobitzsch
2a05b70dfc
reduce number of end-of-road instructions in unnecessary cases 2016-06-26 16:40:15 +02:00
Patrick Niklaus
8693e68271 Merge pull request #2588 from Project-OSRM/fix/bike_surface_speeds
bike: surface should never increase speed
2016-06-26 16:37:12 +02:00
Emil Tin
d21a9a514d bike: surface should never increase speed 2016-06-25 12:52:54 +02:00
Moritz Kobitzsch
e03d132823
fix invalid circle centers 2016-06-24 15:12:51 +02:00
Daniel J. Hofmann
61ba985bc9
Prevent linker from discarding TBB symbols we need, fixes #2557
We build `osrm_contract` (the library) linking in libtbb. We then
build `osrm-contract` (the binary) linking in `osrm_contract` (the
library).

Because we're only using TBB's `parallel_invoke` in the code for the
binary, it seems like the linker discards some symbols in the library.

Therefore we have to link libtbb for the binary again. Even worse, the
order now matters: if we first link in `osrm_contract` and then libtbb,
we're still hitting the issue re. discarded symbols.

Therefore we first link in all dependencies (libtbb, libboost*), and
only then `osrm_contract`.

Strictly speaking, we probably have to do this for all of our binary
targets, or we will hit similar issues in the future.
2016-06-24 12:06:28 +02:00
Moritz Kobitzsch
4629a20fe4
improve handling of obvious for end-of-road situations 2016-06-24 12:05:42 +02:00
Patrick Niklaus
a28125ee9a Merge pull request #2577 from noblige/noblige/compile-armv7
option to disable LTO
2016-06-24 12:04:02 +02:00
Daniel J. Hofmann
df877aca1b Hard-abort on assertion and show detailed information, solves #2579
From

> [warn} oops

to

> [assert] /tmp/osrm-backend/src/extractor/extractor.cpp:79
> in: int osrm::extractor::Extractor::run(): false
> terminate called without an active exception
2016-06-23 18:57:35 +02:00
Aleksei Potov
05dc415aba option to disable LTO 2016-06-23 09:44:02 -07:00
Daniel Patterson
6dedd9cb72 Fix segfault when route includes very short segments. 2016-06-22 14:48:57 -07:00
Daniel J. Hofmann
256d39b572 Sync OSRM version in CMakeLists, fixes #2576 2016-06-22 17:03:31 +02:00
Patrick Niklaus
d186ae1863
Fix semi-colon warnings 2016-06-22 13:20:55 +02:00
Patrick Niklaus
fddc19e98d
Fix regressed formating 2016-06-21 22:25:48 +02:00
Lauren Budorick
2592cd2e58
Update tests to catch 0-subtraction error 2016-06-21 19:31:46 +02:00
Patrick Niklaus
93b6438cea
Fix fromTop and fromLeft calculation 2016-06-21 19:31:46 +02:00
Daniel J. Hofmann
f6746d88b7
Removes unused -s from osrm-datastore, use osrm-springclean tool, closes #2561 2016-06-21 18:09:11 +02:00
Daniel J. Hofmann
34ace4dd4b
Let Travis fail fast if CMake/Clang download fails, fixes #2433 2016-06-21 18:08:19 +02:00
Daniel J. Hofmann
41d0f42ddf
Show user hint on wrong Node.js version, fixes #2435.
This is more of a hack but looks like the best we can do.

The reason for this is the following:

1/ we require strict mode for our v4 script

2/ v0.10 in strict mode marks 'let' as a reserved keyword,
   aborting before execution any code in the script. Thus,
   we can't assert e.g. on process.versions['node'] !== '4'.
2016-06-21 18:07:35 +02:00
Moritz Kobitzsch
2868f702a5
fix issues with roundabouts and intersections and sliproads 2016-06-21 16:56:57 +02:00
Patrick Niklaus
ec4dcee8bd Merge pull request #2549 from oxidase/issue/2546
Fix omitting the last point's coordinates in the geometry field
2016-06-21 16:41:35 +02:00
Michael Krasnyk
8c378191df
Fix omitting the last point's coordinates in the geometry field 2016-06-21 07:06:43 +02:00
Daniel J. Hofmann
b98431e8e6
Use BaseDataFacades in guidance and prevent ODR violations with inline 2016-06-21 00:49:06 +02:00
Moritz Kobitzsch
3c8781855e
handle steep off-ramps 2016-06-21 00:47:43 +02:00
Patrick Niklaus
27a94f3ca6 Merge pull request #2504 from oxidase/issue/2502
Fixes for i686 and armhf platforms
2016-06-20 22:01:09 +00:00
Michael Krasnyk
04e334e3e2
Make storage blocks aligned to 4 bytes for ARM NEON/VFP instructions
Aligned blocks prevent bus errors in NEON/VFP instructions.

Block pointers are aligned to 4 bytes, that is guaranteed
by aligned mmaped-pointers, the 4 bytes size of the CANARY block and
aligned sizes of blocks.
2016-06-20 22:45:40 +02:00
Michael Krasnyk
12d4832037
Fix platform-independent data in data files 2016-06-20 22:45:40 +02:00
Michael Krasnyk
6e4f6fec91
Added armhf Travis build 2016-06-20 22:45:40 +02:00
Michael Krasnyk
57c9525e5c
Added i686 Travis build 2016-06-20 22:45:40 +02:00
Michael Krasnyk
543e4fb57d
Fix rounding issue in query coordinates by using toFixed
that internally uses boost::numeric_cast<std::int32_t>
instead of static_cast<std::int32_t>
2016-06-20 22:45:40 +02:00
Michael Krasnyk
3881ead8e5
Fix rounding issue due to non-associative floating arithmetic
Failing test
features/car/traffic_turn_penalties.feature:33

Tables were not identical:
    from |     to |     route |     speed |     time
|     a |     h |     ad,dhk,dhk |     63 km/h |     11.5s +-1 |
|     i |     g |     fim,fg,fg |     59 km/h |     12s  +-1 |
| (-) a | (-) e | (-) ad,de,de | (-) 57 km/h | (-) 12.5s +-1 |
| (+) a | (+) e | (+) ad,de,de | (+) 58 km/h | (+) 12.5s +-1 |
|     c |     g |     cd,de,ef,fg,fg |     63 km/h |     23s +-1 |
|     p |     g |     mp,fim,fg,fg |     61 km/h |     23.5s +-1 |
|     a |     l |     ad,dhk,kl,kl |     60 km/h |     24s +-1 |
|     l |     e |     kl,dhk,de,de |     59 km/h |     24.5s +-1 |
|     g |     n |     fg,fim,mn,mn |     57 km/h |     25s +-1 |
2016-06-20 22:45:40 +02:00
Michael Krasnyk
911d1e81b6
Make explicit promotion to int64_t
to avoid incorrect promotions for 32 bit size_t
2016-06-20 22:45:40 +02:00
Michael Krasnyk
ae06300c17
Fix unused variables warnings in crc32 2016-06-20 22:43:28 +02:00
Michael Krasnyk
26879ca91a
Make build directory configurable via OSRM_BUILD_DIR in tests 2016-06-20 22:43:28 +02:00
Moritz Kobitzsch
306744e5cb fix roundabout-handling when name changes 2016-06-17 11:02:14 +02:00
Moritz Kobitzsch
3ca32898a1
move guidance decision into debug header 2016-06-15 11:30:30 +02:00
2568 changed files with 531337 additions and 78749 deletions

7
.babelrc Normal file
View File

@ -0,0 +1,7 @@
{
"plugins": ["transform-class-properties"],
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}

View File

@ -46,7 +46,7 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
IncludeCategories:
- Regex: '^<'
Priority: 3
- Regex: '^"(osrm|util|engine|extract|contract)/'

View File

@ -1,4 +1,101 @@
---
Checks: '-clang-analyzer-*,google-*,llvm-*,misc-*,readability-*,-google-build-explicit-make-pair,-google-explicit-constructor,-google-readability-braces-around-statements,-google-readability-casting,-google-readability-namespace-comments,-google-readability-function,-google-readability-todo,-google-runtime-int,-llvm-namespace-comment,-llvm-header-guard,-llvm-twine-local,-misc-argument-comment,-readability-braces-around-statements,-readability-identifier-naming'
...
Checks: >
bugprone-*,
-bugprone-narrowing-conversions,
-bugprone-easily-swappable-parameters,
-bugprone-branch-clone,
-bugprone-misplaced-widening-cast,
-bugprone-exception-escape,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-integer-division,
-bugprone-reserved-identifier,
-bugprone-unhandled-self-assignment,
-bugprone-forward-declaration-namespace,
-bugprone-sizeof-expression,
-bugprone-throw-keyword-missing,
-bugprone-chained-comparison,
-bugprone-incorrect-enable-if,
-bugprone-switch-missing-default-case,
-bugprone-empty-catch,
-bugprone-unchecked-optional-access,
-clang-analyzer-*,
-clang-diagnostic-deprecated-declarations,
-clang-diagnostic-constant-conversion,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-no-malloc,
cppcoreguidelines-virtual-class-destructor,
google-*,
-google-build-explicit-make-pair,
-google-build-using-namespace,
-google-explicit-constructor,
-google-default-arguments,
-google-readability-braces-around-statements,
-google-readability-casting,
-google-readability-namespace-comments,
-google-readability-function,
-google-readability-todo,
-google-runtime-int,
-google-build-namespaces,
-google-runtime-references,
-google-readability-function-size,
llvm-*,
-llvm-namespace-comment,
-llvm-qualified-auto,
-llvm-include-order,
-llvm-else-after-return,
-llvm-header-guard,
-llvm-twine-local,
misc-*,
-misc-argument-comment,
-misc-const-correctness,
-misc-non-private-member-variables-in-classes,
-misc-unconventional-assign-operator,
-misc-no-recursion,
-misc-misplaced-const,
-misc-definitions-in-headers,
-misc-unused-parameters,
-misc-include-cleaner,
modernize-concat-nested-namespaces,
modernize-use-using,
performance-*,
-performance-no-int-to-ptr,
-performance-enum-size,
-performance-avoid-endl,
readability-*,
-readability-avoid-const-params-in-decls,
-readability-braces-around-statements,
-readability-container-size-empty,
-readability-convert-member-functions-to-static,
-readability-const-return-type,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-naming,
-readability-implicit-bool-conversion,
-readability-magic-numbers,
-readability-else-after-return,
-readability-inconsistent-declaration-parameter-name,
-readability-isolate-declaration,
-readability-identifier-length,
-readability-redundant-declaration,
-readability-uppercase-literal-suffix,
-readability-named-parameter,
-readability-qualified-auto,
-readability-suspicious-call-argument,
-readability-redundant-access-specifiers,
-readability-redundant-member-init,
-readability-static-definition-in-anonymous-namespace,
-readability-use-anyofallof,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-redundant-string-init,
-readability-non-const-parameter,
-readability-redundant-inline-specifier,
-readability-avoid-nested-conditional-operator,
-readability-avoid-return-with-void-value,
-readability-redundant-casting,
-readability-static-accessed-through-instance
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
test
build

30
.editorconfig Normal file
View File

@ -0,0 +1,30 @@
# EditorConfig is awesome: http://EditorConfig.org
#
# NOTE: Keep settings in sync with the master .clang-format file
#
# top-most EditorConfig file
root = true
# CMake configuration files
[{CMakeLists.txt,CMakeSettings.json,*.cmake}]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
# CI configuration files
[{.travis.yml,appveyor.yml}]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
# Unix shell scripts
[*.sh]
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true
# Windows shell scripts
[*.bat]
end_of_line = crlf
indent_style = space
trim_trailing_whitespace = true

2
.eslintignore Normal file
View File

@ -0,0 +1,2 @@
features/support/flatbuffers.js
features/support/fbresult_generated.js

18
.gitattributes vendored Normal file
View File

@ -0,0 +1,18 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.cpp text
*.hpp text
# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
# https://eslint.org/docs/latest/rules/linebreak-style#using-this-rule-with-version-control-systems
*.js text eol=lf

View File

@ -0,0 +1,65 @@
name: Build and Publish Docker Image
on:
release:
types: [published, prereleased]
env:
IMAGE_NAME: openharbor/osrm-backend
jobs:
publish:
strategy:
matrix:
docker-base-image: ["debian", "alpine"]
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_NAME }}
- name: Docker meta - debug
id: metadebug
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_NAME }}
flavor: |
latest=true
suffix=-debug,onlatest=true
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Build and push debug image
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/riscv64
file: ./docker/Dockerfile-${{ matrix.docker-base-image }}
tags: ${{ steps.metadebug.outputs.tags }}
build-args: |
DOCKER_TAG=${{ join(steps.metadebug.outputs.tags) }}-${{ matrix.docker-base-image }}
- name: Build and push normal image
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/riscv64
file: ./docker/Dockerfile-${{ matrix.docker-base-image }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
DOCKER_TAG=${{ join(steps.meta.outputs.tags) }}-${{ matrix.docker-base-image }}

30
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,30 @@
---
name: Bug Report
about: Report issue with osrm-backend
labels: Bug Report
---
# Issue
Please describe the issue you are seeing with OSRM.
Images are a good way to illustrate your problem.
**Note**: If your issue relates to the demo site (https://map.project-osrm.org) or routing provided on openstreetmap.org, be aware that they use separate [profile settings](https://github.com/fossgis-routing-server/cbf-routing-profiles) from those provided by default in `osrm-backend`.
If your issue relates to the demo site or openstreetmap.org behaviour, please check these profiles first to see if they explain the behaviour before creating an issue here.
# Steps to reproduce
Please provide the steps required to reproduce your problem.
- `osrm-backend` version being used
- OSM extract that was processed
- Processing commands (e.g. CH vs MLD processing)
- Server queries
If you're reporting an issue with https://map.project-osrm.org, please provide a link to the problematic request.
# Specifications
Please provide details of your development environment.
- Library/dependency versions
- Operating system
- Hardware

10
.github/ISSUE_TEMPLATE/feature.md vendored Normal file
View File

@ -0,0 +1,10 @@
---
name: Feature Request
about: Request a new feature in osrm-backend
labels: Feature Request
---
# Feature
Please describe the feature you would like to see in OSRM.
Images are often a good way to illustrate your requested feature.

19
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,19 @@
# Issue
What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.
Please read our [documentation](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/releasing.md) on release and version management.
If your PR is still work in progress please attach the relevant label.
## Tasklist
- [ ] CHANGELOG.md entry ([How to write a changelog entry](http://keepachangelog.com/en/1.0.0/#how))
- [ ] update relevant [Wiki pages](https://github.com/Project-OSRM/osrm-backend/wiki)
- [ ] add tests (see [testing documentation](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/testing.md))
- [ ] review
- [ ] adjust for comments
- [ ] cherry pick to release branch
## Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?

View File

@ -0,0 +1,84 @@
name: build and publish container image
on:
push:
tags:
- 'v*'
jobs:
publish:
strategy:
matrix:
docker-base-image: ["debian", "alpine"]
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
- name: Docker meta - debug
id: metadebug
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=true
suffix=-debug,onlatest=true
- name: Docker meta - assertions
id: metaassertions
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=true
suffix=-assertions,onlatest=true
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image - debug
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
file: ./docker/Dockerfile-${{ matrix.docker-base-image }}
tags: ${{ steps.metadebug.outputs.tags }}
build-args: |
DOCKER_TAG=${{ join(steps.metadebug.outputs.tags ) }}-${{ matrix.docker-base-image }}
- name: Build container image - assertions
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
file: ./docker/Dockerfile-${{ matrix.docker-base-image }}
tags: ${{ steps.metaassertions.outputs.tags }}
build-args: |
DOCKER_TAG=${{ join(steps.metaassertions.outputs.tags ) }}-${{ matrix.docker-base-image }}
# build and publish "normal" image as last to get it listed on top
- name: Build container image - normal
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
file: ./docker/Dockerfile-${{ matrix.docker-base-image }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
DOCKER_TAG=${{ join(steps.meta.outputs.tags ) }}-${{ matrix.docker-base-image }}

786
.github/workflows/osrm-backend.yml vendored Normal file
View File

@ -0,0 +1,786 @@
name: osrm-backend CI
on:
push:
branches:
- master
tags:
- v[1-9]+.[0-9]+.[0-9]+
- v[1-9]+.[0-9]+.[0-9]+-[a-zA-Z]+.[0-9]+
- v[1-9]+.[0-9]+-[0-9a-zA-Z]+
pull_request:
branches:
- master
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: 1
CASHER_TIME_OUT: 599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742
CMAKE_VERSION: 3.21.2
ENABLE_NODE_BINDINGS: "ON"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
windows-release-node:
needs: format-taginfo-docs
runs-on: windows-2022
continue-on-error: false
env:
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:
node-version: 18
- run: node --version
- run: npm --version
- name: Prepare environment
shell: bash
run: |
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
- run: npm install --ignore-scripts
- run: npm link --ignore-scripts
- name: Build
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
cmake --build . --config Release
# TODO: MSVC goes out of memory when building our tests
# - name: Run tests
# shell: bash
# run: |
# cd build
# cmake --build . --config Release --target tests
# # TODO: run tests
# - name: Run node tests
# shell: bash
# run: |
# ./lib/binding/osrm-extract.exe -p profiles/car.lua test/data/monaco.osm.pbf
# mkdir -p test/data/ch
# cp test/data/monaco.osrm* test/data/ch/
# ./lib/binding/osrm-contract.exe test/data/ch/monaco.osrm
# ./lib/binding/osrm-datastore.exe test/data/ch/monaco.osrm
# node test/nodejs/index.js
- name: Build Node package
shell: bash
run: ./scripts/ci/node_package.sh
- name: Publish Node package
if: ${{ env.PUBLISH == 'On' }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: build/stage/**/*.tar.gz
omitBody: true
omitBodyDuringUpdate: true
omitName: true
omitNameDuringUpdate: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
format-taginfo-docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Enable Node.js cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Prepare environment
run: |
npm ci --ignore-scripts
clang-format-15 --version
- name: Run checks
run: |
./scripts/check_taginfo.py taginfo.json profiles/car.lua
./scripts/format.sh && ./scripts/error_on_dirty.sh
node ./scripts/validate_changelog.js
npm run docs && ./scripts/error_on_dirty.sh
npm audit --production
docker-image-matrix:
strategy:
matrix:
docker-base-image: ["debian", "alpine"]
needs: format-taginfo-docs
runs-on: ubuntu-22.04
continue-on-error: false
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Enable osm.pbf cache
uses: actions/cache@v4
with:
path: berlin-latest.osm.pbf
key: v1-berlin-osm-pbf
restore-keys: |
v1-berlin-osm-pbf
- name: Docker build
run: |
docker build -t osrm-backend-local -f docker/Dockerfile-${{ matrix.docker-base-image }} .
- name: Test Docker image
run: |
if [ ! -f "${PWD}/berlin-latest.osm.pbf" ]; then
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
fi
TAG=osrm-backend-local
# when `--memory-swap` value equals `--memory` it means container won't use swap
# see https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details
MEMORY_ARGS="--memory=1g --memory-swap=1g"
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-extract --dump-nbg-graph -p /opt/car.lua /data/berlin-latest.osm.pbf
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-components /data/berlin-latest.osrm.nbg /data/berlin-latest.geojson
if [ ! -s "${PWD}/berlin-latest.geojson" ]
then
>&2 echo "No berlin-latest.geojson found"
exit 1
fi
# removing `.osrm.nbg` to check that whole pipeline works without it
rm -rf "${PWD}/berlin-latest.osrm.nbg"
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-partition /data/berlin-latest.osrm
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-customize /data/berlin-latest.osrm
docker run $MEMORY_ARGS --name=osrm-container -t -p 5000:5000 -v "${PWD}:/data" "${TAG}" osrm-routed --algorithm mld /data/berlin-latest.osrm &
curl --retry-delay 3 --retry 10 --retry-all-errors "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
docker stop osrm-container
build-test-publish:
needs: format-taginfo-docs
strategy:
matrix:
include:
- name: gcc-13-debug-cov
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CCOMPILER: gcc-13
CUCUMBER_TIMEOUT: 20000
CXXCOMPILER: g++-13
ENABLE_COVERAGE: ON
- name: clang-18-debug-asan-ubsan
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CCOMPILER: clang-18
CUCUMBER_TIMEOUT: 20000
CXXCOMPILER: clang++-18
ENABLE_SANITIZER: ON
TARGET_ARCH: x86_64-asan-ubsan
OSRM_CONNECTION_RETRIES: 10
OSRM_CONNECTION_EXP_BACKOFF_COEF: 1.5
- name: clang-18-release
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang-18
CXXCOMPILER: clang++-18
CUCUMBER_TIMEOUT: 60000
ENABLE_LTO: OFF
- name: clang-18-debug
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CCOMPILER: clang-18
CXXCOMPILER: clang++-18
CUCUMBER_TIMEOUT: 60000
ENABLE_LTO: OFF
- name: clang-18-debug-clang-tidy
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CCOMPILER: clang-18
CXXCOMPILER: clang++-18
CUCUMBER_TIMEOUT: 60000
ENABLE_CLANG_TIDY: ON
- name: clang-17-release
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang-17
CXXCOMPILER: clang++-17
CUCUMBER_TIMEOUT: 60000
ENABLE_LTO: OFF
- name: clang-16-release
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang-16
CXXCOMPILER: clang++-16
CUCUMBER_TIMEOUT: 60000
ENABLE_LTO: OFF
- name: conan-linux-debug-asan-ubsan
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang-18
CXXCOMPILER: clang++-18
ENABLE_CONAN: ON
ENABLE_SANITIZER: ON
ENABLE_LTO: OFF
- name: conan-linux-release
continue-on-error: false
node: 18
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang-18
CXXCOMPILER: clang++-18
ENABLE_CONAN: ON
ENABLE_LTO: OFF
- name: gcc-14-release
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: gcc-14
CXXCOMPILER: g++-14
CXXFLAGS: '-Wno-array-bounds -Wno-uninitialized'
- name: gcc-13-release
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: gcc-13
CXXCOMPILER: g++-13
CXXFLAGS: '-Wno-array-bounds -Wno-uninitialized'
- name: gcc-12-release
continue-on-error: false
node: 20
runs-on: ubuntu-22.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: gcc-12
CXXCOMPILER: g++-12
CXXFLAGS: '-Wno-array-bounds -Wno-uninitialized'
- name: conan-linux-release-node
build_node_package: true
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TYPE: Release
CCOMPILER: clang-16
CXXCOMPILER: clang++-16
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: conan-linux-debug-node
build_node_package: true
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TYPE: Debug
CCOMPILER: clang-16
CXXCOMPILER: clang++-16
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: conan-macos-x64-release-node
build_node_package: true
continue-on-error: true
node: 20
runs-on: macos-13 # x86_64
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
- name: conan-macos-arm64-release-node
build_node_package: true
continue-on-error: true
node: 20
runs-on: macos-14 # arm64
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
name: ${{ matrix.name}}
continue-on-error: ${{ matrix.continue-on-error }}
runs-on: ${{ matrix.runs-on }}
env:
BUILD_TOOLS: ${{ matrix.BUILD_TOOLS }}
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }}
CCOMPILER: ${{ matrix.CCOMPILER }}
CFLAGS: ${{ matrix.CFLAGS }}
CUCUMBER_TIMEOUT: ${{ matrix.CUCUMBER_TIMEOUT }}
CXXCOMPILER: ${{ matrix.CXXCOMPILER }}
CXXFLAGS: ${{ matrix.CXXFLAGS }}
ENABLE_ASSERTIONS: ${{ matrix.ENABLE_ASSERTIONS }}
ENABLE_CLANG_TIDY: ${{ matrix.ENABLE_CLANG_TIDY }}
ENABLE_COVERAGE: ${{ matrix.ENABLE_COVERAGE }}
ENABLE_CONAN: ${{ matrix.ENABLE_CONAN }}
ENABLE_SANITIZER: ${{ matrix.ENABLE_SANITIZER }}
NODE_PACKAGE_TESTS_ONLY: ${{ matrix.NODE_PACKAGE_TESTS_ONLY }}
TARGET_ARCH: ${{ matrix.TARGET_ARCH }}
OSRM_CONNECTION_RETRIES: ${{ matrix.OSRM_CONNECTION_RETRIES }}
OSRM_CONNECTION_EXP_BACKOFF_COEF: ${{ matrix.OSRM_CONNECTION_EXP_BACKOFF_COEF }}
ENABLE_LTO: ${{ matrix.ENABLE_LTO }}
steps:
- uses: actions/checkout@v4
- name: Build machine architecture
run: uname -m
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Enable Node.js cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Enable compiler cache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ matrix.name }}-${{ github.sha }}
restore-keys: |
ccache-${{ matrix.name }}-
- name: Enable Conan cache
uses: actions/cache@v4
with:
path: ~/.conan
key: v9-conan-${{ matrix.name }}-${{ github.sha }}
restore-keys: |
v9-conan-${{ matrix.name }}-
- name: Enable test cache
uses: actions/cache@v4
with:
path: ${{github.workspace}}/test/cache
key: v4-test-${{ matrix.name }}-${{ github.sha }}
restore-keys: |
v4-test-${{ matrix.name }}-
- name: Prepare environment
run: |
echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
mkdir -p $HOME/.ccache
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
echo "OSRM_INSTALL_DIR=${GITHUB_WORKSPACE}/install-osrm" >> $GITHUB_ENV
echo "OSRM_BUILD_DIR=${GITHUB_WORKSPACE}/build-osrm" >> $GITHUB_ENV
if [[ "$ENABLE_SANITIZER" == 'ON' ]]; then
# We can only set this after checkout once we know the workspace directory
echo "LSAN_OPTIONS=print_suppressions=0:suppressions=${GITHUB_WORKSPACE}/scripts/ci/leaksanitizer.conf" >> $GITHUB_ENV
echo "UBSAN_OPTIONS=symbolize=1:halt_on_error=1:print_stacktrace=1:suppressions=${GITHUB_WORKSPACE}/scripts/ci/undefinedsanitizer.conf" >> $GITHUB_ENV
echo "ASAN_OPTIONS=print_suppressions=0:suppressions=${GITHUB_WORKSPACE}/scripts/ci/addresssanitizer.conf" >> $GITHUB_ENV
fi
if [[ "${RUNNER_OS}" == "Linux" ]]; then
echo "JOBS=$((`nproc` + 1))" >> $GITHUB_ENV
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
echo "JOBS=$((`sysctl -n hw.ncpu` + 1))" >> $GITHUB_ENV
fi
# See: https://github.com/actions/toolkit/issues/946#issuecomment-1590016041
# We need it to be able to access system folders while restoring cached Boost below
- name: Give tar root ownership
if: runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
run: sudo chown root /bin/tar && sudo chmod u+s /bin/tar
- name: Cache Boost
if: runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
id: cache-boost
uses: actions/cache@v4
with:
path: |
/usr/local/include/boost
/usr/local/lib/libboost*
key: v1-boost-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runs-on }}
restore-keys: |
v1-boost-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runs-on }}
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
run: |
BOOST_VERSION="1.85.0"
BOOST_VERSION_FLAVOR="${BOOST_VERSION}-b2-nodocs"
wget -q https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION_FLAVOR}.tar.gz
tar xzf boost-${BOOST_VERSION_FLAVOR}.tar.gz
cd boost-${BOOST_VERSION}
sudo ./bootstrap.sh
sudo ./b2 install
cd ..
sudo rm -rf boost-${BOOST_VERSION}*
- 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
echo "/Library/Frameworks/Python.framework/Versions/Current/bin" >> $GITHUB_PATH
fi
# ccache
if [[ "${RUNNER_OS}" == "Linux" ]]; then
sudo apt-get update -y && sudo apt-get install ccache
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
brew install ccache
fi
# Linux dev packages
if [ "${ENABLE_CONAN}" != "ON" ]; then
sudo apt-get update -y
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev
if [[ "${CCOMPILER}" != clang-* ]]; then
sudo apt-get install -y ${CXXCOMPILER}
fi
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
sudo apt-get install -y lcov
fi
fi
# TBB
TBB_VERSION=2021.12.0
if [[ "${RUNNER_OS}" == "Linux" ]]; then
TBB_URL="https://github.com/oneapi-src/oneTBB/releases/download/v${TBB_VERSION}/oneapi-tbb-${TBB_VERSION}-lin.tgz"
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
TBB_URL="https://github.com/oneapi-src/oneTBB/releases/download/v${TBB_VERSION}/oneapi-tbb-${TBB_VERSION}-mac.tgz"
fi
wget --tries 5 ${TBB_URL} -O onetbb.tgz
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: Add Apple-clang 16 to list of Conan compilers # workaround for the issue that Conan 1.x doesn't know about Apple-clang 16
if: ${{ matrix.ENABLE_CONAN == 'ON' && matrix.runs-on == 'macos-14' }}
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_darwin_arm64 -O /usr/local/bin/yq && sudo chmod +x /usr/local/bin/yq
conan config init
yq eval '.compiler.apple-clang.version += ["16.0"]' -i "$HOME/.conan/settings.yml"
- name: Prepare build
run: |
mkdir ${OSRM_BUILD_DIR}
ccache --max-size=256M
npm ci --ignore-scripts
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
lcov --directory . --zerocounters # clean cached files
fi
echo "CC=${CCOMPILER}" >> $GITHUB_ENV
echo "CXX=${CXXCOMPILER}" >> $GITHUB_ENV
if [[ "${RUNNER_OS}" == "macOS" ]]; then
# missing from GCC path, needed for conan builds of libiconv, for example.
sudo xcode-select --switch /Library/Developer/CommandLineTools
echo "LIBRARY_PATH=${LIBRARY_PATH}:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV
echo "CPATH=${CPATH}:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" >> $GITHUB_ENV
fi
- name: Build and install OSRM
run: |
echo "Using ${JOBS} jobs"
pushd ${OSRM_BUILD_DIR}
ccache --zero-stats
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DENABLE_CONAN=${ENABLE_CONAN:-OFF} \
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \
-DENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY:-OFF} \
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \
-DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
-DBUILD_TOOLS=${BUILD_TOOLS:-OFF} \
-DENABLE_CCACHE=ON \
-DENABLE_LTO=${ENABLE_LTO:-ON} \
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
make --jobs=${JOBS}
if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then
make tests --jobs=${JOBS}
make benchmarks --jobs=${JOBS}
sudo make install
if [[ "${RUNNER_OS}" == "Linux" ]]; then
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib" >> $GITHUB_ENV
fi
echo "PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig" >> $GITHUB_ENV
fi
popd
- name: Build example
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }}
run: |
mkdir example/build && pushd example/build
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
make --jobs=${JOBS}
popd
- name: Run all tests
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }}
run: |
make -C test/data benchmark
# macOS SIP strips the linker path. Reset this inside the running shell
export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}
./example/build/osrm-example test/data/mld/monaco.osrm
# All tests assume to be run from the build directory
pushd ${OSRM_BUILD_DIR}
for i in ./unit_tests/*-tests ; do echo Running $i ; $i ; done
if [ -z "${ENABLE_SANITIZER}" ]; then
npm run nodejs-tests
fi
popd
npm test
- name: Use Node 18
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
uses: actions/setup-node@v4
with:
node-version: 18
- name: Run Node package tests on Node 18
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
run: |
node --version
npm run nodejs-tests
- name: Use Node 20
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
uses: actions/setup-node@v4
with:
node-version: 20
- name: Run Node package tests on Node 20
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
run: |
node --version
npm run nodejs-tests
- name: Use Node latest
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
uses: actions/setup-node@v4
with:
node-version: latest
- name: Run Node package tests on Node-latest
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
run: |
node --version
npm run nodejs-tests
- name: Upload test logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
path: test/logs/
# - name: Generate code coverage
# if: ${{ matrix.ENABLE_COVERAGE == 'ON' }}
# run: |
# lcov --directory . --capture --output-file coverage.info # capture coverage info
# lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
# lcov --list coverage.info #debug info
# # Uploading report to CodeCov
# - name: Upload code coverage
# if: ${{ matrix.ENABLE_COVERAGE == 'ON' }}
# uses: codecov/codecov-action@v4
# with:
# files: coverage.info
# name: codecov-osrm-backend
# fail_ci_if_error: true
# verbose: true
- name: Build Node package
if: ${{ matrix.build_node_package }}
run: ./scripts/ci/node_package.sh
- name: Publish Node package
if: ${{ matrix.build_node_package && env.PUBLISH == 'On' }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: build/stage/**/*.tar.gz
omitBody: true
omitBodyDuringUpdate: true
omitName: true
omitNameDuringUpdate: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Show CCache statistics
run: |
ccache -p
ccache -s
benchmarks:
if: github.event_name == 'pull_request'
needs: [format-taginfo-docs]
runs-on: self-hosted
env:
CCOMPILER: clang-16
CXXCOMPILER: clang++-16
CC: clang-16
CXX: clang++-16
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_REPOSITORY: ${{ github.repository }}
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
steps:
- name: Checkout PR Branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
path: pr
- name: Activate virtualenv
run: |
python3 -m venv .venv
source .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4"
- name: Prepare data
run: |
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
rm -rf ~/data.osm.pbf
wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet
gunzip -c ./pr/test/data/poland_gps_traces.csv.gz > ~/gps_traces.csv
else
if [ ! -f "~/data.osm.pbf" ]; then
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -O ~/data.osm.pbf
else
echo "Using cached data.osm.pbf"
fi
gunzip -c ./pr/test/data/berlin_gps_traces.csv.gz > ~/gps_traces.csv
fi
- name: Prepare environment
run: |
echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
mkdir -p $HOME/.ccache
ccache --zero-stats
ccache --max-size=256M
- name: Checkout Base Branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
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 -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 -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: |
# 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 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
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 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 ~/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
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
- name: Show CCache statistics
run: |
ccache -p
ccache -s
ci-complete:
runs-on: ubuntu-22.04
needs: [build-test-publish, docker-image-matrix, windows-release-node, benchmarks]
steps:
- run: echo "CI complete"

29
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: 'Close stale issues'
on:
# NOTE: uncomment if you want to test changes to this file in PRs CI
# pull_request:
# branches:
# - master
schedule:
- cron: '30 1 * * *' # every day at 1:30am
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@v9
with:
operations-per-run: 3000
stale-issue-message: 'This issue seems to be stale. It will be closed in 30 days if no further activity occurs.'
stale-pr-message: 'This PR seems to be stale. Is it still relevant?'
days-before-issue-stale: 180 # 6 months
days-before-issue-close: 30 # 1 month
days-before-pr-stale: 180 # 6 months
days-before-pr-close: -1 # never close PRs
exempt-issue-labels: 'Do Not Stale,Feature Request,Performance,Bug Report,CI,Starter Task,Refactor,Guidance'

30
.gitignore vendored
View File

@ -2,6 +2,8 @@
#############################
osrm-deps
.ycm_extra_conf.py
# Compiled source #
###################
*.com
@ -39,9 +41,12 @@ Thumbs.db
# build related files #
#######################
/_build*
/build/
/example/build/
/test/data/monaco*
/test/data/monaco.osrm*
/test/data/ch
/test/data/mld
/cmake/postinst
# Eclipse related files #
@ -51,11 +56,16 @@ Thumbs.db
.cproject
.project
# stxxl related files #
#######################
.stxxl
stxxl.log
stxxl.errlog
# Visual Studio (Code) related files #
######################################
/.vs*
/*.local.bat
/CMakeSettings.json
/.cache
# Jetbrains related files #
###########################
.idea/
# Compiled Binary Files #
####################################
@ -81,7 +91,6 @@ stxxl.errlog
/test/cache
/test/speeds.csv
/test/penalties.csv
/test/data/monaco.*
node_modules
# Deprecated config file #
@ -89,3 +98,10 @@ node_modules
/server.ini
*.swp
# local lua debugging file
debug.lua
# node-osrm artifacts
lib/binding

16
.npmignore Normal file
View File

@ -0,0 +1,16 @@
*
!README.md
!CHANGELOG.md
!CONTRIBUTING.MD
!LICENCE.TXT
!package.json
!package-lock.json
!yarn.lock
!docs
!example
!taginfo.json
!lib/*.js
!profiles/*
!profiles/lib/*
!profiles/examples/*
!scripts/node_install.sh

View File

@ -1,186 +0,0 @@
language: cpp
git:
depth: 10
# sudo:required is needed for trusty images
sudo: required
dist: trusty
notifications:
email: false
branches:
only:
- master
cache:
ccache: true
apt: true
directories:
- test/cache
env:
global:
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- JOBS=4
matrix:
fast_finish: true
# We override the compiler names here to yield better ccache behavior, which uses this as key
include:
# Debug Builds
- os: linux
compiler: "gcc-5-debug"
addons: &gcc5
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Debug' COVERAGE=ON
- os: linux
compiler: "gcc-4.8-debug"
addons: &gcc48
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
env: CCOMPILER='gcc-4.8' CXXCOMPILER='g++-4.8' BUILD_TYPE='Debug'
- os: linux
compiler: "clang-3.8-debug"
addons: &clang38
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['libstdc++-5-dev', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
env: CLANG_VERSION='3.8.0' BUILD_TYPE='Debug' RUN_CLANG_FORMAT=ON
- os: osx
osx_image: xcode7.3
compiler: clang
env: CCOMPILER='clang' CXXCOMPILER='clang++' BUILD_TYPE='Debug' JOBS=1 CUCUMBER_TIMEOUT=60000
# Release Builds
- os: linux
compiler: "gcc-5-release"
addons: &gcc5
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release'
# Disabled because of CI slowness
#- os: linux
#- compiler: gcc
#- addons: &gcc48
#- apt:
#- sources: ['ubuntu-toolchain-r-test']
#- packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
#- env: CCOMPILER='gcc-4.8' CXXCOMPILER='g++-4.8' BUILD_TYPE='Release'
# Disabled because of CI slowness
#- os: linux
#- compiler: clang
#- addons: &clang38
#- apt:
#- sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
#- packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
#- env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Release'
# Disabled because of CI slowness
#- os: osx
#- osx_image: xcode7.3
#- compiler: clang
#- env: CCOMPILER='clang' CXXCOMPILER='clang++' BUILD_TYPE='Release'
# Shared Library
- os: linux
compiler: "gcc-5-release-shared"
addons: &gcc5
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
# Disabled because CI slowness
#- os: linux
#- compiler: clang
#- addons: &clang38
#- apt:
#- sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
#- packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
#- env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
before_install:
- if [[ $(uname -s) == 'Darwin' ]]; then sudo mdutil -i off /; fi;
- source ./scripts/install_node.sh 4
- npm install
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- export PATH=${DEPS_DIR}/bin:${PATH} && mkdir -p ${DEPS_DIR}
- CMAKE_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/cmake/3.5.2.tar.gz"
- travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}
- |
if [[ ${CLANG_VERSION:-false} != false ]]; then
export CCOMPILER='clang'
export CXXCOMPILER='clang++'
CLANG_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/clang/${CLANG_VERSION}.tar.gz"
travis_retry wget --quiet -O - ${CLANG_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}
fi
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
# implicit deps, but seem to be installed by default with recent images: libxml2 GDAL boost
brew install libzip libstxxl lua51 luabind tbb md5sha1sum ccache
fi
install:
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
./scripts/check_taginfo.py taginfo.json profiles/car.lua
fi
- mkdir build && pushd build
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DCOVERAGE=${COVERAGE:-OFF} -DBUILD_TOOLS=1 -DENABLE_CCACHE=ON
- echo "travis_fold:start:MAKE"
- make osrm-extract --jobs=3
- make --jobs=${JOBS}
- make tests --jobs=${JOBS}
- make benchmarks --jobs=${JOBS}
- echo "travis_fold:end:MAKE"
- ccache -s
- sudo make install
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
sudo ldconfig
fi
- popd
- mkdir example/build && pushd example/build
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- make
- popd
script:
- echo "travis_fold:start:BENCHMARK"
- make -C test/data benchmark
- echo "travis_fold:end:BENCHMARK"
- ./example/build/osrm-example test/data/monaco.osrm
# All tests assume to be run from the build directory
- pushd build
- ./unit_tests/library-tests ../test/data/monaco.osrm
- ./unit_tests/extractor-tests
- ./unit_tests/engine-tests
- ./unit_tests/util-tests
- ./unit_tests/server-tests
- popd
- npm test
after_success:
- |
if [ -n "${RUN_CLANG_FORMAT}" ]; then
./scripts/format.sh # we don't want to fail just yet
fi
- |
if [ -n "${COVERAGE}" ]; then
bash <(curl -s https://codecov.io/bash)
fi

View File

@ -1,3 +1,883 @@
# 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)
- ADDED: Add support for disabling feature datasets. [#6666](https://github.com/Project-OSRM/osrm-backend/pull/6666)
- ADDED: Add support for opposite approach request parameter. [#6842](https://github.com/Project-OSRM/osrm-backend/pull/6842)
- ADDED: Add support for accessing edge flags in `process_segment` [#6658](https://github.com/Project-OSRM/osrm-backend/pull/6658)
- Build:
- CHANGED: Upgrade clang-format to version 15. [#6919](https://github.com/Project-OSRM/osrm-backend/pull/6919)
- CHANGED: Use Debian Bookworm as base Docker image [#6904](https://github.com/Project-OSRM/osrm-backend/pull/6904)
- CHANGED: Upgrade CI actions to latest versions [#6893](https://github.com/Project-OSRM/osrm-backend/pull/6893)
- CHANGED: Remove outdated warnings #6894 [#6894](https://github.com/Project-OSRM/osrm-backend/pull/6894)
- ADDED: Add CI job which builds OSRM with gcc 12. [#6455](https://github.com/Project-OSRM/osrm-backend/pull/6455)
- CHANGED: Upgrade to clang-tidy 15. [#6439](https://github.com/Project-OSRM/osrm-backend/pull/6439)
- CHANGED: Update actions/cache to v3. [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420)
- REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431)
- ADDED: Add 'load directly' mode to default Cucumber test suite. [#6663](https://github.com/Project-OSRM/osrm-backend/pull/6663)
- CHANGED: Fix compilation for Boost 1.85.0 [#6856](https://github.com/Project-OSRM/osrm-backend/pull/6856)
- CHANGED: Drop support for Node 16 [#6855](https://github.com/Project-OSRM/osrm-backend/pull/6855)
- REMOVED: Remove unused AppVeyor files [#6860](https://github.com/Project-OSRM/osrm-backend/pull/6860)
- CHANGED: Upgrade clang-format to version 15 [#6859](https://github.com/Project-OSRM/osrm-backend/pull/6859)
- NodeJS:
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
- Misc:
- CHANGED: Use std::string_view for key type in json::Object. [#7062](https://github.com/Project-OSRM/osrm-backend/pull/7062)
- 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)
- CHANGED: Get rid of boost::optional leftovers. [#6977](https://github.com/Project-OSRM/osrm-backend/pull/6977)
- CHANGED: Use Link Time Optimisation whenever possible. [#6967](https://github.com/Project-OSRM/osrm-backend/pull/6967)
- CHANGED: Use struct instead of tuple to define UnpackedPath. [#6974](https://github.com/Project-OSRM/osrm-backend/pull/6974)
- CHANGED: Micro performance optimisation in map matching. [#6976](https://github.com/Project-OSRM/osrm-backend/pull/6976)
- CHANGED: Re-use priority queue in StaticRTree. [#6952](https://github.com/Project-OSRM/osrm-backend/pull/6952)
- CHANGED: Optimise encodePolyline function. [#6940](https://github.com/Project-OSRM/osrm-backend/pull/6940)
- CHANGED: Avoid reallocations in base64 encoding. [#6951](https://github.com/Project-OSRM/osrm-backend/pull/6951)
- CHANGED: Get rid of unused Boost dependencies. [#6960](https://github.com/Project-OSRM/osrm-backend/pull/6960)
- CHANGED: Apply micro-optimisation for Table & Trip APIs. [#6949](https://github.com/Project-OSRM/osrm-backend/pull/6949)
- CHANGED: Apply micro-optimisation for Route API. [#6948](https://github.com/Project-OSRM/osrm-backend/pull/6948)
- CHANGED: Apply micro-optimisation for Match API. [#6945](https://github.com/Project-OSRM/osrm-backend/pull/6945)
- CHANGED: Apply micro-optimisation for Nearest API. [#6944](https://github.com/Project-OSRM/osrm-backend/pull/6944)
- CHANGED: Avoid copy of intersection in totalTurnAngle. [#6938](https://github.com/Project-OSRM/osrm-backend/pull/6938)
- CHANGED: Use std::unordered_map::emplace instead of operator[] when producing JSONs. [#6936](https://github.com/Project-OSRM/osrm-backend/pull/6936)
- CHANGED: Avoid copy of vectors in MakeRoute function. [#6939](https://github.com/Project-OSRM/osrm-backend/pull/6939)
- FIXED: Fix bugprone-unused-return-value clang-tidy warning. [#6934](https://github.com/Project-OSRM/osrm-backend/pull/6934)
- FIXED: Fix performance-noexcept-move-constructor clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6933)
- FIXED: Fix performance-noexcept-swap clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6931)
- CHANGED: Use custom struct instead of std::pair in QueryHeap. [#6921](https://github.com/Project-OSRM/osrm-backend/pull/6921)
- CHANGED: Use std::string_view::starts_with instead of boost::starts_with. [#6918](https://github.com/Project-OSRM/osrm-backend/pull/6918)
- CHANGED: Get rid of boost::math::constants::* and M_PI in favor of std::numbers. [#6916](https://github.com/Project-OSRM/osrm-backend/pull/6916)
- CHANGED: Make constants in PackedVector constexpr. [#6917](https://github.com/Project-OSRM/osrm-backend/pull/6917)
- CHANGED: Use std::variant instead of mapbox::util::variant. [#6903](https://github.com/Project-OSRM/osrm-backend/pull/6903)
- CHANGED: Bump rapidjson to version f9d53419e912910fd8fa57d5705fa41425428c35 [#6906](https://github.com/Project-OSRM/osrm-backend/pull/6906)
- CHANGED: Bump mapbox/variant to version 1.2.0 [#6898](https://github.com/Project-OSRM/osrm-backend/pull/6898)
- CHANGED: Avoid copy of std::function-based callback in path unpacking [#6895](https://github.com/Project-OSRM/osrm-backend/pull/6895)
- CHANGED: Replace boost::hash by std::hash [#6892](https://github.com/Project-OSRM/osrm-backend/pull/6892)
- CHANGED: Partial fix migration from boost::optional to std::optional [#6551](https://github.com/Project-OSRM/osrm-backend/issues/6551)
- CHANGED: Replace boost::filesystem with std::filesystem [#6432](https://github.com/Project-OSRM/osrm-backend/pull/6432)
- CHANGED: Update Conan Boost version to 1.85.0. [#6868](https://github.com/Project-OSRM/osrm-backend/pull/6868)
- FIXED: Fix an error in a RouteParameters AnnotationsType operator overload. [#6646](https://github.com/Project-OSRM/osrm-backend/pull/6646)
- ADDED: Add support for "unlimited" to be passed as a value for the default-radius and max-matching-radius flags. [#6599](https://github.com/Project-OSRM/osrm-backend/pull/6599)
- CHANGED: Allow -1.0 as unlimited for default_radius value. [#6599](https://github.com/Project-OSRM/osrm-backend/pull/6599)
- CHANGED: keep libosrm* in the docker image for downstream linking [#6602](https://github.com/Project-OSRM/osrm-backend/pull/6602)
- CHANGED: Move vector in CSVFilesParser instead copying it. [#6470](https://github.com/Project-OSRM/osrm-backend/pull/6470)
- REMOVED: Get rid of unused functions in util/json_util.hpp. [#6446](https://github.com/Project-OSRM/osrm-backend/pull/6446)
- FIXED: Apply workaround for Conan installation issue on CI. [#6442](https://github.com/Project-OSRM/osrm-backend/pull/6442)
- FIXED: Fix `npm audit` warnings in NPM package. [#6437](https://github.com/Project-OSRM/osrm-backend/pull/6437)
- FIXED: Handle snapping parameter for all plugins in NodeJs bindings, but not for Route only. [#6417](https://github.com/Project-OSRM/osrm-backend/pull/6417)
- FIXED: Fix annotations=true handling in NodeJS bindings & libosrm. [#6415](https://github.com/Project-OSRM/osrm-backend/pull/6415/)
- FIXED: Fix bindings compilation issue on the latest Node. Update NAN to 2.17.0. [#6416](https://github.com/Project-OSRM/osrm-backend/pull/6416)
- CHANGED: Make edge metrics strongly typed [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420)
- FIXED: Typo in file name src/util/timed_historgram.cpp -> src/util/timed_histogram.cpp [#6428](https://github.com/Project-OSRM/osrm-backend/issues/6428)
- CHANGED: Replace boost::string_ref with std::string_view [#6433](https://github.com/Project-OSRM/osrm-backend/pull/6433)
- ADDED: Print tracebacks for Lua runtime errors [#6564](https://github.com/Project-OSRM/osrm-backend/pull/6564)
- FIXED: Added a variable to preprocessor guard in file osrm-backend/include/util/range_table.hpp to solve build error. [#6596](https://github.com/Project-OSRM/osrm-backend/pull/6596)
- FIXED: Ensure required file check in osrm-routed is correctly enforced. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655)
- FIXED: Correct HTTP docs to reflect summary output dependency on steps parameter. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655)
- 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)
- FIXED: Fix bug when searching for maneuver overrides [#6739](https://github.com/Project-OSRM/osrm-backend/pull/6739)
- FIXED: Remove force-loop checks for routes with u-turns [#6858](https://github.com/Project-OSRM/osrm-backend/pull/6858)
- FIXED: Correctly check runtime search conditions for forcing routing steps [#6866](https://github.com/Project-OSRM/osrm-backend/pull/6866)
- Map Matching:
- CHANGED: Optimise path distance calculation in MLD map matching even more. [#6884](https://github.com/Project-OSRM/osrm-backend/pull/6884)
- CHANGED: Optimise path distance calculation in MLD map matching. [#6876](https://github.com/Project-OSRM/osrm-backend/pull/6876)
- CHANGED: Optimise R-tree queries in the case of map matching. [#6881](https://github.com/Project-OSRM/osrm-backend/pull/6876)
- Debug tiles:
- FIXED: Ensure speed layer features have unique ids. [#6726](https://github.com/Project-OSRM/osrm-backend/pull/6726)
# 5.27.1
- Changes from 5.27.0
- Misc:
- FIXED: Revert back to using custom HTTP parser instead of Boost.Beast. [#6407](https://github.com/Project-OSRM/osrm-backend/pull/6407)
- FIXED: Fix bug with large HTTP requests leading to Bad Request in osrm-routed. [#6403](https://github.com/Project-OSRM/osrm-backend/pull/6403)
- Routing:
- CHANGED: Add support for surface=metal,grass_paver,woodchips in bicyle profile. [#6395](https://github.com/Project-OSRM/osrm-backend/pull/6395)
# 5.27.0
- Changes from 5.26.0
- API:
- ADDED: Add Flatbuffers support to NodeJS bindings. [#6338](https://github.com/Project-OSRM/osrm-backend/pull/6338)
- CHANGED: Add `data_version` field to responses of all services. [#5387](https://github.com/Project-OSRM/osrm-backend/pull/5387)
- FIXED: Use Boost.Beast to parse HTTP request. [#6294](https://github.com/Project-OSRM/osrm-backend/pull/6294)
- FIXED: Fix inefficient osrm-routed connection handling [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
- FIXED: Fix HTTP compression precedence [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
- NodeJS:
- FIXED: Support `skip_waypoints` in Node bindings [#6060](https://github.com/Project-OSRM/osrm-backend/pull/6060)
- Misc:
- ADDED: conanbuildinfo.json for easy reading of dependencies [#6388](https://github.com/Project-OSRM/osrm-backend/pull/6388)
- CHANGED: Improve performance of JSON rendering. Fix undefined behaviour in JSON numbers formatting. [#6380](https://github.com/Project-OSRM/osrm-backend/pull/6380)
- ADDED: Add timestamps for logs. [#6375](https://github.com/Project-OSRM/osrm-backend/pull/6375)
- CHANGED: Improve performance of map matching via getPathDistance optimization. [#6378](https://github.com/Project-OSRM/osrm-backend/pull/6378)
- CHANGED: Optimize RestrictionParser performance. [#6344](https://github.com/Project-OSRM/osrm-backend/pull/6344)
- ADDED: Support floats for speed value in traffic updates CSV. [#6327](https://github.com/Project-OSRM/osrm-backend/pull/6327)
- CHANGED: Use Lua 5.4 in Docker image. [#6346](https://github.com/Project-OSRM/osrm-backend/pull/6346)
- CHANGED: Remove redundant nullptr check. [#6326](https://github.com/Project-OSRM/osrm-backend/pull/6326)
- CHANGED: missing files list is included in exception message. [#5360](https://github.com/Project-OSRM/osrm-backend/pull/5360)
- CHANGED: Do not use deprecated Callback::Call overload in Node bindings. [#6318](https://github.com/Project-OSRM/osrm-backend/pull/6318)
- FIXED: Fix distance calculation consistency. [#6315](https://github.com/Project-OSRM/osrm-backend/pull/6315)
- FIXED: Fix performance issue after migration to sol2 3.3.0. [#6304](https://github.com/Project-OSRM/osrm-backend/pull/6304)
- CHANGED: Pass osm_node_ids by reference in osrm::updater::Updater class. [#6298](https://github.com/Project-OSRM/osrm-backend/pull/6298)
- FIXED: Fix bug with reading Set values from Lua scripts. [#6285](https://github.com/Project-OSRM/osrm-backend/pull/6285)
- FIXED: Bug in bicycle profile that caused exceptions if there is a highway=bicycle in the data. [#6296](https://github.com/Project-OSRM/osrm-backend/pull/6296)
- FIXED: Internal refactoring of identifier types used in data facade [#6044](https://github.com/Project-OSRM/osrm-backend/pull/6044)
- CHANGED: Update docs to reflect recent build and dependency changes [#6383](https://github.com/Project-OSRM/osrm-backend/issues/6383)
- Build:
- REMOVED: Get rid of Mason. [#6387](https://github.com/Project-OSRM/osrm-backend/pull/6387)
- CHANGED: Use clang-format from CI base image. [#6391](https://github.com/Project-OSRM/osrm-backend/pull/6391)
- ADDED: Build Node bindings on Windows. [#6334](https://github.com/Project-OSRM/osrm-backend/pull/6334)
- ADDED: Configure cross-compilation for Apple Silicon. [#6360](https://github.com/Project-OSRM/osrm-backend/pull/6360)
- CHANGED: Use apt-get to install Clang on CI. [#6345](https://github.com/Project-OSRM/osrm-backend/pull/6345)
- CHANGED: Fix TBB in case of Conan + NodeJS build. [#6333](https://github.com/Project-OSRM/osrm-backend/pull/6333)
- CHANGED: Migrate to modern TBB version. [#6300](https://github.com/Project-OSRM/osrm-backend/pull/6300)
- CHANGED: Enable performance-move-const-arg clang-tidy check. [#6319](https://github.com/Project-OSRM/osrm-backend/pull/6319)
- CHANGED: Use the latest node on CI. [#6317](https://github.com/Project-OSRM/osrm-backend/pull/6317)
- CHANGED: Migrate Windows CI to GitHub Actions. [#6312](https://github.com/Project-OSRM/osrm-backend/pull/6312)
- ADDED: Add smoke test for Docker image. [#6313](https://github.com/Project-OSRM/osrm-backend/pull/6313)
- CHANGED: Update libosmium to version 2.18.0. [#6303](https://github.com/Project-OSRM/osrm-backend/pull/6303)
- CHANGED: Remove EXACT from find_package if using Conan. [#6299](https://github.com/Project-OSRM/osrm-backend/pull/6299)
- CHANGED: Configure Undefined Behaviour Sanitizer. [#6290](https://github.com/Project-OSRM/osrm-backend/pull/6290)
- CHANGED: Use Conan instead of Mason to install code dependencies. [#6284](https://github.com/Project-OSRM/osrm-backend/pull/6284)
- CHANGED: Migrate to C++17. Update sol2 to 3.3.0. [#6279](https://github.com/Project-OSRM/osrm-backend/pull/6279)
- CHANGED: Update macOS CI image to macos-11. [#6286](https://github.com/Project-OSRM/osrm-backend/pull/6286)
- CHANGED: Enable even more clang-tidy checks. [#6273](https://github.com/Project-OSRM/osrm-backend/pull/6273)
- CHANGED: Configure CMake to not build flatbuffers tests and samples. [#6274](https://github.com/Project-OSRM/osrm-backend/pull/6274)
- CHANGED: Enable more clang-tidy checks. [#6270](https://github.com/Project-OSRM/osrm-backend/pull/6270)
- CHANGED: Configure clang-tidy job on CI. [#6261](https://github.com/Project-OSRM/osrm-backend/pull/6261)
- CHANGED: Use Github Actions for building container images [#6138](https://github.com/Project-OSRM/osrm-backend/pull/6138)
- CHANGED: Upgrade Boost dependency to 1.70 [#6113](https://github.com/Project-OSRM/osrm-backend/pull/6113)
- CHANGED: Upgrade Ubuntu CI builds to 20.04 [#6119](https://github.com/Project-OSRM/osrm-backend/pull/6119)
- CHANGED: Make building osrm-routed optional [#6144](https://github.com/Project-OSRM/osrm-backend/pull/6144)
- FIXED: Run all unit tests in CI [#5248](https://github.com/Project-OSRM/osrm-backend/pull/5248)
- FIXED: Fix installation of Mason CMake and 32 bit CI build [#6170](https://github.com/Project-OSRM/osrm-backend/pull/6170)
- FIXED: Fixed Node docs generation check in CI. [#6058](https://github.com/Project-OSRM/osrm-backend/pull/6058)
- CHANGED: Docker build, enabled arm64 build layer [#6172](https://github.com/Project-OSRM/osrm-backend/pull/6172)
- CHANGED: Docker build, enabled apt-get update/install caching in separate layer for build phase [#6175](https://github.com/Project-OSRM/osrm-backend/pull/6175)
- FIXED: Bump CI complete meta job to ubuntu-20.04 [#6323](https://github.com/Project-OSRM/osrm-backend/pull/6323)
- CHANGED: Node packages are now scoped by @project-osrm [#6386](https://github.com/Project-OSRM/osrm-backend/issues/6386)
- Routing:
- CHANGED: Lazily generate optional route path data [#6045](https://github.com/Project-OSRM/osrm-backend/pull/6045)
- FIXED: Completed support for no_entry and no_exit turn restrictions. [#5988](https://github.com/Project-OSRM/osrm-backend/pull/5988)
- ADDED: Add support for non-round-trips with a single fixed endpoint. [#6050](https://github.com/Project-OSRM/osrm-backend/pull/6050)
- FIXED: Improvements to maneuver override processing [#6125](https://github.com/Project-OSRM/osrm-backend/pull/6125)
- ADDED: Support snapping to multiple ways at an input location. [#5953](https://github.com/Project-OSRM/osrm-backend/pull/5953)
- FIXED: Fix snapping target locations to ways used in turn restrictions. [#6339](https://github.com/Project-OSRM/osrm-backend/pull/6339)
- ADDED: Support OSM traffic signal directions. [#6153](https://github.com/Project-OSRM/osrm-backend/pull/6153)
- FIXED: Ensure u-turn exists in intersection view. [#6376](https://github.com/Project-OSRM/osrm-backend/pull/6376)
- FIXED: Gracefully handle no-turn intersections in guidance processing. [#6382](https://github.com/Project-OSRM/osrm-backend/issues/6382)
- Profile:
- CHANGED: Bicycle surface speeds [#6212](https://github.com/Project-OSRM/osrm-backend/pull/6212)
- Tools:
- CHANGED: Do not generate intermediate .osrm file in osrm-extract. [#6354](https://github.com/Project-OSRM/osrm-backend/pull/6354)
# 5.26.0
- Changes from 5.25.0
- API:
- FIXED: Allow for special characters in the profile/method as part of the HTTP URL. [#6090](https://github.com/Project-OSRM/osrm-backend/pull/6090)
- FIXED: Set osrm-routed to immediately close bad connections [#6112](https://github.com/Project-OSRM/osrm-backend/pull/6112)
- Build:
- CHANGED: Replace Travis with Github Actions for CI builds [#6071](https://github.com/Project-OSRM/osrm-backend/pull/6071)
- FIXED: Fixed Boost link flags in pkg-config file. [#6083](https://github.com/Project-OSRM/osrm-backend/pull/6083)
- FIXED: Fixed test cache to consider MLD executable changes. [#6129](https://github.com/Project-OSRM/osrm-backend/pull/6129)
- Routing:
- FIXED: Fix generation of inefficient MLD partitions [#6084](https://github.com/Project-OSRM/osrm-backend/pull/6084)
- FIXED: Fix MLD level mask generation to support 64-bit masks. [#6123](https://github.com/Project-OSRM/osrm-backend/pull/6123)
- FIXED: Fix metric offset overflow for large MLD partitions. This breaks the **data format** [#6124](https://github.com/Project-OSRM/osrm-backend/pull/6124)
# 5.25.0
- Changes from 5.24.0
- Build:
- CHANGED: Node binaries now use Github Releases for hosting [#6030](https://github.com/Project-OSRM/osrm-backend/pull/6030)
- Misc:
- FIXED: Upgrade to @mapbox/node-pre-gyp fix various bugs with Node 12/14 [#5991](https://github.com/Project-OSRM/osrm-backend/pull/5991)
- FIXED: `valid` type in documentation examples [#5990](https://github.com/Project-OSRM/osrm-backend/issues/5990)
- FIXED: Remove redundant loading of .osrm.cell_metrics [#6019](https://github.com/Project-OSRM/osrm-backend/issues/6019)
- CHANGED: Increase PackedOSMIDs size to 34 bits. This breaks the **data format** [#6020](https://github.com/Project-OSRM/osrm-backend/issues/6020)
- Profile:
- FIXED: Add kerb barrier exception to default car profile. [#5999](https://github.com/Project-OSRM/osrm-backend/pull/5999)
# 5.24.0
- Changes from 5.23.0
- Features
- ADDED: Added support for multiple via-way restrictions. [#5907](https://github.com/Project-OSRM/osrm-backend/pull/5907)
- ADDED: Add node bindings support for Node 12, 14, and publish binaries [#5918](https://github.com/Project-OSRM/osrm-backend/pull/5918)
- REMOVED: we no longer publish Node 8 binary modules (they are still buildable from source) [#5918](https://github.com/Project-OSRM/osrm-backend/pull/5918)
- Routing:
- FIXED: Avoid copying ManyToMany table results [#5923](https://github.com/Project-OSRM/osrm-backend/pull/5923)
- FIXED: Reduce copying in API parameter constructors [#5925](https://github.com/Project-OSRM/osrm-backend/pull/5925)
- Misc:
- CHANGED: Cleanup NodeJS dependencies [#5945](https://github.com/Project-OSRM/osrm-backend/pull/5945)
- CHANGED: Unify `.osrm.turn_penalites_index` dump processing same with `.osrm.turn_weight_penalties` and `.osrm.turn_duration_penalties` [#5868](https://github.com/Project-OSRM/osrm-backend/pull/5868)
- FIXED: Properly validate source/destination validation in NodeJS table service [#5595](https://github.com/Project-OSRM/osrm-backend/pull/5595/files)
- FIXED: turn.roads_on_the_left not containing incoming roads and turn.roads_on_the_right not containing outgoing roads on two-way roads [#5128](https://github.com/Project-OSRM/osrm-backend/issues/5128)
- Profile:
- ADDED: Profile debug script which fetches a way from OSM then outputs the result of the profile. [#5908](https://github.com/Project-OSRM/osrm-backend/pull/5908)
- Infrastructure
- CHANGED: Bundled protozero updated to v1.7.0. [#5858](https://github.com/Project-OSRM/osrm-backend/pull/5858)
- Windows:
- FIXED: Fix bit-shift overflow in MLD partition step. [#5878](https://github.com/Project-OSRM/osrm-backend/pull/5878)
- FIXED: Fix vector bool permutation in graph contraction step [#5882](https://github.com/Project-OSRM/osrm-backend/pull/5882)
- API:
- FIXED: Undo libosrm API break by adding old interface as method overload [#5861](https://github.com/Project-OSRM/osrm-backend/pull/5861)
- FIXED: Fixed validation of sources/destinations when accessed via node bindings [#5595](https://github.com/Project-OSRM/osrm-backend/pull/5595)
# 5.23.0
- Changes from 5.22.0
- Build:
- FIXED: pessimistic calls to std::move [#5560](https://github.com/Project-OSRM/osrm-backend/pull/5561)
- Features:
- ADDED: new API parameter - `snapping=any|default` to allow snapping to previously unsnappable edges [#5361](https://github.com/Project-OSRM/osrm-backend/pull/5361)
- ADDED: keepalive support to the osrm-routed HTTP server [#5518](https://github.com/Project-OSRM/osrm-backend/pull/5518)
- ADDED: flatbuffers output format support [#5513](https://github.com/Project-OSRM/osrm-backend/pull/5513)
- ADDED: Global 'skip_waypoints' option [#5556](https://github.com/Project-OSRM/osrm-backend/pull/5556)
- FIXED: Install the libosrm_guidance library correctly [#5604](https://github.com/Project-OSRM/osrm-backend/pull/5604)
- FIXED: Http Handler can now deal witch optional whitespace between header-key and -value [#5606](https://github.com/Project-OSRM/osrm-backend/issues/5606)
- Routing:
- CHANGED: allow routing past `barrier=arch` [#5352](https://github.com/Project-OSRM/osrm-backend/pull/5352)
- CHANGED: default car weight was reduced to 2000 kg. [#5371](https://github.com/Project-OSRM/osrm-backend/pull/5371)
- CHANGED: default car height was reduced to 2 meters. [#5389](https://github.com/Project-OSRM/osrm-backend/pull/5389)
- FIXED: treat `bicycle=use_sidepath` as no access on the tagged way. [#5622](https://github.com/Project-OSRM/osrm-backend/pull/5622)
- FIXED: fix table result when source and destination on same one-way segment. [#5828](https://github.com/Project-OSRM/osrm-backend/pull/5828)
- FIXED: fix occasional segfault when swapping data with osrm-datastore and using `exclude=` [#5844](https://github.com/Project-OSRM/osrm-backend/pull/5844)
- FIXED: fix crash in MLD alternative search if source or target are invalid [#5851](https://github.com/Project-OSRM/osrm-backend/pull/5851)
- Misc:
- CHANGED: Reduce memory usage for raster source handling. [#5572](https://github.com/Project-OSRM/osrm-backend/pull/5572)
- CHANGED: Add cmake option `ENABLE_DEBUG_LOGGING` to control whether output debug logging. [#3427](https://github.com/Project-OSRM/osrm-backend/issues/3427)
- CHANGED: updated extent of Hong Kong as left hand drive country. [#5535](https://github.com/Project-OSRM/osrm-backend/issues/5535)
- FIXED: corrected error message when failing to snap input coordinates [#5846](https://github.com/Project-OSRM/osrm-backend/pull/5846)
- Infrastructure
- REMOVED: STXXL support removed as STXXL became abandonware. [#5760](https://github.com/Project-OSRM/osrm-backend/pull/5760)
# 5.22.0
- Changes from 5.21.0
- Build:
- ADDED: optionally build Node `lts` and `latest` bindings [#5347](https://github.com/Project-OSRM/osrm-backend/pull/5347)
- Features:
- ADDED: new waypoints parameter to the `route` plugin, enabling silent waypoints [#5345](https://github.com/Project-OSRM/osrm-backend/pull/5345)
- ADDED: data timestamp information in the response (saved in new file `.osrm.timestamp`). [#5115](https://github.com/Project-OSRM/osrm-backend/issues/5115)
# 5.21.0
- Changes from 5.20.0
- Features:
- ADDED: all waypoints in responses now contain a distance property between the original coordinate and the snapped location. [#5255](https://github.com/Project-OSRM/osrm-backend/pull/5255)
- ADDED: if `fallback_speed` is used, a new structure `fallback_speed_cells` will describe which cells contain estimated values [#5259](https://github.com/Project-OSRM/osrm-backend/pull/5259)
- REMOVED: we no longer publish Node 4 or 6 binary modules (they are still buildable from source) [#5314](https://github.com/Project-OSRM/osrm-backend/pull/5314)
- Table:
- ADDED: new parameter `scale_factor` which will scale the cell `duration` values by this factor. [#5298](https://github.com/Project-OSRM/osrm-backend/pull/5298)
- FIXED: only trigger `scale_factor` code to scan matrix when necessary. [#5303](https://github.com/Project-OSRM/osrm-backend/pull/5303)
- FIXED: fix bug in reverse offset calculation that sometimes lead to negative (and other incorrect) values in distance table results [#5315](https://github.com/Project-OSRM/osrm-backend/pull/5315)
- Docker:
- FIXED: use consistent boost version between build and runtime [#5311](https://github.com/Project-OSRM/osrm-backend/pull/5311)
- FIXED: don't override default permissions on /opt [#5311](https://github.com/Project-OSRM/osrm-backend/pull/5311)
- Matching:
- CHANGED: matching will now consider edges marked with is_startpoint=false, allowing matching over ferries and other previously non-matchable edge types. [#5297](https://github.com/Project-OSRM/osrm-backend/pull/5297)
- Profile:
- ADDED: Parse `source:maxspeed` and `maxspeed:type` tags to apply maxspeeds and add belgian flanders rural speed limit. [#5217](https://github.com/Project-OSRM/osrm-backend/pull/5217)
- CHANGED: Refactor maxspeed parsing to use common library. [#5144](https://github.com/Project-OSRM/osrm-backend/pull/5144)
# 5.20.0
- Changes from 5.19.0:
- Table:
- CHANGED: switch to pre-calculated distances for table responses for large speedup and 10% memory increase. [#5251](https://github.com/Project-OSRM/osrm-backend/pull/5251)
- ADDED: new parameter `fallback_speed` which will fill `null` cells with estimated value [#5257](https://github.com/Project-OSRM/osrm-backend/pull/5257)
- CHANGED: Remove API check for matrix sources/destination length to be less than or equal to coordinates length. [#5298](https://github.com/Project-OSRM/osrm-backend/pull/5289)
- FIXED: Fix crashing bug when using fallback_speed parameter with more sources than destinations. [#5291](https://github.com/Project-OSRM/osrm-backend/pull/5291)
- Features:
- ADDED: direct mmapping of datafiles is now supported via the `--mmap` switch. [#5242](https://github.com/Project-OSRM/osrm-backend/pull/5242)
- REMOVED: the previous `--memory_file` switch is now deprecated and will fallback to `--mmap` [#5242](https://github.com/Project-OSRM/osrm-backend/pull/5242)
- ADDED: Now publishing Node 10.x LTS binary modules [#5246](https://github.com/Project-OSRM/osrm-backend/pull/5246)
- Windows:
- FIXED: Windows builds again. [#5249](https://github.com/Project-OSRM/osrm-backend/pull/5249)
- Docker:
- CHANGED: switch from Alpine Linux to Debian Buster base images [#5281](https://github.com/Project-OSRM/osrm-backend/pull/5281)
# 5.19.0
- Changes from 5.18.0:
- Optimizations:
- CHANGED: Use Grisu2 for serializing floating point numbers. [#5188](https://github.com/Project-OSRM/osrm-backend/pull/5188)
- ADDED: Node bindings can return pre-rendered JSON buffer. [#5189](https://github.com/Project-OSRM/osrm-backend/pull/5189)
- Profiles:
- CHANGED: Bicycle profile now blacklists barriers instead of whitelisting them [#5076
](https://github.com/Project-OSRM/osrm-backend/pull/5076/)
- CHANGED: Foot profile now blacklists barriers instead of whitelisting them [#5077
](https://github.com/Project-OSRM/osrm-backend/pull/5077/)
- CHANGED: Support maxlength and maxweight in car profile [#5101](https://github.com/Project-OSRM/osrm-backend/pull/5101)
- Bugfixes:
- FIXED: collapsing of ExitRoundabout instructions [#5114](https://github.com/Project-OSRM/osrm-backend/issues/5114)
- Misc:
- CHANGED: Support up to 512 named shared memory regions [#5185](https://github.com/Project-OSRM/osrm-backend/pull/5185)
# 5.18.0
- Changes from 5.17.0:
- Features:
- ADDED: `table` plugin now optionally returns `distance` matrix as part of response [#4990](https://github.com/Project-OSRM/osrm-backend/pull/4990)
- ADDED: New optional parameter `annotations` for `table` that accepts `distance`, `duration`, or both `distance,duration` as values [#4990](https://github.com/Project-OSRM/osrm-backend/pull/4990)
- Infrastructure:
- ADDED: Updated libosmium and added protozero and vtzero libraries [#5037](https://github.com/Project-OSRM/osrm-backend/pull/5037)
- CHANGED: Use vtzero library in tile plugin [#4686](https://github.com/Project-OSRM/osrm-backend/pull/4686)
- Profile:
- ADDED: Bicycle profile now returns classes for ferry and tunnel routes. [#5054](https://github.com/Project-OSRM/osrm-backend/pull/5054)
- ADDED: Bicycle profile allows to exclude ferry routes (default to not enabled) [#5054](https://github.com/Project-OSRM/osrm-backend/pull/5054)
# 5.17.1
- Changes from 5.17.0:
- Bugfixes:
- FIXED: Do not combine a segregated edge with a roundabout [#5039](https://github.com/Project-OSRM/osrm-backend/issues/5039)
# 5.17.0
- Changes from 5.16.0:
- Bugfixes:
- FIXED: deduplication of route steps when waypoints are used [#4909](https://github.com/Project-OSRM/osrm-backend/issues/4909)
- FIXED: Use smaller range for U-turn angles in map-matching [#4920](https://github.com/Project-OSRM/osrm-backend/pull/4920)
- FIXED: Remove the last short annotation segment in `trimShortSegments` [#4946](https://github.com/Project-OSRM/osrm-backend/pull/4946)
- FIXED: Properly calculate annotations for speeds, durations and distances when waypoints are used with mapmatching [#4949](https://github.com/Project-OSRM/osrm-backend/pull/4949)
- FIXED: Don't apply unimplemented SH and PH conditions in OpeningHours and add inversed date ranges [#4992](https://github.com/Project-OSRM/osrm-backend/issues/4992)
- FIXED: integer overflow in `DynamicGraph::Renumber` [#5021](https://github.com/Project-OSRM/osrm-backend/pull/5021)
- Profile:
- CHANGED: Handle oneways in get_forward_backward_by_key [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
- FIXED: Do not route against oneway road if there is a cycleway in the wrong direction; also review bike profile [#4943](https://github.com/Project-OSRM/osrm-backend/issues/4943)
- CHANGED: Make cyclability weighting of the bike profile prefer safer routes more strongly [#5015](https://github.com/Project-OSRM/osrm-backend/issues/5015)
- Guidance:
- CHANGED: Don't use obviousness for links bifurcations [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
- FIXED: Adjust Straight direction modifiers of side roads in driveway handler [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
- CHANGED: Added post process logic to collapse segregated turn instructions [#4925](https://github.com/Project-OSRM/osrm-backend/pull/4925)
- ADDED: Maneuver relation now supports `straight` as a direction [#4995](https://github.com/Project-OSRM/osrm-backend/pull/4995)
- FIXED: Support spelling maneuver relation with British spelling [#4950](https://github.com/Project-OSRM/osrm-backend/issues/4950)
- Tools:
- ADDED: `osrm-routed` accepts a new property `--memory_file` to store memory in a file on disk. [#4881](https://github.com/Project-OSRM/osrm-backend/pull/4881)
- ADDED: `osrm-datastore` accepts a new parameter `--dataset-name` to select the name of the dataset. [#4982](https://github.com/Project-OSRM/osrm-backend/pull/4982)
- ADDED: `osrm-datastore` accepts a new parameter `--list` to list all datasets loaded into memory. [#4982](https://github.com/Project-OSRM/osrm-backend/pull/4982)
- ADDED: `osrm-datastore` accepts a new parameter `--only-metric` to only reload the data that can be updated by a weight update (reduces memory for traffic updates). [#5002](https://github.com/Project-OSRM/osrm-backend/pull/5002)
- ADDED: `osrm-routed` accepts a new parameter `--dataset-name` to select the shared-memory dataset to use. [#4982](https://github.com/Project-OSRM/osrm-backend/pull/4982)
- NodeJS:
- ADDED: `OSRM` object accepts a new option `memory_file` that stores the memory in a file on disk. [#4881](https://github.com/Project-OSRM/osrm-backend/pull/4881)
- ADDED: `OSRM` object accepts a new option `dataset_name` to select the shared-memory dataset. [#4982](https://github.com/Project-OSRM/osrm-backend/pull/4982)
- Internals
- CHANGED: Updated segregated intersection identification [#4845](https://github.com/Project-OSRM/osrm-backend/pull/4845) [#4968](https://github.com/Project-OSRM/osrm-backend/pull/4968)
- REMOVED: Remove `.timestamp` file since it was unused [#4960](https://github.com/Project-OSRM/osrm-backend/pull/4960)
- Documentation:
- ADDED: Add documentation about OSM node ids in nearest service response [#4436](https://github.com/Project-OSRM/osrm-backend/pull/4436)
- Performance
- FIXED: Speed up response time when lots of legs exist and geojson is used with `steps=true` [#4936](https://github.com/Project-OSRM/osrm-backend/pull/4936)
- FIXED: Return iterators instead of vectors in datafacade_base functions [#4969](https://github.com/Project-OSRM/osrm-backend/issues/4969)
- Misc:
- ADDED: expose name for datasource annotations as metadata [#4973](https://github.com/Project-OSRM/osrm-backend/pull/4973)
# 5.16.0
- Changes from 5.15.2:
- Guidance
- ADDED #4676: Support for maneuver override relation, allowing data-driven overrides for turn-by-turn instructions [#4676](https://github.com/Project-OSRM/osrm-backend/pull/4676)
- CHANGED #4830: Announce reference change if names are empty
- CHANGED #4835: MAXIMAL_ALLOWED_SEPARATION_WIDTH increased to 12 meters
- CHANGED #4842: Lower priority links from a motorway now are used as motorway links [#4842](https://github.com/Project-OSRM/osrm-backend/pull/4842)
- CHANGED #4895: Use ramp bifurcations as fork intersections [#4895](https://github.com/Project-OSRM/osrm-backend/issues/4895)
- CHANGED #4893: Handle motorway forks with links as normal motorway intersections[#4893](https://github.com/Project-OSRM/osrm-backend/issues/4893)
- FIXED #4905: Check required tags of `maneuver` relations [#4905](https://github.com/Project-OSRM/osrm-backend/pull/4905)
- Profile:
- FIXED: `highway=service` will now be used for restricted access, `access=private` is still disabled for snapping.
- ADDED #4775: Exposes more information to the turn function, now being able to set turn weights with highway and access information of the turn as well as other roads at the intersection [#4775](https://github.com/Project-OSRM/osrm-backend/issues/4775)
- FIXED #4763: Add support for non-numerical units in car profile for maxheight [#4763](https://github.com/Project-OSRM/osrm-backend/issues/4763)
- ADDED #4872: Handling of `barrier=height_restrictor` nodes [#4872](https://github.com/Project-OSRM/osrm-backend/pull/4872)
# 5.15.2
- Changes from 5.15.1:
- Features:
- ADDED: Exposed the waypoints parameter in the node bindings interface
- Bugfixes:
- FIXED: Segfault causing bug in leg collapsing map matching when traversing edges in reverse
# 5.15.1
- Changes from 5.15.0:
- Bugfixes:
- FIXED: Segfault in map matching when RouteLeg collapsing code is run on a match with multiple submatches
- Guidance:
- Set type of trivial intersections where classes change to Suppressed instead of NoTurn
# 5.15.0
- Changes from 5.14.3:
- Bugfixes:
- FIXED #4704: Fixed regression in bearings reordering introduced in 5.13 [#4704](https://github.com/Project-OSRM/osrm-backend/issues/4704)
- FIXED #4781: Fixed overflow exceptions in percent-encoding parsing
- FIXED #4770: Fixed exclude flags for single toll road scenario
- FIXED #4283: Fix overflow on zero duration segments
- FIXED #4804: Ignore no_*_on_red turn restrictions
- Guidance:
- CHANGED #4706: Guidance refactoring step to decouple intersection connectivity analysis and turn instructions generation [#4706](https://github.com/Project-OSRM/osrm-backend/pull/4706)
- CHANGED #3491: Refactor `isThroughStreet`/Intersection options
- Profile:
- ADDED: `tunnel` as a new class in car profile so that sections of the route with tunnel tags will be marked as such
# 5.14.3
- Changes from 5.14.2:
- Features:
- Added a `waypoints` parameter to the match service plugin that accepts indices to input coordinates and treats only those points as waypoints in the response format.
- Bugfixes:
- FIXED #4754: U-Turn penalties are applied to straight turns.
- FIXED #4756: Removed too restrictive road name check in the sliproad handler
- FIXED #4731: Use correct weights for edge-based graph duplicated via nodes.
- Profile:
- CHANGED: added Belarus speed limits
- CHANGED: set default urban speed in Ukraine to 50kmh
# 5.14.2
- Changes from 5.14.1:
- Bugfixes:
- FIXED #4727: Erroring when a old .core file is present.
- FIXED #4642: Update checks for EMPTY_NAMEID to check for empty name strings
- FIXED #4738: Fix potential segmentation fault
- Node.js Bindings:
- ADDED: Exposed new `max_radiuses_map_matching` option from `EngingConfig` options
- Tools:
- ADDED: New osrm-routed `max_radiuses_map_matching` command line flag to optionally set a maximum radius for map matching
# 5.14.1
- Changes from 5.14.0
- Bugfixes:
- FIXED: don't use removed alternative candidates in `filterPackedPathsByCellSharing`
# 5.14.0
- Changes from 5.13
- API:
- ADDED: new RouteStep property `driving_side` that has either "left" or "right" for that step
- Misc:
- ADDED: Bundles a rough (please improve!) driving-side GeoJSON file for use with `osrm-extract --location-dependent-data data/driving_side.geojson`
- CHANGED: Conditional turn parsing is disabled by default now
- ADDED: Adds a tool to analyze turn instruction generation in a dataset. Useful for tracking turn-by-turn heuristic changes over time.
- CHANGED: Internal refactoring of guidance code as a first step towards a re-runnable guidance pipeline
- ADDED: Now publishing Node 8.x LTS binary modules
- Profile:
- CHANGED: Remove dependency on turn types and turn modifier in the process_turn function in the `car.lua` profile. Guidance instruction types are not used to influence turn penalty anymore so this will break backward compatibility between profile version 3 and 4.
- Guidance:
- ADDED: New internal flag on "segregated intersections" - in the future, will should allow collapsing of instructions across complex intersection geometry where humans only perceive a single maneuver
- CHANGED: Decrease roundabout turn radius threshold from 25m to 15m - adds some "exit the roundabout" instructions for moderately sized roundabouts that were being missed previously
- Docker:
- CHANGED: switch to alpine 3.6, and use a multistage build to reduce image size
- Build:
- FIX: use LUA_LIBRARY_DIRS to propertly detect Lua on all platforms
- Docs:
- FIX: clarify description of roundabout exit instructions
- Bugfixes:
- FIXED: Fix bug where merge instructions got the wrong direction modifier ([PR #4670](https://github.com/Project-OSRM/osrm-backend/pull/4670))
- FIXED: Properly use the `profile.properties.left_hand_driving` property, there was a typo that meant it had no effect
- FIXED: undefined behaviour when alternative candidate via node is same as source node ([#4691](https://github.com/Project-OSRM/osrm-backend/issues/4691))
- FIXED: ensure libosrm.pc is pushed to the correct location for pkgconfig to find it on all platforms
- FIXED: don't consider empty names + empty refs as a valid name for u-turns
# 5.13.0
- Changes from 5.12:
- Profile:
- Append cardinal directions from route relations to ref fields to improve instructions; off by default see `profile.cardinal_directions`
- Support of `distance` weight in foot and bicycle profiles
- Support of relations processing
- Added `way:get_location_tag(key)` method to get location-dependent tags https://github.com/Project-OSRM/osrm-backend/wiki/Using-location-dependent-data-in-profiles
- Added `forward_ref` and `backward_ref` support
- Left-side driving mode is specified by a local Boolean flag `is_left_hand_driving` in `ExtractionWay` and `ExtractionTurn`
- Support literal values for maxspeeds in NO, PL and ZA
- Infrastructure:
- Lua 5.1 support is removed due to lack of support in sol2 https://github.com/ThePhD/sol2/issues/302
- Fixed pkg-config version of OSRM
- Removed `.osrm.core` file since CoreCH is deprecated now.
- Tools:
- Because of boost/program_options#32 with boost 1.65+ we needed to change the behavior of the following flags to not accept `={true|false}` anymore:
- `--use-locations-cache=false` becomes `--disable-location-cache`
- `--parse-conditional-restrictions=true` becomes `--parse-conditional-restrictions`
- The deprecated options `--use-level-cache` and `--generate-edge-lookup`
- Bugfixes:
- Fixed #4348: Some cases of sliproads pre-processing were broken
- Fixed #4331: Correctly compute left/right modifiers of forks in case the fork is curved.
- Fixed #4472: Correctly count the number of lanes using the delimter in `turn:lanes` tag.
- Fixed #4214: Multiple runs of `osrm-partition` lead to crash.
- Fixed #4348: Fix assorted problems around slip roads.
- Fixed #4420: A bug that would result in unnecessary instructions, due to problems in suffix/prefix detection
- Algorithm
- Deprecate CoreCH functionality. Usage of CoreCH specific options will fall back to using CH with core_factor of 1.0
- MLD uses a unidirectional Dijkstra for 1-to-N and N-to-1 matrices which yields speedup.
# 5.12.0
- Changes from 5.11:
- Guidance
- now announcing turning onto oneways at the end of a road (e.g. onto dual carriageways)
- Adds new instruction types at the exit of roundabouts and rotaries `exit roundabout` and `exit rotary`.
- HTTP:
- New query parameter for route/table/match/trip plugings:
`exclude=` that can be used to exclude certain classes (e.g. exclude=motorway, exclude=toll).
This is configurable in the profile.
- NodeJS:
- New query option `exclude` for the route/table/match/trip plugins. (e.g. `exclude: ["motorway", "toll"]`)
- Profile:
- New property for profile table: `excludable` that can be used to configure which classes are excludable at query time.
- New optional property for profile table: `classes` that allows you to specify which classes you expect to be used.
We recommend this for better error messages around classes, otherwise the possible class names are infered automatically.
- Traffic:
- If traffic data files contain an empty 4th column, they will update edge durations but not modify the edge weight. This is useful for
updating ETAs returned, without changing route selection (for example, in a distance-based profile with traffic data loaded).
- Infrastructure:
- New file `.osrm.cell_metrics` created by `osrm-customize`.
- Debug tiles:
- Added new properties `type` and `modifier` to `turns` layer, useful for viewing guidance calculated turn types on the map
# 5.11.0
- Changes from 5.10:
- Features
- BREAKING: Added support for conditional via-way restrictions. This features changes the file format of osrm.restrictions and requires re-extraction
- Internals
- BREAKING: Traffic signals will no longer be represented as turns internally. This requires re-processing of data but enables via-way turn restrictions across highway=traffic_signals
- Additional checks for empty segments when loading traffic data files
- Tunes the constants for turns in sharp curves just a tiny bit to circumvent a mix-up in fork directions at a specific intersection (https://github.com/Project-OSRM/osrm-backend/issues/4331)
- Infrastructure
- Refactor datafacade to make implementing additional DataFacades simpler
- Bugfixes
- API docs are now buildable again
- Suppress unnecessary extra turn instruction when exiting a motorway via a motorway_link onto a primary road (https://github.com/Project-OSRM/osrm-backend/issues/4348 scenario 4)
- Suppress unnecessary extra turn instruction when taking a tertiary_link road from a teritary onto a residential road (https://github.com/Project-OSRM/osrm-backend/issues/4348 scenario 2)
- Various MSVC++ build environment fixes
- Avoid a bug that crashes GCC6
- Re-include .npmignore to slim down published modules
- Fix a pre-processing bug where incorrect directions could be issued when two turns would have similar instructions and we tried to give them distinct values (https://github.com/Project-OSRM/osrm-backend/pull/4375)
- The entry bearing for correct the cardinality of a direction value (https://github.com/Project-OSRM/osrm-backend/pull/4353
- Change timezones in West Africa to the WAT zone so they're recognized on the Windows platform
# 5.10.0
- Changes from 5.9:
- Profiles:
- New version 2 profile API which cleans up a number of things and makes it easier to for profiles to include each other. Profiles using the old version 0 and 1 APIs are still supported.
- New required `setup()` function that must return a configuration hash. Storing configuration in globals is deprecated.
- Passes the config hash returned in `setup()` as an argument to `process_node/way/segment/turn`.
- Properties are now set in `.properties` in the config hash returend by setup().
- initialize raster sources in `setup()` instead of in a separate callback.
- Renames the `sources` helper to `raster`.
- Renames `way_functions` to `process_way` (same for node, segment and turn).
- Removes `get_restrictions()`. Instead set `.restrictions` in the config hash in `setup()`.
- Removes `get_name_suffix_list()`. Instead set `.suffix_list` in the config hash in `setup()`.
- Renames `Handlers` to `WayHandlers`.
- Pass functions instead of strings to `WayHandlers.run()`, so it's possible to mix in your own functions.
- Reorders arguments to `WayHandlers` functions to match `process_way()`.
- Profiles must return a hash of profile functions. This makes it easier for profiles to include each other.
- Guidance: add support for throughabouts
- Bugfixes
- Properly save/retrieve datasource annotations for road segments ([#4346](https://github.com/Project-OSRM/osrm-backend/issues/4346)
- Fix conditional restriction grammer parsing so it works for single-day-of-week restrictions ([#4357](https://github.com/Project-OSRM/osrm-backend/pull/4357))
- Algorithm
- BREAKING: the file format requires re-processing due to the changes on via-ways
- Added support for via-way restrictions
# 5.9.2
- API:
- `annotations=durations,weights,speeds` values no longer include turn penalty values ([#4330](https://github.com/Project-OSRM/osrm-backend/issues/4330))
# 5.9.1
- Infrastructure
- STXXL is not required by default
# 5.9.0
- Changes from 5.8:
- Algorithm:
- Multi-Level Dijkstra:
- Plugins supported: `table`
- Adds alternative routes support (see [#4047](https://github.com/Project-OSRM/osrm-backend/pull/4047) and [3905](https://github.com/Project-OSRM/osrm-backend/issues/3905)): provides reasonably looking alternative routes (many, if possible) with reasonable query times.
- API:
- Exposes `alternatives=Number` parameter overload in addition to the boolean flag.
- Support for exits numbers and names. New member `exits` in `RouteStep`, based on `junction:ref` on ways
- `Intersection` now has new parameter `classes` that can be set in the profile on each way.
- Profiles:
- `result.exits` allows you to set a way's exit numbers and names, see [`junction:ref`](http://wiki.openstreetmap.org/wiki/Proposed_features/junction_details)
- `ExtractionWay` now as new property `forward_classes` and `backward_classes` that can set in the `way_function`.
The maximum number of classes is 8.
- We now respect the `construction` tag. If the `construction` tag value is not on our whitelist (`minor`, `widening`, `no`) we will exclude the road.
- Node.js Bindings:
- Exposes `alternatives=Number` parameter overload in addition to the boolean flag
- Expose `EngineConfig` options in the node bindings
- Tools:
- Exposes engine limit on number of alternatives to generate `--max-alternatives` in `osrm-routed` (3 by default)
- Infrastructure
- STXXL is not required to build OSRM and is an optional dependency for back-compatibility (ENABLE_STXXL=On)
- OpenMP is only required when the optional STXXL dependency is used
- Bug fixes:
- #4278: Remove superflous continious instruction on a motorway.
# 5.8.0
- Changes from 5.7
- API:
- polyline6 support in request string
- new parameter `approaches` for `route`, `table`, `trip` and `nearest` requests. This parameter keep waypoints on the curb side.
'approaches' accepts both 'curb' and 'unrestricted' values.
Note : the curb side depend on the `ProfileProperties::left_hand_driving`, it's a global property set once by the profile. If you are working with a planet dataset, the api will be wrong in some countries, and right in others.
- NodeJs Bindings
- new parameter `approaches` for `route`, `table`, `trip` and `nearest` requests.
- Tools
- `osrm-partition` now ensures it is called before `osrm-contract` and removes inconsitent .hsgr files automatically.
- Features
- Added conditional restriction support with `parse-conditional-restrictions=true|false` to osrm-extract. This option saves conditional turn restrictions to the .restrictions file for parsing by contract later. Added `parse-conditionals-from-now=utc time stamp` and `--time-zone-file=/path/to/file` to osrm-contract
- Command-line tools (osrm-extract, osrm-contract, osrm-routed, etc) now return error codes and legible error messages for common problem scenarios, rather than ugly C++ crashes
- Speed up pre-processing by only running the Lua `node_function` for nodes that have tags. Cuts OSM file parsing time in half.
- osrm-extract now performs generation of edge-expanded-edges using all available CPUs, which should make osrm-extract significantly faster on multi-CPU machines
- Files
- .osrm.nodes file was renamed to .nbg_nodes and .ebg_nodes was added
- Guidance
- #4075 Changed counting of exits on service roundabouts
- Debug Tiles
- added support for visualising turn penalties to the MLD plugin
- added support for showing the rate (reciprocal of weight) on each edge when used
- added support for turn weights in addition to turn durations in debug tiles
- Bugfixes
- Fixed a copy/paste issue assigning wrong directions in similar turns (left over right)
- #4074: fixed a bug that would announce entering highway ramps as u-turns
- #4122: osrm-routed/libosrm should throw exception when a dataset incompatible with the requested algorithm is loaded
- Avoid collapsing u-turns into combined turn instructions
# 5.7.1
- Bugfixes
- #4030 Roundabout edge-case crashes post-processing
# 5.7.0
- Changes from 5.6
- Algorithm:
- OSRM object has new option `algorithm` that allows the selection of a routing algorithm.
- New experimental algorithm: Multi-Level Dijkstra with new toolchain:
- Allows for fast metric updates in below a minute on continental sized networks (osrm-customize)
- Plugins supported: `match` and `route`
- Quickstart: `osrm-extract data.osm.pbf`, `osrm-partition data.osrm`, `osrm-customize data.osrm`, `osrm-routed --algorithm=MLD data.osrm`
- NodeJs Bindings
- Merged https://github.com/Project-OSRM/node-osrm into repository. Build via `cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On`.
- `OSRM` object has new option `algorihtm="CH","CoreCH","MLD"`
- Internals
- Shared memory notification via conditional variables on Linux or semaphore queue on OS X and Windows with a limit of 128 OSRM Engine instances
- Files
- .osrm.datasource_index file was removed. Data is now part of .osrm.geometries.
- .osrm.edge_lookup was removed. The option `--generate-edge-lookup` does nothing now.
- `osrm-contract` does not depend on the `.osrm.fileIndex` file anymore
- `osrm-extract` creates new file `.osrm.cnbg` and `.cnbg_to_ebg`
- `osrm-partition` creates new file `.osrm.partition` and `.osrm.cells`
- `osrm-customize` creates new file `.osrm.mldgr`
- Profiles
- Added `force_split_edges` flag to global properties. True value guarantees that segment_function will be called for all segments, but also could double memory consumption
- Map Matching:
- new option `gaps=split|ignore` to enable/disbale track splitting
- new option `tidy=true|false` to simplify traces automatically
# 5.6.3
- Changes from 5.6.0
- Bugfixes
- #3790 Fix incorrect speed values in tile plugin
# 5.6.2
- Changes from 5.6.0
- Bugfixes
- Fix incorrect forward datasources getter in facade
# 5.6.1
- Changes from 5.6.0
- Bugfixes
- Fix #3754 add restricted penalty on NoTurn turns
# 5.6.0
- Changes from 5.5
- Bugfixes
- Fix #3475 removed an invalid `exit` field from the `arrive` maneuver
- Fix #3515 adjusted number of `nodes` in `annotation`
- Fix #3605 Fixed a bug that could lead to turns at the end of the road to be suppressed
- Fix #2844 handle up to 16777215 code units in OSM names
- Infrastructure
- Support building rpm packages.
- Guidance
- No longer emitting turns on ferries, if a ferry should use multiple docking locations
- Profiles
- Removed the `./profile.lua -> ./profiles/car.lua` symlink. Use specific profiles from the `profiles` directory.
- `properties` object has a new `weight_name` field, default value is "duration"
- `properties` object has a new `weight_precision` field that specifies a decimal precision of edge weights, default value 1
- In `way_function` the filed `forward_rate` and `backward_rate` of `ExtractionWay` can now be set.
They have the same interpretation for the way weight as `forward_speed` and `backward_speed` for the edge duration.
The unit of rate is meters per weight unit, so higher values will be prefered during routing.
- `turn_function` now does not return an integer but takes in a `ExtractionTurn` object and can modify the `weight` and `duration` fields
- `segment_function` now takes in a `ExtractionSegment` object and can modify `weight` and `duration` fields
- `properties.uturn_penalty` is deprecated. Set it in the `turn_function`. The turn type is exposed as `ExtractionTurn::direction_modifier`.
- `properties.traffic_light_penalty` is deprecated. Traffic light penalties now need to be set over in the turn function.
Each turn with a traffic light is marked with `ExtractionTurn::has_traffic_light = true`.
- Renamed the helper file `profiles/lib/directional.lua` to `profiles/lib/tags.lua` since it now provides more general tags parsing utility functions.
- The car and foot profiles now depend on the helper file `profiles/lib/handlers.lua`.
- Infrastructure
- Disabled link-time optimized (LTO) builds by default. Enable by passing `-DENABLE_LTO=ON` to `cmake` if you need the performance and know what you are doing.
- Datafile versioning is now based on OSRM semver values, rather than source code checksums.
Datafiles are compatible between patch levels, but incompatible between minor version or higher bumps.
- libOSRM now creates an own watcher thread then used in shared memory mode to listen for data updates
- Tools:
- Added osrm-extract-conditionals tool for checking conditional values in OSM data
- Trip Plugin
- Added a new feature that finds the optimal route given a list of waypoints, a source and a destination. This does not return a roundtrip and instead returns a one way optimal route from the fixed source to the destination points.
# 5.5.1
- Changes from 5.5.0
- API:
- Adds `generate_hints=true` (`true` by default) which lets user disable `Hint` generating in the response. Use if you don't need `Hint`s!
- Bugfixes
- Fix #3418 and ensure we only return bearings in the range 0-359 in API responses
- Fixed a bug that could lead to emitting false instructions for staying on a roundabout
# 5.5.0
- Changes from 5.4.0
- API:
- `osrm-datastore` now accepts the parameter `--max-wait` that specifies how long it waits before aquiring a shared memory lock by force
- Shared memory now allows for multiple clients (multiple instances of libosrm on the same segment)
- Polyline geometries can now be requested with precision 5 as well as with precision 6
- Profiles
- the car profile has been refactored into smaller functions
- get_value_by_key() is now guaranteed never to return empty strings, nil is returned instead.
- debug.lua was added to make it easier to test/develop profile code.
- `car.lua` now depends on lib/set.lua and lib/sequence.lua
- `restrictions` is now used for namespaced restrictions and restriction exceptions (e.g. `restriction:motorcar=` as well as `except=motorcar`)
- replaced lhs/rhs profiles by using test defined profiles
- Handle `oneway=alternating` (routed over with penalty) separately from `oneway=reversible` (not routed over due to time dependence)
- Handle `destination:forward`, `destination:backward`, `destination:ref:forward`, `destination:ref:backward` tags
- Properly handle destinations on `oneway=-1` roads
- Guidance
- Notifications are now exposed more prominently, announcing turns onto a ferry/pushing your bike more prominently
- Improved turn angle calculation, detecting offsets due to lanes / minor variations due to inaccuracies
- Corrected the bearings returned for intermediate steps - requires reprocessing
- Improved turn locations for collapsed turns
- Sliproad classification refinements: the situations we detect as Sliproads now resemble more closely the reality
- Trip Plugin
- changed internal behaviour to prefer the smallest lexicographic result over the largest one
- Bugfixes
- fixed a bug where polyline decoding on a defective polyline could end up in out-of-bound access on a vector
- fixed compile errors in tile unit-test framework
- fixed a bug that could result in inconsistent behaviour when collapsing instructions
- fixed a bug that could result in crashes when leaving a ferry directly onto a motorway ramp
- fixed a bug in the tile plugin that resulted in discovering invalid edges for connections
- improved error messages when missing files during traffic updates (#3114)
- For single coordinate geometries the GeoJSON `Point` encoding was broken. We now always emit `LineString`s even in the one-coordinate-case (backwards compatible) (#3425)
- Debug Tiles
- Added support for turn penalties
- Internals
- Internal/Shared memory datafacades now share common memory layout and data loading code
- File reading now has much better error handling
- Misc
- Progress indicators now print newlines when stdout is not a TTY
- Prettier API documentation now generated via `npm run build-api-docs` output `build/docs`
# 5.4.3
- Changes from 5.4.2
- Bugfixes
- #3254 Fixed a bug that could end up hiding roundabout instructions
- #3260 fixed a bug that provided the wrong location in the arrival instruction
# 5.4.2
- Changes from 5.4.1
- Bugfixes
- #3032 Fixed a bug that could result in emitting `invalid` as an instruction type on sliproads with mode changes
- #3085 Fixed an outdated assertion that could throw without a cause for concern
- #3179 Fixed a bug that could trigger an assertion in TurnInstruciton generation
# 5.4.1
- Changes from 5.4.0
- Bugfixes
- #3016: Fixes shared memory updates while queries are running
# 5.4.0
- Changes from 5.3.0
- Profiles
- includes library guidance.lua that offers preliminary configuration on guidance.
- added left_hand_driving flag in global profile properties
- modified turn penalty function for car profile - better fit to real data
- return `ref` and `name` as separate fields. Do no use ref or destination as fallback for name value
- the default profile for car now ignores HOV only roads
- Guidance
- Handle Access tags for lanes, only considering valid lanes in lane-guidance (think car | car | bike | car)
- Improved the detection of non-noticeable name-changes
- Summaries have been improved to consider references as well
- API:
- `annotations=true` now returns the data source id for each segment as `datasources`
- Reduced semantic of merge to refer only to merges from a lane onto a motorway-like road
- new `ref` field in the `RouteStep` object. It contains the reference code or name of a way. Previously merged into the `name` property like `name (ref)` and are now separate fields.
- Bugfixes
- Fixed an issue that would result in segfaults for viaroutes with an invalid intermediate segment when u-turns were allowed at the via-location
- Invalid only_* restrictions could result in loss of connectivity. As a fallback, we assume all turns allowed when the restriction is not valid
- Fixed a bug that could result in an infinite loop when finding information about an upcoming intersection
- Fixed a bug that led to not discovering if a road simply looses a considered prefix
- BREAKING: Fixed a bug that could crash postprocessing of instructions on invalid roundabout taggings. This change requires reprocessing datasets with osrm-extract and osrm-contract
- Fixed an issue that could emit `invalid` as instruction when ending on a sliproad after a traffic-light
- Fixed an issue that would detect turning circles as sliproads
- Fixed a bug where post-processing instructions (e.g. left + left -> uturn) could result in false pronunciations
- Fixes a bug where a bearing range of zero would cause exhaustive graph traversals
- Fixes a bug where certain looped geometries could cause an infinite loop during extraction
- Fixed a bug where some roads could be falsly identified as sliproads
- Fixed a bug where roundabout intersections could result in breaking assertions when immediately exited
- Infrastructure:
- Adds a feature to limit results in nearest service with a default of 100 in `osrm-routed`
# 5.3.0
- Changes from 5.3.0-rc.3
- Guidance
- Only announce `use lane` on required turns (not using all lanes to go straight)
- Moved `lanes` to the intersection objects. This is BREAKING in relation to other Release Candidates but not with respect to other releases.
- Bugfixes
- Fix BREAKING: bug that could result in failure to load 'osrm.icd' files. This breaks the dataformat
- Fix: bug that results in segfaults when `use lane` instructions are suppressed
- Changes form 5.2.7
- API
- Introduces new `TurnType` in the form of `use lane`. The type indicates that you have to stick to a lane without turning
- Introduces `lanes` to the `Intersection` object. The lane data contains both the markings at the intersection and a flag indicating if they can be chosen for the next turn
- Removed unused `-s` from `osrm-datastore`
- Guidance
- Only announce `use lane` on required turns (not using all lanes to go straight)
- Improved detection of obvious turns
- Improved turn lane detection
- Reduce the number of end-of-road instructions in obvious cases
- Profile:
- bicycle.lua: Surface speeds never increase the actual speed
- Infrastructure
- Add 32bit support
- Add ARM NEON/VFP support
- Fix Windows builds
- Optimize speed file updates using mmap
- Add option to disable LTO for older compilers
- BREAKING: The new turn type changes the turn-type order. This breaks the **data format**.
- BREAKING: Turn lane data introduces two new files (osrm.tld,osrm.tls). This breaks the fileformat for older versions.
- Bugfixes:
- Fix devide by zero on updating speed data using osrm-contract
# 5.3.0 RC3
- Changes from 5.3.0-rc.2
- Guidance
- Improved detection of obvious turns
- Improved turn lane detection
- Bugfixes
- Fix bug that didn't chose minimal weights on overlapping edges
# 5.3.0 RC2
- Changes from 5.3.0-rc.1
- Bugfixes
- Fixes invalid checks in the lane-extraction part of the car profile
# 5.3.0 RC1
- API
- Introduces new `TurnType` in the form of `use lane`. The type indicates that you have to stick to a lane without turning
- Introduces lanes to the route response. The lane data contains both the markings at the intersection and a flag indicating their involvement in the turn
- Infrastructure
- BREAKING: The new turn type changes the turn-type order. This breaks the **data format**.
- BREAKING: Turn lane data introduces two new files (osrm.tld,osrm.tls). This breaks the fileformat for older versions.
# 5.2.5
- Bugfixes
- Fixes a segfault caused by incorrect trimming logic for very short steps.
# 5.2.4
- Bugfixes:
- Fixed in issue that arised on roundabouts in combination with intermediate intersections and sliproads
# 5.2.3
- Bugfixes:
- Fixed an issue with name changes in roundabouts that could result in crashes
# 5.2.2
Changes from 5.2.1
- Bugfixes:
@ -220,5 +1100,3 @@
- `properties.use_turn_restrictions`
- `properties.u_turn_penalty`
- `properties.allow_u_turn_at_via`

File diff suppressed because it is too large Load Diff

3
CODE-OF-CONDUCT.md Normal file
View File

@ -0,0 +1,3 @@
# Code of conduct
Everyone is invited to participate in Project OSRMs open source projects and public discussions: we want to create a welcoming and friendly environment. Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces. The [Contributor Covenant](http://contributor-covenant.org) applies to all projects under the Project-OSRM organization and we ask that you please read [the full text](http://contributor-covenant.org/version/1/2/0/).

81
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,81 @@
# Everyone
Please take some time to review our [code of conduct](CODE-OF-CONDUCT.md) to help guide your interactions with others on this project.
# User
Before you open a new issue, please search for older ones that cover the same issue.
In general "me too" comments/issues are frowned upon.
You can add a :+1: emoji reaction to the issue if you want to express interest in this.
# Developer
We use `clang-format` version `15` to consistently format the code base. There is a helper script under `scripts/format.sh`.
The format is automatically checked by the `mason-linux-release` job of a Travis CI build.
To save development time a local hook `.git/hooks/pre-push`
```
#!/bin/sh
remote="$1"
if [ x"$remote" = xorigin ] ; then
if [ $(git rev-parse --abbrev-ref HEAD) = master ] ; then
echo "Rejected push to $remote/master" ; exit 1
fi
./scripts/format.sh && ./scripts/error_on_dirty.sh
if [ $? -ne 0 ] ; then
echo "Unstaged format changes" ; exit 1
fi
fi
```
could check code format, modify a local repository and reject push due to unstaged formatting changes.
Also `pre-push` hook rejects direct pushes to `origin/master`.
⚠️ `scripts/format.sh` checks all local files that match `*.cpp` or `*.hpp` patterns.
In general changes that affect the API and/or increase the memory consumption need to be discussed first.
Often we don't include changes that would increase the memory consumption a lot if they are not generally usable (e.g. elevation data is a good example).
## Pull Request
Every pull-request that changes the API needs to update the docs in `docs/http.md` and add an entry to `CHANGELOG.md`.
Breaking changes need to have a BREAKING prefix. See the [releasing documentation](docs/releasing.md) on how this affects the version.
Early feedback is also important.
You will see that a lot of the PR have tags like `[not ready]` or `[wip]`.
We like to open PRs as soon as we are starting to work on something to make it visible to the rest of the team.
If your work is going in entirely the wrong direction, there is a good chance someone will pick up on this before it is too late.
Everyone is encouraged to read PRs of other people and give feedback.
For every significant code change we require a pull request review before it is merged.
If your pull request modifies the API this need to be signed of by a team discussion.
This means you will need to find another member of the team with commit access and request a review of your pull request.
Once your pull request is reviewed you can merge it! If you don't have commit access, ping someone that has commit access.
If you do have commit access there are in general two accepted styles to merging:
1. Make sure the branch is up to date with `master`. Run `git rebase master` to find out.
2. Once that is ensured you can either:
- Click the nice green merge button (for a non-fast-forward merge)
- Merge by hand using a fast-forward merge
Which merge you prefer is up to personal preference. In general it is recommended to use fast-forward merges because it creates a history that is sequential and easier to understand.
# Maintainer
## Doing a release
There is an in-depth guide around how to push out a release once it is ready [here](docs/releasing.md).
## The API
Changes to the API need to be discussed and signed off by the team. Breaking changes even more so than additive changes.
## Milestones
If a pull request or an issue is applicable for the current or next milestone, depends on the target version number.
Since we use semantic versioning we restrict breaking changes to major releases.
After a Release Candidate is released we usually don't change the API anymore if it is not critical.
Bigger code changes after a RC was released should also be avoided.

View File

@ -1,4 +1,4 @@
Copyright (c) 2016, Project OSRM contributors
Copyright (c) 2017, Project OSRM contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

157
README.md
View File

@ -1,64 +1,172 @@
## About
## Open Source Routing Machine
The Open Source Routing Machine is a high performance routing engine written in C++11 designed to run on OpenStreetMap data.
## Current build status
[![osrm-backend CI](https://github.com/Project-OSRM/osrm-backend/actions/workflows/osrm-backend.yml/badge.svg)](https://github.com/Project-OSRM/osrm-backend/actions/workflows/osrm-backend.yml) [![Codecov](https://codecov.io/gh/Project-OSRM/osrm-backend/branch/master/graph/badge.svg)](https://codecov.io/gh/Project-OSRM/osrm-backend) [![Discord](https://img.shields.io/discord/1034487840219860992)](https://discord.gg/es9CdcCXcb)
| build config | status |
|:-------------|:-------|
| Linux | [![Build Status](https://travis-ci.org/Project-OSRM/osrm-backend.png?branch=master)](https://travis-ci.org/Project-OSRM/osrm-backend) |
| Windows | [![Build status](https://ci.appveyor.com/api/projects/status/4iuo3s9gxprmcjjh)](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) |
| Coverage | [![codecov](https://codecov.io/gh/Project-OSRM/osrm-backend/branch/master/graph/badge.svg)](https://codecov.io/gh/Project-OSRM/osrm-backend) |
High performance routing engine written in C++ designed to run on OpenStreetMap data.
## Building
The following services are available via HTTP API, C++ library interface and NodeJs wrapper:
- Nearest - Snaps coordinates to the street network and returns the nearest matches
- Route - Finds the fastest route between coordinates
- Table - Computes the duration or distances of the fastest route between all pairs of supplied coordinates
- Match - Snaps noisy GPS traces to the road network in the most plausible way
- Trip - Solves the Traveling Salesman Problem using a greedy heuristic
- Tile - Generates Mapbox Vector Tiles with internal routing metadata
For instructions on how to [build](https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM) and [run OSRM](https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM), please consult [the Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
To quickly try OSRM use our [demo server](http://map.project-osrm.org) which comes with both the backend and a frontend on top.
To quickly try OSRM use our [free and daily updated online service](http://map.project-osrm.org)
For a quick introduction about how the road network is represented in OpenStreetMap and how to map specific road network features have a look at [the OSM wiki on routing](https://wiki.openstreetmap.org/wiki/Routing) or [this guide about mapping for navigation](https://web.archive.org/web/20221206013651/https://labs.mapbox.com/mapping/mapping-for-navigation/).
Related [Project-OSRM](https://github.com/Project-OSRM) repositories:
- [osrm-frontend](https://github.com/Project-OSRM/osrm-frontend) - User-facing frontend with map. The demo server runs this on top of the backend
- [osrm-text-instructions](https://github.com/Project-OSRM/osrm-text-instructions) - Text instructions from OSRM route response
- [osrm-backend-docker](https://github.com/project-osrm/osrm-backend/pkgs/container/osrm-backend) - Ready to use Docker images
## Documentation
### Full documentation
- [Hosted documentation](http://project-osrm.org)
- [osrm-routed HTTP API documentation](docs/http.md)
- [libosrm API documentation](docs/libosrm.md)
### Quick start
## Contact
Building OSRM assuming all dependencies are installed:
- Discord: [join](https://discord.gg/es9CdcCXcb)
- IRC: `irc.oftc.net`, channel: `#osrm` ([Webchat](https://webchat.oftc.net))
- Mailinglist: `https://lists.openstreetmap.org/listinfo/osrm-talk`
## Quick Start
The easiest and quickest way to setup your own routing engine is to use Docker images we provide.
There are two pre-processing pipelines available:
- Contraction Hierarchies (CH)
- Multi-Level Dijkstra (MLD)
we recommend using MLD by default except for special use-cases such as very large distance matrices where CH is still a better fit for the time being.
In the following we explain the MLD pipeline.
If you want to use the CH pipeline instead replace `osrm-partition` and `osrm-customize` with a single `osrm-contract` and change the algorithm option for `osrm-routed` to `--algorithm ch`.
### Using Docker
We base our Docker images ([backend](https://github.com/Project-OSRM/osrm-backend/pkgs/container/osrm-backend), [frontend](https://hub.docker.com/r/osrm/osrm-frontend/)) on Debian and make sure they are as lightweight as possible. Older backend versions can be found on [Docker Hub](https://hub.docker.com/r/osrm/osrm-backend/).
Download OpenStreetMap extracts for example from [Geofabrik](http://download.geofabrik.de/)
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
Pre-process the extract with the car profile and start a routing engine HTTP server on port 5000
docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf || echo "osrm-extract failed"
The flag `-v "${PWD}:/data"` creates the directory `/data` inside the docker container and makes the current working directory `"${PWD}"` available there. The file `/data/berlin-latest.osm.pbf` inside the container is referring to `"${PWD}/berlin-latest.osm.pbf"` on the host.
docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-partition /data/berlin-latest.osrm || echo "osrm-partition failed"
docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-customize /data/berlin-latest.osrm || echo "osrm-customize failed"
Note there is no `berlin-latest.osrm` file, but multiple `berlin-latest.osrm.*` files, i.e. `berlin-latest.osrm` is not file path, but "base" path referring to set of files and there is an option to omit this `.osrm` suffix completely(e.g. `osrm-partition /data/berlin-latest`).
docker run -t -i -p 5000:5000 -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-routed --algorithm mld /data/berlin-latest.osrm
Make requests against the HTTP server
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
Optionally start a user-friendly frontend on port 9966, and open it up in your browser
docker run -p 9966:9966 osrm/osrm-frontend
xdg-open 'http://127.0.0.1:9966'
In case Docker complains about not being able to connect to the Docker daemon make sure you are in the `docker` group.
sudo usermod -aG docker $USER
After adding yourself to the `docker` group make sure to log out and back in again with your terminal.
We support the following images in the Container Registry:
Name | Description
-----|------
`latest` | `master` compiled with release flag
`latest-assertions` | `master` compiled with with release flag, assertions enabled and debug symbols
`latest-debug` | `master` compiled with debug flag
`<tag>` | specific tag compiled with release flag
`<tag>-debug` | specific tag compiled with debug flag
### Building from Source
The following targets Ubuntu 22.04.
For instructions how to build on different distributions, macOS or Windows see our [Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
Install dependencies
```bash
sudo apt install build-essential git cmake pkg-config \
libbz2-dev libxml2-dev libzip-dev libboost-all-dev \
lua5.2 liblua5.2-dev libtbb-dev
```
Compile and install OSRM binaries
```bash
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake ..
cmake --build .
sudo cmake --build . --target install
```
Loading preparing a dataset and starting the server:
### Request Against the Demo Server
Read the [API usage policy](https://github.com/Project-OSRM/osrm-backend/wiki/Demo-server).
Simple query with instructions and alternatives on Berlin:
```
osrm-extract data.osm.pbf -p profiles/car.lua
osrm-contract data.osrm
osrm-routed data.osrm
curl "https://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true"
```
Running a query on your local server:
### Using the Node.js Bindings
The Node.js bindings provide read-only access to the routing engine.
We provide API documentation and examples [here](docs/nodejs/api.md).
You will need a modern `libstdc++` toolchain (`>= GLIBCXX_3.4.26`) for binary compatibility if you want to use the pre-built binaries.
For older Ubuntu systems you can upgrade your standard library for example with:
```
curl http://127.0.0.1:5000/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update -y
sudo apt-get install -y libstdc++-9-dev
```
### Running a request against the Demo Server
You can install the Node.js bindings via `npm install @project-osrm/osrm` or from this repository either via
First read the [API usage policy](https://github.com/Project-OSRM/osrm-backend/wiki/Api-usage-policy).
npm install
Then run simple query with instructions and alternatives on Berlin:
which will check and use pre-built binaries if they're available for this release and your Node version, or via
npm install --build-from-source
to always force building the Node.js bindings from source.
#### Unscoped packages
Prior to v5.27.0, the `osrm` Node package was unscoped. If you are upgrading from an old package, you will need to do the following:
```
curl https://router.project-osrm.org/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true
npm uninstall osrm --save
npm install @project-osrm/osrm --save
```
#### Package docs
For usage details have a look [these API docs](docs/nodejs/api.md).
An exemplary implementation by a 3rd party with Docker and Node.js can be found [here](https://github.com/door2door-io/osrm-express-server-demo).
## References in publications
When using the code in a (scientific) publication, please cite
@ -81,4 +189,3 @@ When using the code in a (scientific) publication, please cite
address = {New York, NY, USA},
}
```

View File

@ -1,163 +0,0 @@
@ECHO OFF
SETLOCAL
SET EL=0
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET PROJECT_DIR=%CD%
ECHO PROJECT_DIR^: %PROJECT_DIR%
ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS%
ECHO cmake^: && cmake --version
IF %ERRORLEVEL% NEQ 0 ECHO CMAKE not found GOTO ERROR
FOR /F %%G IN ("--version") DO cmake %%G 2>&1 | findstr /C:"3.5.0" > nul && goto CMAKE_NOT_OK
GOTO CMAKE_OK
:CMAKE_NOT_OK
ECHO CMAKE NOT OK - downloading new CMake
IF NOT EXIST cm.zip powershell Invoke-WebRequest https://cmake.org/files/v3.5/cmake-3.5.1-win32-x86.zip -OutFile $env:PROJECT_DIR\cm.zip
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF NOT EXIST cmake-3.5.1-win32-x86 7z -y x cm.zip | %windir%\system32\FIND "ing archive"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET PATH=%PROJECT_DIR%\cmake-3.5.1-win32-x86\bin;%PATH%
:CMAKE_OK
ECHO CMAKE_OK
cmake --version
ECHO activating VS command prompt ...
SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
ECHO platform^: %platform%
ECHO cl.exe version
cl
ECHO msbuild version
msbuild /version
:: HARDCODE "x64" as it is uppercase on AppVeyor and download from S3 is case sensitive
SET DEPSPKG=osrm-deps-win-x64-14.0.7z
:: local development
ECHO.
ECHO LOCAL_DEV^: %LOCAL_DEV%
IF NOT DEFINED LOCAL_DEV SET LOCAL_DEV=0
IF DEFINED LOCAL_DEV IF %LOCAL_DEV% EQU 1 IF EXIST %DEPSPKG% ECHO skipping deps download && GOTO SKIPDL
IF EXIST %DEPSPKG% DEL %DEPSPKG%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO downloading %DEPSPKG%
powershell Invoke-WebRequest https://mapbox.s3.amazonaws.com/windows-builds/windows-build-deps/$env:DEPSPKG -OutFile $env:PROJECT_DIR\$env:DEPSPKG
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
:SKIPDL
IF EXIST osrm-deps ECHO deleting osrm-deps... && RD /S /Q osrm-deps
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF EXIST build ECHO deleting build dir... && RD /S /Q build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
7z -y x %DEPSPKG% | %windir%\system32\FIND "ing archive"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
::tree osrm-deps
MKDIR build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cd build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET OSRMDEPSDIR=%PROJECT_DIR%/osrm-deps
set PREFIX=%OSRMDEPSDIR%/libs
set BOOST_ROOT=%OSRMDEPSDIR%/boost
set BOOST_LIBRARYDIR=%BOOST_ROOT%/lib
set TBB_INSTALL_DIR=%OSRMDEPSDIR%/tbb
set TBB_ARCH_PLATFORM=intel64/vc14
ECHO OSRMDEPSDIR ^: %OSRMDEPSDIR%
ECHO PREFIX ^: %PREFIX%
ECHO BOOST_ROOT ^: %BOOST_ROOT%
ECHO BOOST_LIBRARYDIR ^: %BOOST_LIBRARYDIR%
ECHO TBB_INSTALL_DIR ^: %TBB_INSTALL_DIR%
ECHO TBB_ARCH_PLATFORM ^: %TBB_ARCH_PLATFORM%
ECHO calling cmake ....
cmake .. ^
-G "Visual Studio 14 2015 Win64" ^
-DBOOST_ROOT=%BOOST_ROOT% ^
-DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ^
-DBoost_ADDITIONAL_VERSIONS=1.58 ^
-DBoost_USE_MULTITHREADED=ON ^
-DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
-DCMAKE_INSTALL_PREFIX=%PREFIX%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO building ...
msbuild OSRM.sln ^
/p:Configuration=%Configuration% ^
/p:Platform=x64 ^
/t:rebuild ^
/p:BuildInParallel=true ^
/m:%NUMBER_OF_PROCESSORS% ^
/toolsversion:14.0 ^
/p:PlatformToolset=v140 ^
/clp:Verbosity=normal ^
/nologo ^
/flp1:logfile=build_errors.txt;errorsonly ^
/flp2:logfile=build_warnings.txt;warningsonly
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CD %PROJECT_DIR%\build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET PATH=%PROJECT_DIR%\osrm-deps\libs\bin;%PATH%
ECHO running extractor-tests.exe ...
unit_tests\%Configuration%\extractor-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running engine-tests.exe ...
unit_tests\%Configuration%\engine-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running util-tests.exe ...
unit_tests\%Configuration%\util-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running server-tests.exe ...
unit_tests\%Configuration%\server-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF NOT "%APPVEYOR_REPO_BRANCH%"=="master" GOTO DONE
ECHO ========= CREATING PACKAGES ==========
CD %PROJECT_DIR%\build\%Configuration%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET P=%PROJECT_DIR%
SET ZIP= %P%\osrm_%Configuration%.zip
IF EXIST %ZIP% ECHO deleting %ZIP% && DEL /F /Q %ZIP%
IF %ERRORLEVEL% NEQ 0 ECHO deleting %ZIP% FAILED && GOTO ERROR
7z a %ZIP% *.lib *.exe *.pdb %P%/osrm-deps/libs/bin/*.dll -tzip -mx9 | %windir%\system32\FIND "ing archive"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CD ..\..\profiles
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO disk=c:\temp\stxxl,10000,wincall > .stxxl.txt
7z a %ZIP% * -tzip -mx9 | %windir%\system32\FIND "ing archive"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
GOTO DONE
:ERROR
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%
:DONE
ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EXIT /b %EL%

View File

@ -1,42 +0,0 @@
environment:
matrix:
- configuration: Release
# - configuration: Debug
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
os: Visual Studio 2015
# clone directory
clone_folder: c:\projects\osrm
platform: x64
build_script:
- CALL appveyor-build.bat
test: off
artifacts:
- path: osrm_Release.zip
name: osrm_Release.zip
# - path: osrm_Debug.zip
# name: osrm_Debug.zip
branches:
only:
- master
deploy:
provider: FTP
server:
secure: ef7oiQTTXFGt8NdNiOHm/uRFVrUttzyFbIlnaeHhQvw=
username:
secure: Bw+Se2GTJxA6+GtRkEc//tQSBHOuFIuJHBjFwR9cD+8=
password:
secure: eqwESZqxMXC/j5mOCpaXuw==
folder: /
enable_ssl: true
active_mode: false

View File

@ -1,34 +0,0 @@
@ECHO OFF
SETLOCAL
SET EL=0
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET PLATFORM=x64
SET CONFIGURATION=Release
::SET LOCAL_DEV=1
FOR /F "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do SET APPVEYOR_REPO_BRANCH=%%i
ECHO APPVEYOR_REPO_BRANCH^: %APPVEYOR_REPO_BRANCH%
::SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.5.0-win32-x86\bin;%PATH%
SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.5.1-win32-x86\bin;%PATH%
SET PATH=C:\Program Files\7-Zip;%PATH%
powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CALL appveyor-build.bat
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
GOTO DONE
:ERROR
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%
:DONE
ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EXIT /b %EL%

44
cmake/CPackConfig.cmake Normal file
View File

@ -0,0 +1,44 @@
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
MESSAGE(FATAL_ERROR "Cannot configure CPack to generate Debian/RPM packages on non-linux systems.")
ENDIF()
string(TOLOWER "${CMAKE_PROJECT_NAME}" CPACK_PACKAGE_NAME)
SET(CPACK_PACKAGE_VERSION_MAJOR ${OSRM_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${OSRM_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${OSRM_VERSION_PATCH})
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "FALSE")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Source Routing Machine (OSRM) is a high-performance routing engine. It combines sophisticated routing algorithms with the open and free data of the OpenStreetMap.")
SET(CPACK_PACKAGE_CONTACT "Project OSRM <info@project-osrm.org>")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.TXT")
SET(CPACK_STRIP_FILES "TRUE")
file(GLOB_RECURSE ProfileGlob ${CMAKE_SOURCE_DIR}/profiles/*)
install(FILES ${ProfileGlob} DESTINATION "share/doc/${CPACK_PACKAGE_NAME}/profiles")
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
if(DPKG_PROGRAM)
SET(CPACK_GENERATOR "DEB")
execute_process(
COMMAND ${DPKG_PROGRAM} --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
else(DPKG_PROGRAM)
find_program(RPM_PROGRAM rpm DOC "rpm RPM-based systems")
find_program(RPMBUILD_PROGRAM rpm DOC "rpm RPM-based systems")
if(RPMBUILD_PROGRAM)
SET(CPACK_GENERATOR "RPM")
execute_process(
COMMAND ${RPM_PROGRAM} --eval %{_arch}
OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
# Exclude /usr/lib64/pkgconfig directory given that it is already owned by the pkg-config rpm package.
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif(RPMBUILD_PROGRAM)
endif(DPKG_PROGRAM)

View File

@ -1,41 +0,0 @@
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
MESSAGE(FATAL_ERROR "Cannot configure CPack to generate Debian packages on non-linux systems.")
ENDIF()
INCLUDE(FindDebArch)
SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENCE.TXT")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CPACK_RESOURCE_FILE_README}")
SET(CPACK_PACKAGE_UPSTREAM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
SET(CPACK_PACKAGE_DEBIAN_REVISION "1")
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_UPSTREAM_VERSION}-${CPACK_PACKAGE_DEBIAN_REVISION}")
string(TOLOWER "${CMAKE_PROJECT_NAME}" LOWER_PROJECT_NAME)
SET(CPACK_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_UPSTREAM_VERSION}_orig")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Source Routing Machine (OSRM).")
SET(CPACK_PACKAGE_DESCRIPTION "Open Source Routing Machine (OSRM) is a routing engine.")
# To create a proper Debian/Ubuntu package, the following CMake
# options should be used:
SET(CPACK_STRIP_FILES "TRUE")
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "FALSE")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_NAME "${CPACK_PACKAGE_NAME}${VERSION_SUFFIX}")
SET(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Dennis Luxen <info@project-osrm.org>")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Open Source Routing Machine (OSRM) is a high-performance routing engine.
It combines sophisticated routing algorithms with the open and free data of the OpenStreetMap."
)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6-dev, libbz2-1.0, libstxxl1, libxml2, libzip2, liblua5.1-0, libtbb2, libboost-all-dev")
file(GLOB_RECURSE ProfileGlob ${CMAKE_SOURCE_DIR}/profiles/*)
install(FILES ${ProfileGlob} DESTINATION "share/doc/${LOWER_PROJECT_NAME}/profiles")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/copyright;")
MESSAGE(STATUS "Debian Package: ${CPACK_DEBIAN_PACKAGE_NAME} (${CPACK_DEBIAN_PACKAGE_VERSION}) [${CPACK_PACKAGE_FILE_NAME}.deb]")

View File

@ -1,29 +0,0 @@
# - Check whether the CXX compiler supports a given flag.
# CHECK_CXX_COMPILER_FLAG(<flag> <var>)
# <flag> - the compiler flag
# <var> - variable to store the result
# This internally calls the check_cxx_source_compiles macro. See help
# for CheckCXXSourceCompiles for a listing of variables that can
# modify the build.
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
)
SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
ENDMACRO (CHECK_CXX_COMPILER_FLAG)

205
cmake/FindLua.cmake Normal file
View File

@ -0,0 +1,205 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#.rst:
# FindLua
# -------
#
#
#
# Locate Lua library This module defines
#
# ::
#
# LUA_FOUND - if false, do not try to link to Lua
# LUA_LIBRARIES - both lua and lualib
# LUA_INCLUDE_DIR - where to find lua.h
# LUA_VERSION_STRING - the version of Lua found
# LUA_VERSION_MAJOR - the major version of Lua
# LUA_VERSION_MINOR - the minor version of Lua
# LUA_VERSION_PATCH - the patch version of Lua
#
#
#
# Note that the expected include convention is
#
# ::
#
# #include "lua.h"
#
# and not
#
# ::
#
# #include <lua/lua.h>
#
# This is because, the lua location is not standardized and may exist in
# locations other than lua/
if(NOT PKG_CONFIG_FOUND)
include(CMakeFindDependencyMacro)
find_dependency(PkgConfig)
endif()
unset(_lua_include_subdirs)
unset(_lua_library_names)
unset(_lua_append_versions)
# this is a function only to have all the variables inside go away automatically
function(_lua_set_version_vars)
set(LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0)
if (Lua_FIND_VERSION_EXACT)
if (Lua_FIND_VERSION_COUNT GREATER 1)
set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR})
endif ()
elseif (Lua_FIND_VERSION)
# once there is a different major version supported this should become a loop
if (NOT Lua_FIND_VERSION_MAJOR GREATER 5)
if (Lua_FIND_VERSION_COUNT EQUAL 1)
set(_lua_append_versions ${LUA_VERSIONS5})
else ()
foreach (subver IN LISTS LUA_VERSIONS5)
if (NOT subver VERSION_LESS ${Lua_FIND_VERSION})
list(APPEND _lua_append_versions ${subver})
endif ()
endforeach ()
endif ()
endif ()
else ()
# once there is a different major version supported this should become a loop
set(_lua_append_versions ${LUA_VERSIONS5})
endif ()
list(APPEND _lua_include_subdirs "include/lua" "include")
foreach (ver IN LISTS _lua_append_versions)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}")
list(APPEND _lua_include_subdirs
include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
list(APPEND _lua_library_names
lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
lua.${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
pkg_check_modules(LUA QUIET "lua${ver}")
list(APPEND _lua_include_subdirs ${LUA_INCLUDE_DIRS})
list(APPEND _lua_library_names ${LUA_LIBRARIES})
list(APPEND _lua_library_dirs ${LUA_LIBRARY_DIRS})
endforeach ()
set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
set(_lua_library_dirs "${_lua_library_dirs}" PARENT_SCOPE)
endfunction(_lua_set_version_vars)
function(_lua_check_header_version _hdr_file)
# At least 5.[012] have different ways to express the version
# so all of them need to be tested. Lua 5.2 defines LUA_VERSION
# and LUA_RELEASE as joined by the C preprocessor, so avoid those.
file(STRINGS "${_hdr_file}" lua_version_strings
REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};")
if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};")
set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
else ()
string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
endif ()
string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}")
endif ()
foreach (ver IN LISTS _lua_append_versions)
if (ver STREQUAL "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}")
set(LUA_VERSION_MAJOR ${LUA_VERSION_MAJOR} PARENT_SCOPE)
set(LUA_VERSION_MINOR ${LUA_VERSION_MINOR} PARENT_SCOPE)
set(LUA_VERSION_PATCH ${LUA_VERSION_PATCH} PARENT_SCOPE)
set(LUA_VERSION_STRING ${LUA_VERSION_STRING} PARENT_SCOPE)
return()
endif ()
endforeach ()
endfunction(_lua_check_header_version)
_lua_set_version_vars()
if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
_lua_check_header_version("${LUA_INCLUDE_DIR}/lua.h")
endif ()
if (NOT LUA_VERSION_STRING)
foreach (subdir IN LISTS _lua_include_subdirs)
unset(LUA_INCLUDE_PREFIX CACHE)
find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h
HINTS
ENV LUA_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
if (LUA_INCLUDE_PREFIX)
_lua_check_header_version("${LUA_INCLUDE_PREFIX}/${subdir}/lua.h")
if (LUA_VERSION_STRING)
set(LUA_INCLUDE_DIR "${LUA_INCLUDE_PREFIX}/${subdir}")
break()
endif ()
endif ()
endforeach ()
endif ()
unset(_lua_include_subdirs)
unset(_lua_append_versions)
find_library(LUA_LIBRARY
NAMES ${_lua_library_names} lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
${_lua_library_dirs}
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
unset(_lua_library_names)
if (LUA_LIBRARY)
# include the math library for Unix
if (UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m)
set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
# include dl library for statically-linked Lua library
get_filename_component(LUA_LIB_EXT ${LUA_LIBRARY} EXT)
if(LUA_LIB_EXT STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX)
list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS})
endif()
# For Windows and Mac, don't need to explicitly include the math library
else ()
set(LUA_LIBRARIES "${LUA_LIBRARY}")
endif ()
endif ()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)

View File

@ -1,82 +0,0 @@
# Locate Lua library
# This module defines
# LUA52_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
#
# Note that the expected include convention is
# #include "lua.h"
# and not
# #include <lua/lua.h>
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
# Copyright 2016 for Project-OSRM, Lua5.1 => Lua5.2
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
find_path(LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/lua52 include/lua5.2 include/lua-5.2 include/lua include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(LUA_LIBRARY
NAMES lua52 lua5.2 lua-5.2 lua
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
if(LUA_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
unset(lua_version_str)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua52
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)

View File

@ -1,93 +0,0 @@
# Locate Lua library
# This module defines
# LUAJIT_FOUND, if false, do not try to link to Lua
# LUAJIT_LIBRARIES
# LUAJIT_INCLUDE_DIR, where to find lua.h
#
# Note that the expected include convention is
# #include "lua.h"
# and not
# #include <lua/lua.h>
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
#
# ################
# 2010 - modified for cronkite to find luajit instead of lua, as it was before.
#
if ( NOT LuaJIT_FIND_VERSION )
MESSAGE(FATAL_ERROR "You need to specify a version of libluajit to use")
ENDIF()
IF( NOT LUAJIT_FIND_QUIETLY )
MESSAGE(STATUS "Looking for LuaJIT ${LuaJIT_FIND_VERSION}")
ENDIF()
FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
HINTS
$ENV{LUAJIT_DIR}
PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
FIND_LIBRARY(LUAJIT_LIBRARY
NAMES luajit-${LuaJIT_FIND_VERSION_MAJOR}${LuaJIT_FIND_VERSION_MINOR} luajit-${LuaJIT_FIND_VERSION}
HINTS
$ENV{LUAJIT_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
IF(LUAJIT_LIBRARY)
# include the math library for Unix
IF(UNIX AND NOT APPLE)
FIND_LIBRARY(LUAJIT_MATH_LIBRARY m)
SET( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY};${LUAJIT_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
ELSE(UNIX AND NOT APPLE)
SET( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY}" CACHE STRING "Lua Libraries")
ENDIF(UNIX AND NOT APPLE)
ENDIF(LUAJIT_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUAJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
IF( NOT LUAJIT_FIND_QUIETLY )
IF( LUAJIT_FOUND AND LUAJIT_LIBRARIES)
MESSAGE(STATUS "Found LuaJIT: ${LUAJIT_LIBRARY}" )
MARK_AS_ADVANCED(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARIES LUAJIT_LIBRARY LUAJIT_MATH_LIBRARY)
ELSE()
SET ( LUAJIT_FOUND FALSE )
ENDIF()
ENDIF()

View File

@ -1,75 +0,0 @@
# Locate Luabind library
# This module defines
# LUABIND_FOUND, if false, do not try to link to Luabind
# LUABIND_LIBRARIES
# LUABIND_INCLUDE_DIR, where to find luabind.hpp
#
# Note that the expected include convention is
# #include <luabind/luabind.hpp>
# and not
# #include <luabind.hpp>
IF( NOT LUABIND_FIND_QUIETLY )
MESSAGE(STATUS "Looking for Luabind...")
ENDIF()
FIND_PATH(LUABIND_INCLUDE_DIR luabind.hpp
HINTS
$ENV{LUABIND_DIR}
PATH_SUFFIXES luabind include/luabind include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt/local # DarwinPorts
/opt
)
FIND_LIBRARY(LUABIND_LIBRARY
NAMES luabind luabind09
HINTS
$ENV{LUABIND_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt/local
/opt
)
FIND_LIBRARY(LUABIND_LIBRARY_DBG
NAMES luabindd
HINTS
$ENV{LUABIND_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt/local
/opt
)
IF(LUABIND_LIBRARY)
SET( LUABIND_LIBRARIES "${LUABIND_LIBRARY}" CACHE STRING "Luabind Libraries")
ENDIF(LUABIND_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUABIND_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Luabind DEFAULT_MSG LUABIND_LIBRARIES LUABIND_INCLUDE_DIR)
IF( NOT LUABIND_FIND_QUIETLY )
IF( LUABIND_FOUND )
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARY}" )
ENDIF()
IF( LUABIND_LIBRARY_DBG )
MESSAGE(STATUS "Luabind debug library availible: ${LUABIND_LIBRARY_DBG}")
ENDIF()
ENDIF()
MARK_AS_ADVANCED(LUABIND_INCLUDE_DIR LUABIND_LIBRARIES LUABIND_LIBRARY LUABIND_LIBRARY_DBG)

View File

@ -1,51 +0,0 @@
# Locate STXXL library
# This module defines
# STXXL_FOUND, if false, do not try to link to libstxxl
# STXXL_LIBRARY
# STXXL_INCLUDE_DIR, where to find stxxl.h
#
IF( NOT STXXL_FIND_QUIETLY )
MESSAGE(STATUS "Looking for STXXL...")
ENDIF()
FIND_PATH(STXXL_INCLUDE_DIR stxxl.h
HINTS
$ENV{STXXL_DIR}
PATH_SUFFIXES stxxl include/stxxl/stxxl include/stxxl include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt/local # DarwinPorts
/opt
)
FIND_LIBRARY(STXXL_LIBRARY
NAMES stxxl stxxl_debug
HINTS
$ENV{STXXL_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/opt/local
/opt
)
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set STXXL_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(STXXL DEFAULT_MSG STXXL_LIBRARY STXXL_INCLUDE_DIR)
IF( NOT STXXL_FIND_QUIETLY )
IF( STXXL_FOUND )
MESSAGE(STATUS "Found STXXL: ${STXXL_LIBRARY}" )
ENDIF()
ENDIF()
MARK_AS_ADVANCED(STXXL_INCLUDE_DIR STXXL_LIBRARY)

View File

@ -1,284 +1,456 @@
# Locate Intel Threading Building Blocks include paths and libraries
# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
# Florian Uhlig <F.Uhlig _at_ gsi.de>,
# Jiri Marsik <jiri.marsik89 _at_ gmail.com>
# The MIT License
#
# Copyright (c) 2011 Hannes Hofmann
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
# e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
# TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
# in the TBB installation directory (TBB_INSTALL_DIR).
#
# GvdB: Mac OS X distribution places libraries directly in lib directory.
#
# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
# which architecture to use
# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
# which compiler to use (detected automatically on Windows)
# This module respects
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
# This module defines
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
# TBB_INSTALL_DIR, the base TBB install directory
# TBB_LIBRARIES, the libraries to link against to use TBB.
# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
# TBB_FOUND, If false, don't try to use TBB.
# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
if (WIN32)
# has em64t/vc8 em64t/vc9
# has ia32/vc7.1 ia32/vc8 ia32/vc9
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
set(_TBB_LIB_NAME "tbb")
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
if (MSVC71)
set (_TBB_COMPILER "vc7.1")
endif(MSVC71)
if (MSVC80)
set(_TBB_COMPILER "vc8")
endif(MSVC80)
if (MSVC90)
set(_TBB_COMPILER "vc9")
endif(MSVC90)
if(MSVC10)
set(_TBB_COMPILER "vc10")
endif(MSVC10)
# Todo: add other Windows compilers such as ICL.
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
endif (WIN32)
if (UNIX)
if (APPLE)
# MAC
set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
set(_TBB_LIB_NAME "tbb")
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
# default flavor on apple: ia32/cc4.0.1_os10.4.9
# Jiri: There is no reason to presume there is only one flavor and
# that user's setting of variables should be ignored.
if(NOT TBB_COMPILER)
set(_TBB_COMPILER "cc4.0.1_os10.4.9")
elseif (NOT TBB_COMPILER)
set(_TBB_COMPILER ${TBB_COMPILER})
endif(NOT TBB_COMPILER)
if(NOT TBB_ARCHITECTURE)
set(_TBB_ARCHITECTURE "ia32")
elseif(NOT TBB_ARCHITECTURE)
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
endif(NOT TBB_ARCHITECTURE)
else (APPLE)
# LINUX
set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
set(_TBB_LIB_NAME "tbb")
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
# has ia32/*
# has itanium/*
set(_TBB_COMPILER ${TBB_COMPILER})
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
endif (APPLE)
endif (UNIX)
if (CMAKE_SYSTEM MATCHES "SunOS.*")
# SUN
# not yet supported
# has em64t/cc3.4.3_kernel5.10
# has ia32/*
endif (CMAKE_SYSTEM MATCHES "SunOS.*")
#-- Clear the public variables
set (TBB_FOUND "NO")
#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
# first: use CMake variable TBB_INSTALL_DIR
if (TBB_INSTALL_DIR)
set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
endif (TBB_INSTALL_DIR)
# second: use environment variable
if (NOT _TBB_INSTALL_DIR)
if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
# Intel recommends setting TBB21_INSTALL_DIR
if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
endif (NOT _TBB_INSTALL_DIR)
# third: try to find path automatically
if (NOT _TBB_INSTALL_DIR)
if (_TBB_DEFAULT_INSTALL_DIR)
set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
endif (_TBB_DEFAULT_INSTALL_DIR)
endif (NOT _TBB_INSTALL_DIR)
# sanity check
if (NOT _TBB_INSTALL_DIR)
message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
else (NOT _TBB_INSTALL_DIR)
# finally: set the cached CMake variable TBB_INSTALL_DIR
if (NOT TBB_INSTALL_DIR)
set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
mark_as_advanced(TBB_INSTALL_DIR)
endif (NOT TBB_INSTALL_DIR)
#-- A macro to rewrite the paths of the library. This is necessary, because
# find_library() always found the em64t/vc9 version of the TBB libs
macro(TBB_CORRECT_LIB_DIR var_name)
# if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
# endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
endmacro(TBB_CORRECT_LIB_DIR var_content)
#-- Look for include directory and set ${TBB_INCLUDE_DIR}
set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
# Jiri: tbbvars now sets the CPATH environment variable to the directory
# containing the headers.
find_path(TBB_INCLUDE_DIR
tbb/task_scheduler_init.h
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
)
mark_as_advanced(TBB_INCLUDE_DIR)
#-- Look for libraries
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
set (_TBB_LIBRARY_DIR
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
)
endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
# Jiri: This block isn't mutually exclusive with the previous one
# (hence no else), instead I test if the user really specified
# the variables in question.
if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
# HH: deprecated
message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
# Jiri: It doesn't hurt to look in more places, so I store the hints from
# ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
# variables and search them both.
set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
# GvdB: Mac OS X distribution places libraries directly in lib directory.
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
# Jiri: No reason not to check the default paths. From recent versions,
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
# variables, which now point to the directories of the lib files.
# It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
# argument instead of the implicit PATHS as it isn't hard-coded
# but computed by system introspection. Searching the LIBRARY_PATH
# and LD_LIBRARY_PATH environment variables is now even more important
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
# the use of TBB built from sources.
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
#Extract path from TBB_LIBRARY name
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
#-- Look for debug libraries
# Jiri: Changed the same way as for the release libraries.
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
# Extract path from TBB_LIBRARY_DEBUG name
get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
if (TBB_INCLUDE_DIR)
if (TBB_LIBRARY)
set (TBB_FOUND "YES")
set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
message(STATUS "Found Intel TBB")
endif (TBB_LIBRARY)
endif (TBB_INCLUDE_DIR)
if (NOT TBB_FOUND)
message("ERROR: Intel TBB NOT found!")
message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
# do only throw fatal, if this pkg is REQUIRED
if (TBB_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find TBB library.")
endif (TBB_FIND_REQUIRED)
endif (NOT TBB_FOUND)
endif (NOT _TBB_INSTALL_DIR)
if (TBB_FOUND)
set(TBB_INTERFACE_VERSION 0)
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
message(STATUS "TBB interface version: ${TBB_INTERFACE_VERSION}")
endif (TBB_FOUND)
# - Find ThreadingBuildingBlocks include dirs and libraries
# Use this module by invoking find_package with the form:
# find_package(TBB
# [REQUIRED] # Fail with error if TBB is not found
# ) #
# Once done, this will define
#
# TBB_FOUND - system has TBB
# TBB_INCLUDE_DIRS - the TBB include directories
# TBB_LIBRARIES - TBB libraries to be lined, doesn't include malloc or
# malloc proxy
# TBB::tbb - imported target for the TBB library
#
# TBB_VERSION_MAJOR - Major Product Version Number
# TBB_VERSION_MINOR - Minor Product Version Number
# TBB_INTERFACE_VERSION - Engineering Focused Version Number
# TBB_COMPATIBLE_INTERFACE_VERSION - The oldest major interface version
# still supported. This uses the engineering
# focused interface version numbers.
#
# TBB_MALLOC_FOUND - system has TBB malloc library
# TBB_MALLOC_INCLUDE_DIRS - the TBB malloc include directories
# TBB_MALLOC_LIBRARIES - The TBB malloc libraries to be lined
# TBB::malloc - imported target for the TBB malloc library
#
# TBB_MALLOC_PROXY_FOUND - system has TBB malloc proxy library
# TBB_MALLOC_PROXY_INCLUDE_DIRS = the TBB malloc proxy include directories
# TBB_MALLOC_PROXY_LIBRARIES - The TBB malloc proxy libraries to be lined
# TBB::malloc_proxy - imported target for the TBB malloc proxy library
#
#
# This module reads hints about search locations from variables:
# ENV TBB_ARCH_PLATFORM - for eg. set it to "mic" for Xeon Phi builds
# ENV TBB_ROOT or just TBB_ROOT - root directory of tbb installation
# ENV TBB_BUILD_PREFIX - specifies the build prefix for user built tbb
# libraries. Should be specified with ENV TBB_ROOT
# and optionally...
# ENV TBB_BUILD_DIR - if build directory is different than ${TBB_ROOT}/build
#
#
# Modified by Robert Maynard from the original OGRE source
#
#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE
# (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------
#
#=============================================================================
# Copyright 2010-2012 Kitware, Inc.
# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#=============================================================================
# FindTBB helper functions and macros
#
# Use TBBConfig.cmake if possible.
set(_tbb_find_quiet)
if (TBB_FIND_QUIETLY)
set(_tbb_find_quiet QUIET)
endif ()
set(_tbb_find_components)
set(_tbb_find_optional_components)
foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS)
if (TBB_FIND_REQUIRED_${_tbb_find_component})
list(APPEND _tbb_find_components "${_tbb_find_component}")
else ()
list(APPEND _tbb_find_optional_components "${_tbb_find_component}")
endif ()
endforeach ()
unset(_tbb_find_component)
find_package(TBB CONFIG ${_tbb_find_quiet}
COMPONENTS ${_tbb_find_components}
OPTIONAL_COMPONENTS ${_tbb_find_optional_components})
unset(_tbb_find_quiet)
unset(_tbb_find_components)
unset(_tbb_find_optional_components)
if (TBB_FOUND)
return ()
endif ()
#====================================================
# Fix the library path in case it is a linker script
#====================================================
function(tbb_extract_real_library library real_library)
if(NOT UNIX OR NOT EXISTS ${library})
set(${real_library} "${library}" PARENT_SCOPE)
return()
endif()
#Read in the first 4 bytes and see if they are the ELF magic number
set(_elf_magic "7f454c46")
file(READ ${library} _hex_data OFFSET 0 LIMIT 4 HEX)
if(_hex_data STREQUAL _elf_magic)
#we have opened a elf binary so this is what
#we should link to
set(${real_library} "${library}" PARENT_SCOPE)
return()
endif()
file(READ ${library} _data OFFSET 0 LIMIT 1024)
if("${_data}" MATCHES "INPUT \\(([^(]+)\\)")
#extract out the .so name from REGEX MATCH command
set(_proper_so_name "${CMAKE_MATCH_1}")
#construct path to the real .so which is presumed to be in the same directory
#as the input file
get_filename_component(_so_dir "${library}" DIRECTORY)
set(${real_library} "${_so_dir}/${_proper_so_name}" PARENT_SCOPE)
else()
#unable to determine what this library is so just hope everything works
#and pass it unmodified.
set(${real_library} "${library}" PARENT_SCOPE)
endif()
endfunction()
#===============================================
# Do the final processing for the package find.
#===============================================
macro(findpkg_finish PREFIX TARGET_NAME)
if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY)
set(${PREFIX}_FOUND TRUE)
set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR})
set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY})
else ()
if (${PREFIX}_FIND_REQUIRED AND NOT ${PREFIX}_FIND_QUIETLY)
message(FATAL_ERROR "Required library ${PREFIX} not found.")
endif ()
endif ()
if (NOT TARGET "TBB::${TARGET_NAME}")
if (${PREFIX}_LIBRARY_RELEASE)
tbb_extract_real_library(${${PREFIX}_LIBRARY_RELEASE} real_release)
endif ()
if (${PREFIX}_LIBRARY_DEBUG)
tbb_extract_real_library(${${PREFIX}_LIBRARY_DEBUG} real_debug)
endif ()
add_library(TBB::${TARGET_NAME} UNKNOWN IMPORTED)
set_target_properties(TBB::${TARGET_NAME} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}_INCLUDE_DIR}")
if (${PREFIX}_LIBRARY_DEBUG AND ${PREFIX}_LIBRARY_RELEASE)
set_target_properties(TBB::${TARGET_NAME} PROPERTIES
IMPORTED_LOCATION "${real_release}"
IMPORTED_LOCATION_DEBUG "${real_debug}"
IMPORTED_LOCATION_RELEASE "${real_release}")
elseif (${PREFIX}_LIBRARY_RELEASE)
set_target_properties(TBB::${TARGET_NAME} PROPERTIES
IMPORTED_LOCATION "${real_release}")
elseif (${PREFIX}_LIBRARY_DEBUG)
set_target_properties(TBB::${TARGET_NAME} PROPERTIES
IMPORTED_LOCATION "${real_debug}")
endif ()
endif ()
#mark the following variables as internal variables
mark_as_advanced(${PREFIX}_INCLUDE_DIR
${PREFIX}_LIBRARY
${PREFIX}_LIBRARY_DEBUG
${PREFIX}_LIBRARY_RELEASE)
endmacro()
#===============================================
# Generate debug names from given release names
#===============================================
macro(get_debug_names PREFIX)
foreach(i ${${PREFIX}})
set(${PREFIX}_DEBUG ${${PREFIX}_DEBUG} ${i}d ${i}D ${i}_d ${i}_D ${i}_debug ${i})
endforeach()
endmacro()
#===============================================
# See if we have env vars to help us find tbb
#===============================================
macro(getenv_path VAR)
set(ENV_${VAR} $ENV{${VAR}})
# replace won't work if var is blank
if (ENV_${VAR})
string( REGEX REPLACE "\\\\" "/" ENV_${VAR} ${ENV_${VAR}} )
endif ()
endmacro()
#===============================================
# Couple a set of release AND debug libraries
#===============================================
macro(make_library_set PREFIX)
if (${PREFIX}_RELEASE AND ${PREFIX}_DEBUG)
set(${PREFIX} optimized ${${PREFIX}_RELEASE} debug ${${PREFIX}_DEBUG})
elseif (${PREFIX}_RELEASE)
set(${PREFIX} ${${PREFIX}_RELEASE})
elseif (${PREFIX}_DEBUG)
set(${PREFIX} ${${PREFIX}_DEBUG})
endif ()
endmacro()
#=============================================================================
# Now to actually find TBB
#
# Get path, convert backslashes as ${ENV_${var}}
getenv_path(TBB_ROOT)
# initialize search paths
set(TBB_PREFIX_PATH ${TBB_ROOT} ${ENV_TBB_ROOT})
set(TBB_INC_SEARCH_PATH "")
set(TBB_LIB_SEARCH_PATH "")
# If user built from sources
set(TBB_BUILD_PREFIX $ENV{TBB_BUILD_PREFIX})
if (TBB_BUILD_PREFIX AND ENV_TBB_ROOT)
getenv_path(TBB_BUILD_DIR)
if (NOT ENV_TBB_BUILD_DIR)
set(ENV_TBB_BUILD_DIR ${ENV_TBB_ROOT}/build)
endif ()
# include directory under ${ENV_TBB_ROOT}/include
list(APPEND TBB_LIB_SEARCH_PATH
${ENV_TBB_BUILD_DIR}/${TBB_BUILD_PREFIX}_release
${ENV_TBB_BUILD_DIR}/${TBB_BUILD_PREFIX}_debug)
endif ()
# For Windows, let's assume that the user might be using the precompiled
# TBB packages from the main website. These use a rather awkward directory
# structure (at least for automatically finding the right files) depending
# on platform and compiler, but we'll do our best to accommodate it.
# Not adding the same effort for the precompiled linux builds, though. Those
# have different versions for CC compiler versions and linux kernels which
# will never adequately match the user's setup, so there is no feasible way
# to detect the "best" version to use. The user will have to manually
# select the right files. (Chances are the distributions are shipping their
# custom version of tbb, anyway, so the problem is probably nonexistent.)
if (WIN32 AND MSVC)
set(COMPILER_PREFIX "vc7.1")
if (MSVC_VERSION EQUAL 1400)
set(COMPILER_PREFIX "vc8")
elseif(MSVC_VERSION EQUAL 1500)
set(COMPILER_PREFIX "vc9")
elseif(MSVC_VERSION EQUAL 1600)
set(COMPILER_PREFIX "vc10")
elseif(MSVC_VERSION EQUAL 1700)
set(COMPILER_PREFIX "vc11")
elseif(MSVC_VERSION EQUAL 1800)
set(COMPILER_PREFIX "vc12")
elseif(MSVC_VERSION GREATER_EQUAL 1900)
set(COMPILER_PREFIX "vc14")
endif ()
# for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path
foreach (dir IN LISTS TBB_PREFIX_PATH)
if (CMAKE_CL_64)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX}/lib)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX})
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX}/lib)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX})
else ()
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX}/lib)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX})
endif ()
endforeach ()
endif ()
# For OS X binary distribution, choose libc++ based libraries for Mavericks (10.9)
# and above and AppleClang
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND
NOT CMAKE_SYSTEM_VERSION VERSION_LESS 13.0)
set (USE_LIBCXX OFF)
cmake_policy(GET CMP0025 POLICY_VAR)
if (POLICY_VAR STREQUAL "NEW")
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set (USE_LIBCXX ON)
endif ()
else ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (USE_LIBCXX ON)
endif ()
endif ()
if (USE_LIBCXX)
foreach (dir IN LISTS TBB_PREFIX_PATH)
list (APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/libc++ ${dir}/libc++/lib)
endforeach ()
endif ()
endif ()
# check compiler ABI
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(COMPILER_PREFIX)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
list(APPEND COMPILER_PREFIX "gcc4.8")
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
list(APPEND COMPILER_PREFIX "gcc4.7")
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
list(APPEND COMPILER_PREFIX "gcc4.4")
endif()
list(APPEND COMPILER_PREFIX "gcc4.1")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(COMPILER_PREFIX)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) # Complete guess
list(APPEND COMPILER_PREFIX "gcc4.8")
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)
list(APPEND COMPILER_PREFIX "gcc4.7")
endif()
list(APPEND COMPILER_PREFIX "gcc4.4")
else() # Assume compatibility with 4.4 for other compilers
list(APPEND COMPILER_PREFIX "gcc4.4")
endif ()
# if platform architecture is explicitly specified
set(TBB_ARCH_PLATFORM $ENV{TBB_ARCH_PLATFORM})
if (TBB_ARCH_PLATFORM)
foreach (dir IN LISTS TBB_PREFIX_PATH)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/${TBB_ARCH_PLATFORM}/lib)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/${TBB_ARCH_PLATFORM})
endforeach ()
endif ()
foreach (dir IN LISTS TBB_PREFIX_PATH)
foreach (prefix IN LISTS COMPILER_PREFIX)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${prefix})
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/lib)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${prefix}/lib)
else ()
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${prefix})
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/lib)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${prefix}/lib)
endif ()
endforeach()
endforeach ()
# add general search paths
foreach (dir IN LISTS TBB_PREFIX_PATH)
list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib ${dir}/Lib ${dir}/lib/tbb
${dir}/Libs)
list(APPEND TBB_INC_SEARCH_PATH ${dir}/include ${dir}/Include
${dir}/include/tbb)
endforeach ()
set(TBB_LIBRARY_NAMES tbb)
get_debug_names(TBB_LIBRARY_NAMES)
find_path(TBB_INCLUDE_DIR
NAMES tbb/tbb.h
PATHS ${TBB_INC_SEARCH_PATH})
find_library(TBB_LIBRARY_RELEASE
NAMES ${TBB_LIBRARY_NAMES}
PATHS ${TBB_LIB_SEARCH_PATH})
find_library(TBB_LIBRARY_DEBUG
NAMES ${TBB_LIBRARY_NAMES_DEBUG}
PATHS ${TBB_LIB_SEARCH_PATH})
make_library_set(TBB_LIBRARY)
findpkg_finish(TBB tbb)
#if we haven't found TBB no point on going any further
if (NOT TBB_FOUND)
return()
endif ()
#=============================================================================
# Look for TBB's malloc package
set(TBB_MALLOC_LIBRARY_NAMES tbbmalloc)
get_debug_names(TBB_MALLOC_LIBRARY_NAMES)
find_path(TBB_MALLOC_INCLUDE_DIR
NAMES tbb/tbb.h
PATHS ${TBB_INC_SEARCH_PATH})
find_library(TBB_MALLOC_LIBRARY_RELEASE
NAMES ${TBB_MALLOC_LIBRARY_NAMES}
PATHS ${TBB_LIB_SEARCH_PATH})
find_library(TBB_MALLOC_LIBRARY_DEBUG
NAMES ${TBB_MALLOC_LIBRARY_NAMES_DEBUG}
PATHS ${TBB_LIB_SEARCH_PATH})
make_library_set(TBB_MALLOC_LIBRARY)
findpkg_finish(TBB_MALLOC tbbmalloc)
#=============================================================================
# Look for TBB's malloc proxy package
set(TBB_MALLOC_PROXY_LIBRARY_NAMES tbbmalloc_proxy)
get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES)
find_path(TBB_MALLOC_PROXY_INCLUDE_DIR
NAMES tbb/tbbmalloc_proxy.h
PATHS ${TBB_INC_SEARCH_PATH})
find_library(TBB_MALLOC_PROXY_LIBRARY_RELEASE
NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES}
PATHS ${TBB_LIB_SEARCH_PATH})
find_library(TBB_MALLOC_PROXY_LIBRARY_DEBUG
NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DEBUG}
PATHS ${TBB_LIB_SEARCH_PATH})
make_library_set(TBB_MALLOC_PROXY_LIBRARY)
findpkg_finish(TBB_MALLOC_PROXY tbbmalloc_proxy)
#=============================================================================
#parse all the version numbers from tbb
if(NOT TBB_VERSION)
if (EXISTS "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h")
file(STRINGS
"${TBB_INCLUDE_DIR}/oneapi/tbb/version.h"
TBB_VERSION_CONTENTS
REGEX "VERSION")
else()
#only read the start of the file
file(STRINGS
"${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h"
TBB_VERSION_CONTENTS
REGEX "VERSION")
endif()
string(REGEX REPLACE
".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1"
TBB_VERSION_MAJOR "${TBB_VERSION_CONTENTS}")
string(REGEX REPLACE
".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1"
TBB_VERSION_MINOR "${TBB_VERSION_CONTENTS}")
string(REGEX REPLACE
".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1"
TBB_INTERFACE_VERSION "${TBB_VERSION_CONTENTS}")
string(REGEX REPLACE
".*#define TBB_COMPATIBLE_INTERFACE_VERSION ([0-9]+).*" "\\1"
TBB_COMPATIBLE_INTERFACE_VERSION "${TBB_VERSION_CONTENTS}")
endif()

View File

@ -1,24 +0,0 @@
set(OLDFILE ${OUTPUT_DIR}/include/util/fingerprint_impl.hpp)
set(NEWFILE ${OLDFILE}.tmp)
set(INFILE ${SOURCE_DIR}/include/util/fingerprint_impl.hpp.in)
file(MD5 ${SOURCE_DIR}/src/tools/contract.cpp MD5PREPARE)
file(MD5 ${SOURCE_DIR}/include/util/static_rtree.hpp MD5RTREE)
file(MD5 ${SOURCE_DIR}/include/util/graph_loader.hpp MD5GRAPH)
file(MD5 ${SOURCE_DIR}/include/engine/datafacade/internal_datafacade.hpp MD5OBJECTS)
CONFIGURE_FILE(${INFILE} ${NEWFILE})
file(MD5 ${NEWFILE} MD5NEW)
if (EXISTS ${OLDFILE})
file(MD5 ${OLDFILE} MD5OLD)
if(NOT ${MD5NEW} STREQUAL ${MD5OLD})
file(REMOVE_RECURSE ${OLDFILE})
file(RENAME ${NEWFILE} ${OLDFILE})
else()
file(REMOVE_RECURSE ${NEWFILE})
message(STATUS "Fingerprint unchanged, not regenerating")
endif()
else()
file(RENAME ${NEWFILE} ${OLDFILE})
endif()

290
cmake/JSONParser.cmake Normal file
View File

@ -0,0 +1,290 @@
# https://github.com/sbellus/json-cmake/blob/9913da8800b95322d393894d3525d634568f305e/JSONParser.cmake
# MIT Licensed - https://github.com/sbellus/json-cmake/blob/master/LICENSE
cmake_minimum_required(VERSION 3.18)
if (DEFINED JSonParserGuard)
return()
endif()
set(JSonParserGuard yes)
macro(sbeParseJson prefix jsonString)
cmake_policy(PUSH)
set(json_string "${${jsonString}}")
string(LENGTH "${json_string}" json_jsonLen)
set(json_index 0)
set(json_AllVariables ${prefix})
set(json_ArrayNestingLevel 0)
set(json_MaxArrayNestingLevel 0)
_sbeParse(${prefix})
unset(json_index)
unset(json_AllVariables)
unset(json_jsonLen)
unset(json_string)
unset(json_value)
unset(json_inValue)
unset(json_name)
unset(json_inName)
unset(json_newPrefix)
unset(json_reservedWord)
unset(json_arrayIndex)
unset(json_char)
unset(json_end)
unset(json_ArrayNestingLevel)
foreach(json_nestingLevel RANGE ${json_MaxArrayNestingLevel})
unset(json_${json_nestingLevel}_arrayIndex)
endforeach()
unset(json_nestingLevel)
unset(json_MaxArrayNestingLevel)
cmake_policy(POP)
endmacro()
macro(sbeClearJson prefix)
foreach(json_var ${${prefix}})
unset(${json_var})
endforeach()
unset(${prefix})
unset(json_var)
endmacro()
macro(sbePrintJson prefix)
foreach(json_var ${${prefix}})
message("${json_var} = ${${json_var}}")
endforeach()
endmacro()
macro(_sbeParse prefix)
while(${json_index} LESS ${json_jsonLen})
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
if("\"" STREQUAL "${json_char}")
_sbeParseNameValue(${prefix})
elseif("{" STREQUAL "${json_char}")
_sbeMoveToNextNonEmptyCharacter()
_sbeParseObject(${prefix})
elseif("[" STREQUAL "${json_char}")
_sbeMoveToNextNonEmptyCharacter()
_sbeParseArray(${prefix})
endif()
if(${json_index} LESS ${json_jsonLen})
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
else()
break()
endif()
if ("}" STREQUAL "${json_char}" OR "]" STREQUAL "${json_char}")
break()
endif()
_sbeMoveToNextNonEmptyCharacter()
endwhile()
endmacro()
macro(_sbeParseNameValue prefix)
set(json_name "")
set(json_inName no)
while(${json_index} LESS ${json_jsonLen})
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
# check if name ends
if("\"" STREQUAL "${json_char}" AND json_inName)
set(json_inName no)
_sbeMoveToNextNonEmptyCharacter()
if(NOT ${json_index} LESS ${json_jsonLen})
break()
endif()
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
set(json_newPrefix ${prefix}.${json_name})
set(json_name "")
if(":" STREQUAL "${json_char}")
_sbeMoveToNextNonEmptyCharacter()
if(NOT ${json_index} LESS ${json_jsonLen})
break()
endif()
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
if("\"" STREQUAL "${json_char}")
_sbeParseValue(${json_newPrefix})
break()
elseif("{" STREQUAL "${json_char}")
_sbeMoveToNextNonEmptyCharacter()
_sbeParseObject(${json_newPrefix})
break()
elseif("[" STREQUAL "${json_char}")
_sbeMoveToNextNonEmptyCharacter()
_sbeParseArray(${json_newPrefix})
break()
else()
# reserved word starts
_sbeParseReservedWord(${json_newPrefix})
break()
endif()
else()
# name without value
list(APPEND ${json_AllVariables} ${json_newPrefix})
set(${json_newPrefix} "")
break()
endif()
endif()
if(json_inName)
# remove escapes
if("\\" STREQUAL "${json_char}")
math(EXPR json_index "${json_index} + 1")
if(NOT ${json_index} LESS ${json_jsonLen})
break()
endif()
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
endif()
set(json_name "${json_name}${json_char}")
endif()
# check if name starts
if("\"" STREQUAL "${json_char}" AND NOT json_inName)
set(json_inName yes)
endif()
_sbeMoveToNextNonEmptyCharacter()
endwhile()
endmacro()
macro(_sbeParseReservedWord prefix)
set(json_reservedWord "")
set(json_end no)
while(${json_index} LESS ${json_jsonLen} AND NOT json_end)
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
if("," STREQUAL "${json_char}" OR "}" STREQUAL "${json_char}" OR "]" STREQUAL "${json_char}")
set(json_end yes)
else()
set(json_reservedWord "${json_reservedWord}${json_char}")
math(EXPR json_index "${json_index} + 1")
endif()
endwhile()
list(APPEND ${json_AllVariables} ${prefix})
string(STRIP "${json_reservedWord}" json_reservedWord)
set(${prefix} ${json_reservedWord})
endmacro()
macro(_sbeParseValue prefix)
cmake_policy(SET CMP0054 NEW) # turn off implicit expansions in if statement
set(json_value "")
set(json_inValue no)
while(${json_index} LESS ${json_jsonLen})
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
# check if json_value ends, it is ended by "
if("\"" STREQUAL "${json_char}" AND json_inValue)
set(json_inValue no)
set(${prefix} ${json_value})
list(APPEND ${json_AllVariables} ${prefix})
_sbeMoveToNextNonEmptyCharacter()
break()
endif()
if(json_inValue)
# if " is escaped consume
if("\\" STREQUAL "${json_char}")
math(EXPR json_index "${json_index} + 1")
if(NOT ${json_index} LESS ${json_jsonLen})
break()
endif()
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
if(NOT "\"" STREQUAL "${json_char}")
# if it is not " then copy also escape character
set(json_char "\\${json_char}")
endif()
endif()
_sbeAddEscapedCharacter("${json_char}")
endif()
# check if value starts
if("\"" STREQUAL "${json_char}" AND NOT json_inValue)
set(json_inValue yes)
endif()
math(EXPR json_index "${json_index} + 1")
endwhile()
endmacro()
macro(_sbeAddEscapedCharacter char)
string(CONCAT json_value "${json_value}" "${char}")
endmacro()
macro(_sbeParseObject prefix)
_sbeParse(${prefix})
_sbeMoveToNextNonEmptyCharacter()
endmacro()
macro(_sbeParseArray prefix)
math(EXPR json_ArrayNestingLevel "${json_ArrayNestingLevel} + 1")
set(json_${json_ArrayNestingLevel}_arrayIndex 0)
set(${prefix} "")
list(APPEND ${json_AllVariables} ${prefix})
while(${json_index} LESS ${json_jsonLen})
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
if("\"" STREQUAL "${json_char}")
# simple value
list(APPEND ${prefix} ${json_${json_ArrayNestingLevel}_arrayIndex})
_sbeParseValue(${prefix}_${json_${json_ArrayNestingLevel}_arrayIndex})
elseif("{" STREQUAL "${json_char}")
# object
_sbeMoveToNextNonEmptyCharacter()
list(APPEND ${prefix} ${json_${json_ArrayNestingLevel}_arrayIndex})
_sbeParseObject(${prefix}_${json_${json_ArrayNestingLevel}_arrayIndex})
else()
list(APPEND ${prefix} ${json_${json_ArrayNestingLevel}_arrayIndex})
_sbeParseReservedWord(${prefix}_${json_${json_ArrayNestingLevel}_arrayIndex})
endif()
if(NOT ${json_index} LESS ${json_jsonLen})
break()
endif()
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
if("]" STREQUAL "${json_char}")
_sbeMoveToNextNonEmptyCharacter()
break()
elseif("," STREQUAL "${json_char}")
math(EXPR json_${json_ArrayNestingLevel}_arrayIndex "${json_${json_ArrayNestingLevel}_arrayIndex} + 1")
endif()
_sbeMoveToNextNonEmptyCharacter()
endwhile()
if(${json_MaxArrayNestingLevel} LESS ${json_ArrayNestingLevel})
set(json_MaxArrayNestingLevel ${json_ArrayNestingLevel})
endif()
math(EXPR json_ArrayNestingLevel "${json_ArrayNestingLevel} - 1")
endmacro()
macro(_sbeMoveToNextNonEmptyCharacter)
math(EXPR json_index "${json_index} + 1")
if(${json_index} LESS ${json_jsonLen})
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
while(${json_char} MATCHES "[ \t\n\r]" AND ${json_index} LESS ${json_jsonLen})
math(EXPR json_index "${json_index} + 1")
string(SUBSTRING "${json_string}" ${json_index} 1 json_char)
endwhile()
endif()
endmacro()

View File

@ -1,40 +0,0 @@
INCLUDE (CheckCXXSourceCompiles)
unset(LUABIND_WORKS CACHE)
unset(LUABIND51_WORKS CACHE)
set (LUABIND_CHECK_SRC "extern \"C\" {\n#include \"lua.h\"\n#include \"lauxlib.h\"\n}\n#include <luabind/open.hpp>\nint main() { lua_State *x = luaL_newstate(); luabind::open(x); }")
set (CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
find_package(Lua52)
if(NOT APPLE)
find_package(LuaJIT 5.2)
endif()
if(LUA52_FOUND)
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND_WORKS)
endif()
if(LUABIND_WORKS)
message(STATUS "Luabind/Lua5.2 combination working with ${LUA_LIBRARY}")
else()
message(STATUS "Luabind/Lua5.2 not feasible, falling back to Lua 5.1.")
unset(LUA_FOUND CACHE)
unset(LUA_INCLUDE_DIR CACHE)
unset(LUA_LIBRARY CACHE)
find_package(Lua51 REQUIRED)
if(NOT APPLE)
find_package(LuaJIT 5.1)
endif()
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND51_WORKS)
if(LUABIND51_WORKS)
message(STATUS "Luabind works with Lua 5.1 at ${LUA_LIBRARY}")
else()
message(FATAL_ERROR "Luabind does not work with Lua 5.1 at ${LUA_LIBRARY}, no working Luabind found")
endif()
endif()

1026
cmake/conan.cmake Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/include
libdir=${prefix}/lib
includedir=@PKGCONFIG_INCLUDE_DIR@
libdir=@PKGCONFIG_LIBRARY_DIR@
Name: libOSRM
Description: Project OSRM library
Version: v@OSRM_VERSION_MAJOR@.@OSRM_VERSION_MINOR@.@OSRM_VERSION_PATCH@
Version: @OSRM_VERSION@
Requires:
Libs: -L${libdir} -losrm
Libs.private: @ENGINE_LIBRARY_LISTING@
Cflags: -I${includedir} -I${includedir}/osrm @OSRM_INCLUDE_PATHS_STRING@ @OSRM_DEFINES_STRING@ @CMAKE_CXX_FLAGS@
Libs: -L${libdir} -losrm @PKGCONFIG_OSRM_LDFLAGS@
Libs.private: @PKGCONFIG_OSRM_DEPENDENT_LIBRARIES@
Cflags: @PKGCONFIG_OSRM_INCLUDE_FLAGS@ @PKGCONFIG_OSRM_CXXFLAGS@

88
cmake/warnings.cmake Normal file
View File

@ -0,0 +1,88 @@
include (CheckCXXCompilerFlag)
include (CheckCCompilerFlag)
# Try to add -Wflag if compiler supports it
macro (add_warning flag)
string(REPLACE "-" "_" underscored_flag ${flag})
string(REPLACE "+" "x" underscored_flag ${underscored_flag})
check_cxx_compiler_flag("-W${flag}" SUPPORTS_CXXFLAG_${underscored_flag})
check_c_compiler_flag("-W${flag}" SUPPORTS_CFLAG_${underscored_flag})
if (SUPPORTS_CXXFLAG_${underscored_flag})
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${flag}")
else()
message (STATUS "Flag -W${flag} is unsupported")
endif()
if (SUPPORTS_CFLAG_${underscored_flag})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W${flag}")
else()
message(STATUS "Flag -W${flag} is unsupported")
endif()
endmacro()
# Try to add -Wno flag if compiler supports it
macro (no_warning flag)
add_warning(no-${flag})
endmacro ()
# The same but only for specified target.
macro (target_add_warning target flag)
string (REPLACE "-" "_" underscored_flag ${flag})
string (REPLACE "+" "x" underscored_flag ${underscored_flag})
check_cxx_compiler_flag("-W${flag}" SUPPORTS_CXXFLAG_${underscored_flag})
if (SUPPORTS_CXXFLAG_${underscored_flag})
target_compile_options (${target} PRIVATE "-W${flag}")
else ()
message (STATUS "Flag -W${flag} is unsupported")
endif ()
endmacro ()
macro (target_no_warning target flag)
target_add_warning(${target} no-${flag})
endmacro ()
add_warning(all)
add_warning(extra)
add_warning(pedantic)
add_warning(error) # treat all warnings as errors
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_warning(strict-overflow=1)
endif()
add_warning(suggest-override)
add_warning(suggest-destructor-override)
add_warning(unused)
add_warning(unreachable-code)
add_warning(delete-incomplete)
add_warning(duplicated-cond)
add_warning(disabled-optimization)
add_warning(init-self)
add_warning(bool-compare)
add_warning(logical-not-parentheses)
add_warning(logical-op)
add_warning(misleading-indentation)
# `no-` prefix is part of warning name(i.e. doesn't mean we are disabling it)
add_warning(no-return-local-addr)
add_warning(odr)
add_warning(pointer-arith)
add_warning(redundant-decls)
add_warning(reorder)
add_warning(shift-negative-value)
add_warning(sizeof-array-argument)
add_warning(switch-bool)
add_warning(tautological-compare)
add_warning(trampolines)
# these warnings are not enabled by default
# no_warning(name-of-warning)
no_warning(deprecated-comma-subscript)
no_warning(comma-subscript)
no_warning(ambiguous-reversed-operator)
no_warning(restrict)
no_warning(free-nonheap-object)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
no_warning(stringop-overflow)
endif()

View File

@ -1,7 +1,6 @@
coverage:
ignore:
- unit_tests/.*
- third_party/.*
comment: off

View File

@ -1,11 +1,7 @@
module.exports = {
default: '--require features --tags ~@stress --tags ~@todo',
verify: '--require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress',
jenkins: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress',
bugs: '--require features --tags @bug',
todo: '--require features --tags @todo',
all: '--require features'
}
default: '--strict --tags ~@stress --tags ~@todo --tags ~@mld --require features/support --require features/step_definitions',
ch: '--strict --tags ~@stress --tags ~@todo --tags ~@mld -f progress --require features/support --require features/step_definitions',
todo: '--strict --tags @todo --require features/support --require features/step_definitions',
all: '--strict --require features/support --require features/step_definitions',
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@ch --require features/support --require features/step_definitions -f progress'
};

3160
data/driving_side.geojson Normal file

File diff suppressed because it is too large Load Diff

5573
data/maxheight.geojson Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
FROM ubuntu:14.04
RUN apt-get update -y
RUN apt-get install -y build-essential git-core python-pip python-software-properties software-properties-common
RUN apt-get -y install gcc-4.8 g++-4.8 libboost1.55-all-dev llvm-3.4
RUN apt-get -y install libbz2-dev libstxxl-dev libstxxl1 libxml2-dev
RUN apt-get -y install libzip-dev lua5.1 liblua5.1-0-dev libtbb-dev libgdal-dev
RUN apt-get -y install curl cmake cmake-curses-gui
RUN pip install awscli
# luabind
RUN curl https://gist.githubusercontent.com/DennisOSRM/f2eb7b948e6fe1ae319e/raw/install-luabind.sh | sudo bash
WORKDIR /opt
RUN git clone --depth 1 --branch v0.31.0 https://github.com/creationix/nvm.git
RUN /bin/bash -c "source /opt/nvm/nvm.sh && nvm install v4"
RUN useradd -ms /bin/bash mapbox
USER mapbox
ENV HOME /home/mapbox
WORKDIR /home/mapbox
RUN echo "source /opt/nvm/nvm.sh" > .bashrc
RUN echo "source /home/mapbox/.bashrc" > .profile

1
docker/Dockerfile Symbolic link
View File

@ -0,0 +1 @@
Dockerfile-debian

79
docker/Dockerfile-alpine Normal file
View File

@ -0,0 +1,79 @@
FROM alpine:3.21.2 AS alpine-mimalloc
RUN apk update && \
apk upgrade && \
apk add --no-cache \
boost-iostreams \
boost-program_options \
boost-thread \
mimalloc
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2
ENV MIMALLOC_LARGE_OS_PAGES=1
FROM alpine-mimalloc AS builder
ARG DOCKER_TAG
ARG BUILD_CONCURRENCY
RUN mkdir -p /src /opt && \
apk add --no-cache \
boost-dev \
boost-filesystem \
clang \
cmake \
expat-dev \
git \
libbz2 \
libxml2 \
lua5.4-dev \
make \
onetbb-dev
COPY . /src
WORKDIR /src
RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
echo "Building OSRM ${DOCKER_TAG}" && \
git show --format="%H" | head -n1 > /opt/OSRM_GITSHA && \
echo "Building OSRM gitsha $(cat /opt/OSRM_GITSHA)" && \
mkdir -p build && \
cd build && \
BUILD_TYPE="Release" && \
ENABLE_ASSERTIONS="Off" && \
BUILD_TOOLS="Off" && \
case ${DOCKER_TAG} in *"-debug"*) BUILD_TYPE="Debug";; esac && \
case ${DOCKER_TAG} in *"-assertions"*) BUILD_TYPE="RelWithDebInfo" && ENABLE_ASSERTIONS="On" && BUILD_TOOLS="On";; esac && \
echo "Building ${BUILD_TYPE} with ENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} BUILD_TOOLS=${BUILD_TOOLS}" && \
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} -DBUILD_TOOLS=${BUILD_TOOLS} -DENABLE_LTO=OFF && \
make -j${NPROC} install && \
cd ../profiles && \
cp -r * /opt && \
strip /usr/local/bin/* && \
rm -rf /src
# Multistage build to reduce image size - https://docs.docker.com/build/building/multi-stage/#use-multi-stage-builds
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
FROM alpine-mimalloc AS runstage
COPY --from=builder /usr/local /usr/local
COPY --from=builder /opt /opt
RUN apk add --no-cache \
boost-date_time \
expat \
lua5.4 \
onetbb && \
ldconfig /usr/local/lib
RUN /usr/local/bin/osrm-extract --help && \
/usr/local/bin/osrm-routed --help && \
/usr/local/bin/osrm-contract --help && \
/usr/local/bin/osrm-partition --help && \
/usr/local/bin/osrm-customize --help
WORKDIR /opt
EXPOSE 5000

76
docker/Dockerfile-debian Normal file
View File

@ -0,0 +1,76 @@
FROM debian:bookworm-slim AS builder
ARG DOCKER_TAG
ARG BUILD_CONCURRENCY
RUN mkdir -p /src /opt && \
apt-get update && \
apt-get -y --no-install-recommends --no-install-suggests install \
ca-certificates \
cmake \
g++ \
gcc \
git \
libboost1.81-all-dev \
libbz2-dev \
liblua5.4-dev \
libtbb-dev \
libxml2-dev \
libzip-dev \
lua5.4 \
make \
pkg-config
COPY . /src
WORKDIR /src
RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
export CXXFLAGS="-Wno-array-bounds -Wno-uninitialized -Wno-stringop-overflow" && \
echo "Building OSRM ${DOCKER_TAG}" && \
git show --format="%H" | head -n1 > /opt/OSRM_GITSHA && \
echo "Building OSRM gitsha $(cat /opt/OSRM_GITSHA)" && \
mkdir -p build && \
cd build && \
BUILD_TYPE="Release" && \
ENABLE_ASSERTIONS="Off" && \
BUILD_TOOLS="Off" && \
case ${DOCKER_TAG} in *"-debug"*) BUILD_TYPE="Debug";; esac && \
case ${DOCKER_TAG} in *"-assertions"*) BUILD_TYPE="RelWithDebInfo" && ENABLE_ASSERTIONS="On" && BUILD_TOOLS="On";; esac && \
echo "Building ${BUILD_TYPE} with ENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} BUILD_TOOLS=${BUILD_TOOLS}" && \
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} -DBUILD_TOOLS=${BUILD_TOOLS} -DENABLE_LTO=On && \
make -j${NPROC} install && \
cd ../profiles && \
cp -r * /opt && \
strip /usr/local/bin/* && \
rm -rf /src
# Multistage build to reduce image size - https://docs.docker.com/build/building/multi-stage/#use-multi-stage-builds
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
FROM debian:bookworm-slim AS runstage
COPY --from=builder /usr/local /usr/local
COPY --from=builder /opt /opt
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
expat \
libboost-date-time1.81.0 \
libboost-iostreams1.81.0 \
libboost-program-options1.81.0 \
libboost-thread1.81.0 \
liblua5.4-0 \
libtbb12 && \
rm -rf /var/lib/apt/lists/* && \
# Add /usr/local/lib to ldconfig to allow loading libraries from there
ldconfig /usr/local/lib
RUN /usr/local/bin/osrm-extract --help && \
/usr/local/bin/osrm-routed --help && \
/usr/local/bin/osrm-contract --help && \
/usr/local/bin/osrm-partition --help && \
/usr/local/bin/osrm-customize --help
WORKDIR /opt
EXPOSE 5000

View File

@ -1,6 +0,0 @@
# Docker based continious integration
Run ```./docker/build-image.sh``` to build a docker image.
The image contains all the build dependencies and the state of the local git repository.
Run ```./docker/run-gcc.sh``` to build OSRM with g++ and run all tests.

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail
docker build \
-t mapbox/osrm:linux \
docker/

13
docker/hooks/build Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# We've placed the Dockerfile under docker/ so that the generically named
# hooks/ directory doesn't pollute the main directory. Because we need to
# COPY the source into the container, we need to use some -f gymnastics to
# ensure that "COPY . /src" is referring to the repo root, not the directory
# that contains the Dockerfile.
# This script gets executed with a pwd of wherever the Dockerfile is.
DOCKER_BUILD="docker build --build-arg BUILD_CONCURRENCY=${CONCURRENCY} --build-arg DOCKER_TAG=${DOCKER_TAG:?unset} -t ${IMAGE_NAME:?unset} -f"
$DOCKER_BUILD Dockerfile ..
$DOCKER_BUILD Dockerfile-alpine ..

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail
docker run \
-i \
-e "CXX=clang++" \
-v `pwd`:/home/mapbox/osrm-backend \
-t mapbox/osrm:linux \
/bin/bash -lc "osrm-backend/docker/test.sh"

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail
docker run \
-i \
-e "CXX=g++" \
-v `pwd`:/home/mapbox/osrm-backend \
-t mapbox/osrm:linux \
/bin/bash -lc "osrm-backend/docker/test.sh"

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
set -e
set -o pipefail
export CMAKEOPTIONS="-DCMAKE_BUILD_TYPE=Release"
cd /home/mapbox/osrm-backend
[ -d build ] && rm -rf build
mkdir -p build
cd build
cmake .. $CMAKEOPTIONS -DBUILD_TOOLS=1
make -j`nproc`
make tests -j`nproc`
#./unit_tests/server-tests
#./unit_tests/library-tests
#./unit_tests/extractor-tests
#./unit_tests/util-tests
cd ..
npm test

62
docs/developing.md Normal file
View File

@ -0,0 +1,62 @@
# Developing / Debugging guidance code
When changing guidance code, it is easy to introduce problems somewhere in the network.
To get a better feeling of how your changes impact the OSRM experience, we offer ways of generating geojson output to inspect (e.g. with Mapbox Studio).
When you do changes, make sure to inspect a few areas for the impact of the changes.
## How to use GeoJson-Debugging
This is a short guide to describe usage of our GeoJson debug logging mechanism. It is synchronized to guarantee thread-safe logging.
## Outputting into a single file
To use it, the inclusion of `geojson_debug_logger.hpp` `geojson_debug_policies.hpp` from the `util` directory is required.
Geojson debugging requires a few simple steps to output data into a feature collection.
- Create a Scoped Guard that lives through the process and provide it with all required datastructures (it needs to span the lifetime of all your logging efforts)
- At the location of the output, simply call Write with your own parameters.
A guard (ScopedGeojsonLoggerGuard) requires a logging policy. Per default we provide a way of printing out node-ids as coordinates.
The initialisation to do so looks like this:
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
Make sure to give the guard a name, so it actually gets a lifetime.
The field `data-for-conversion` can be an arbitrary long set of features and needs to match the parameters used for constructing our policy (in this case `util::NodeIdVectorToLineString`).
The policy itself offers a `operator()` accepting a `vector` of `NodeID`.
For outputting data into our file (debug.geojson), we simply need to call the matching logging routine of the guard: `util::ScioedGeojsonLoggerGuard<util::NodeIdVectorToLineString>::Write(list_of_node_ids);`
(or `guard.Write(list_of_node_ids)` if you created an instance).
### Possible Scopeguard Location
Think of the scopeguard as you would do of any reference. If you wan't to access to logging during a call, the guard object must be alive and valid.
As an example: a good location to create a scopeguard to log decisions in the edge-based-graph-factory would be right before we run it ([here](https://github.com/Project-OSRM/osrm-backend/blob/a933b5d94943bf3edaf42c84a614a99650d23cba/src/extractor/extractor.cpp#L497)). If you put `util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", node_coordinate_vector);` at that location, you can then print `util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString>::Write(list_of_node_ids);` anywhere within the `edge-based-graph-factory`.
This location would enable calls for all guidance related pre-processing which is called in the edge-based-graph-factory.
Logging any turn-handler decisions, for example, would now be possible.
## Limitations
GeoJson debugging requires a single GeoJsonGuard (ScopedGeojsonLoggerGuard) for each desired output file.
For each set of template parameters, only the most recent guard will actually produce output.
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug-2.geojson", data-for-conversion);`
Will not provide a way to write into two files, but only `debug-2` will actually contain features.
We cannot nest-these calls.
If we want to use the same policy for multiple files, we need to use different template parameters both for the logger and the guard.
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString,0> geojson_guard( "debug.geojson", data-for-conversion);`
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString,1> geojson_guard( "debug-2.geojson", data-for-conversion);`
as well as,
`util::ScopedGeojsonLoggerGuardr<util::NodeIdVectorToLineString,0>::Write(list_of_node_ids);`
`util::ScopedGeojsonLoggerGuardr<util::NodeIdVectorToLineString,1>::Write(list_of_node_ids);`

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 KiB

View File

@ -1,7 +1,11 @@
## Introduction
OSRM can be used as a library (libosrm) via C++ instead of using it through the HTTP interface and `osrm-routed`. This allows for fine-tuning OSRM and has much less overhead. Here is a quick introduction into how to use `libosrm` in the upcoming v5 release.
Take a look at the example code that lives in the [example directory](https://github.com/Project-OSRM/osrm-backend/tree/master/example). Here is all you ever wanted to know about `libosrm`, that is a short description of what the types do and where to find documentation on it:
## Important interface objects
- [`EngineConfig`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/engine_config.hpp) - for initializing an OSRM instance we can configure certain properties and constraints. E.g. the storage config is the base path such as `france.osm.osrm` from which we derive and load `france.osm.osrm.*` auxiliary files. This also lets you set constraints such as the maximum number of locations allowed for specific services.
- [`OSRM`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/osrm/osrm.hpp) - this is the main Routing Machine type with functions such as `Route` and `Table`. You initialize it with a `EngineConfig`. It does all the heavy lifting for you. Each function takes its own parameters, e.g. the `Route` function takes `RouteParameters`, and a out-reference to a JSON result that gets filled. The return value is a `Status`, indicating error or success.
@ -16,11 +20,14 @@ Take a look at the example code that lives in the [example directory](https://gi
- [Parameters for other services](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api) - here are all other `*Parameters` you need for other Routing Machine services.
- [JSON](https://github.com/Project-OSRM/osrm-backend/blob/master/include/util/json_container.hpp) - this is a sum type resembling JSON. The Routing Machine service functions take a out-ref to a JSON result and fill it accordingly. It is currently implemented using [mapbox/variant](https://github.com/mapbox/variant) which is similar to [Boost.Variant](http://www.boost.org/doc/libs/1_55_0/doc/html/variant.html) (Boost documentation is great). There are two ways to work with this sum type: either provide a visitor that acts on each type on visitation or use the `get` function in case you're sure about the structure. The JSON structure is written down in the [[v5 server API|Server-API-v5,-current]].
- [JSON](https://github.com/Project-OSRM/osrm-backend/blob/master/include/util/json_container.hpp) - this is a sum type resembling JSON. The Routing Machine service functions take a out-ref to a JSON result and fill it accordingly. It is currently implemented using [mapbox/variant](https://github.com/mapbox/variant) which is similar to [Boost.Variant](http://www.boost.org/doc/libs/1_55_0/doc/html/variant.html). There are two ways to work with this sum type: either provide a visitor that acts on each type on visitation or use the `get` function in case you're sure about the structure. The JSON structure is written down in the [HTTP API](#http-api).
------------------------------------------------------------------------------------------------------------------
## Example
To summarize:
- create an `OSRM` instance initialized with a `EngineConfig`
- call the service function on the `OSRM` object providing service specific `*Parameters`
- check the return code and use the JSON result
See [the example folder](https://github.com/Project-OSRM/osrm-backend/tree/master/example) in the OSRM repository.
## Workflow
- Create an `OSRM` instance initialized with a `EngineConfig`
- Call the service function on the `OSRM` object providing service specific `*Parameters`
- Check the return code and use the JSON result

411
docs/nodejs/api.md Normal file
View File

@ -0,0 +1,411 @@
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## OSRM
The `OSRM` method is the main constructor for creating an OSRM instance.
An OSRM instance requires a `.osrm.*` dataset(`.osrm.*` because it contains several files), which is prepared by the OSRM toolchain.
You can create such a `.osrm.*` dataset by running the OSRM binaries we ship in `node_modules/osrm/lib/binding/` and default
profiles (e.g. for setting speeds and determining road types to route on) in `node_modules/osrm/profiles/`:
node_modules/osrm/lib/binding/osrm-extract data.osm.pbf -p node_modules/osrm/profiles/car.lua
node_modules/osrm/lib/binding/osrm-contract data.osrm
Consult the [osrm-backend](https://github.com/Project-OSRM/osrm-backend) documentation for further details.
Once you have a complete `network.osrm.*` dataset, you can calculate routes in javascript with this object.
```javascript
var osrm = new OSRM('network.osrm');
```
**Parameters**
- `options` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** Options for creating an OSRM object or string to the `.osrm` file. (optional, default `{shared_memory:true}`)
- `options.algorithm` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The algorithm to use for routing. Can be 'CH', or 'MLD'. Default is 'CH'.
Make sure you prepared the dataset with the correct toolchain.
- `options.shared_memory` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Connects to the persistent shared memory datastore.
This requires you to run `osrm-datastore` prior to creating an `OSRM` object.
- `options.dataset_name` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Connects to the persistent shared memory datastore defined by `--dataset_name` option when running `osrm-datastore`.
This requires you to run `osrm-datastore --dataset_name` prior to creating an `OSRM` object.
- `options.memory_file` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** **DEPRECATED**
Old behaviour: Path to a file on disk to store the memory using mmap. Current behaviour: setting this value is the same as setting `mmap_memory: true`.
- `options.mmap_memory` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Map on-disk files to virtual memory addresses (mmap), rather than loading into RAM.
- `options.path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true.
- `options.disable_feature_dataset` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Disables a feature dataset from being loaded into memory if not needed. Options: `ROUTE_STEPS`, `ROUTE_GEOMETRY`.
- `options.max_locations_trip` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in trip query (default: unlimited).
- `options.max_locations_viaroute` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in viaroute query (default: unlimited).
- `options.max_locations_distance_table` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in distance table query (default: unlimited).
- `options.max_locations_map_matching` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in map-matching query (default: unlimited).
- `options.max_radius_map_matching` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. radius size supported in map matching query (default: 5).
- `options.max_results_nearest` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. results supported in nearest query (default: unlimited).
- `options.max_alternatives` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. number of alternatives supported in alternative routes query (default: 3).
- `options.default_radius` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Default radius for queries (default: unlimited).
### route
Returns the fastest route between two or more coordinates while visiting the waypoints in order.
**Parameters**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the route query.
- `options.coordinates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
- `options.hints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.exclude` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** List of classes to avoid, order does not matter.
- `options.generate_hints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`)
- `options.alternatives` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Search for alternative routes. (optional, default `false`)
- `options.alternatives` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Search for up to this many alternative routes.
_Please note that even if alternative routes are requested, a result cannot be guaranteed._ (optional, default `0`)
- `options.steps` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route leg. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
- `options.continue_straight` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
- `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`.
`null`/`true`/`false`
- `options.waypoints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Indices to coordinates to treat as waypoints. If not supplied, all coordinates are waypoints. Must include first and last coordinate index.
- `options.format` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers).
- `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
- `options.skip_waypoints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Removes waypoints from the response. Waypoints are still calculated, but not serialized. Could be useful in case you are interested in some other part of response and do not want to transfer waste data. (optional, default `false`)
- `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
**Examples**
```javascript
var osrm = new OSRM("berlin-latest.osrm");
osrm.route({coordinates: [[52.519930,13.438640], [52.513191,13.415852]]}, function(err, result) {
if(err) throw err;
console.log(result.waypoints); // array of Waypoint objects representing all waypoints in order
console.log(result.routes); // array of Route objects ordered by descending recommendation rank
});
```
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** An array of [Waypoint](#waypoint) objects representing all waypoints in order AND an array of [`Route`](#route) objects ordered by descending recommendation rank.
### nearest
Snaps a coordinate to the street network and returns the nearest n matches.
Note: `coordinates` in the general options only supports a single `{longitude},{latitude}` entry.
**Parameters**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the nearest query.
- `options.coordinates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
- `options.hints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.generate_hints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`)
- `options.number` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of nearest segments that should be returned.
Must be an integer greater than or equal to `1`. (optional, default `1`)
- `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`.
- `options.format` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which output format to use, either `json`, or [`flatbuffers`](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api/flatbuffers).
- `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
- `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
**Examples**
```javascript
var osrm = new OSRM('network.osrm');
var options = {
coordinates: [[13.388860,52.517037]],
number: 3,
bearings: [[0,20]]
};
osrm.nearest(options, function(err, response) {
console.log(response.waypoints); // array of Waypoint objects
});
```
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `waypoints`.
**`waypoints`**: array of [`Ẁaypoint`](#waypoint) objects sorted by distance to the input coordinate.
Each object has an additional `distance` property, which is the distance in meters to the supplied input coordinate.
### table
Computes duration table for the given locations. Allows for both symmetric and asymmetric tables.
Optionally returns distance table.
**Parameters**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the table query.
- `options.coordinates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
- `options.hints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.generate_hints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`)
- `options.sources` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to use
location with given index as source. Default is to use all.
- `options.destinations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to use location with given index as destination. Default is to use all.
- `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate.. Can be `null` (unrestricted, default), `curb` or `opposite`.
- `options.fallback_speed` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Replace `null` responses in result with as-the-crow-flies estimates based on `fallback_speed`. Value is in metres/second.
- `options.fallback_coordinate` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Either `input` (default) or `snapped`. If using a `fallback_speed`, use either the user-supplied coordinate (`input`), or the snapped coordinate (`snapped`) for calculating the as-the-crow-flies distance between two points.
- `options.scale_factor` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Multiply the table duration values in the table by this number for more controlled input into a route optimization solver.
- `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
- `options.annotations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Return the requested table or tables in response. Can be `['duration']` (return the duration matrix, default), `[distance']` (return the distance matrix), or `['duration', distance']` (return both the duration matrix and the distance matrix).
- `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
**Examples**
```javascript
var osrm = new OSRM('network.osrm');
var options = {
coordinates: [
[13.388860,52.517037],
[13.397634,52.529407],
[13.428555,52.523219]
]
};
osrm.table(options, function(err, response) {
console.log(response.durations); // array of arrays, matrix in row-major order
console.log(response.distances); // array of arrays, matrix in row-major order
console.log(response.sources); // array of Waypoint objects
console.log(response.destinations); // array of Waypoint objects
});
```
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `durations`, `distances`, `sources`, and `destinations`.
**`durations`**: array of arrays that stores the matrix in row-major order. `durations[i][j]` gives the travel time from the i-th waypoint to the j-th waypoint.
Values are given in seconds.
**`distances`**: array of arrays that stores the matrix in row-major order. `distances[i][j]` gives the travel time from the i-th waypoint to the j-th waypoint.
Values are given in meters.
**`sources`**: array of [`Ẁaypoint`](#waypoint) objects describing all sources in order.
**`destinations`**: array of [`Ẁaypoint`](#waypoint) objects describing all destinations in order.
**`fallback_speed_cells`**: (optional) if `fallback_speed` is used, will be an array of arrays of `row,column` values, indicating which cells contain estimated values.
### tile
This generates [Mapbox Vector Tiles](https://mapbox.com/vector-tiles) that can be viewed with a
vector-tile capable slippy-map viewer. The tiles contain road geometries and metadata that can
be used to examine the routing graph. The tiles are generated directly from the data in-memory,
so are in sync with actual routing results, and let you examine which roads are actually
routable,
and what weights they have applied.
**Parameters**
- `ZXY` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** an array consisting of `x`, `y`, and `z` values representing tile coordinates like
[wiki.openstreetmap.org/wiki/Slippy_map_tilenames](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)
and are supported by vector tile viewers like [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/api/).
- `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
**Examples**
```javascript
var osrm = new OSRM('network.osrm');
osrm.tile([0, 0, 0], function(err, response) {
if (err) throw err;
fs.writeFileSync('./tile.vector.pbf', response); // write the buffer to a file
});
```
Returns **[Buffer](https://nodejs.org/api/buffer.html)** contains a Protocol Buffer encoded vector tile.
### match
Map matching matches given GPS points to the road network in the most plausible way.
Please note the request might result multiple sub-traces. Large jumps in the timestamps
(>60s) or improbable transitions lead to trace splits if a complete matching could
not be found. The algorithm might not be able to match all points. Outliers are removed
if they can not be matched successfully.
**Parameters**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the match query.
- `options.coordinates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.hints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.generate_hints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`)
- `options.steps` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
- `options.timestamps` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)>?** Timestamp of the input location (integers, UNIX-like timestamp).
- `options.radiuses` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`.
- `options.gaps` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore`. (optional, default `split`)
- `options.tidy` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Allows the input track modification to obtain better matching quality for noisy tracks. (optional, default `false`)
- `options.waypoints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Indices to coordinates to treat as waypoints. If not supplied, all coordinates are waypoints. Must include first and last coordinate index.
- `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
- `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
**Examples**
```javascript
var osrm = new OSRM('network.osrm');
var options = {
coordinates: [[13.393252,52.542648],[13.39478,52.543079],[13.397389,52.542107]],
timestamps: [1424684612, 1424684616, 1424684620]
};
osrm.match(options, function(err, response) {
if (err) throw err;
console.log(response.tracepoints); // array of Waypoint objects
console.log(response.matchings); // array of Route objects
});
```
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `tracepoints` and `matchings`.
**`tracepoints`** Array of [`Ẁaypoint`](#waypoint) objects representing all points of the trace in order.
If the trace point was omitted by map matching because it is an outlier, the entry will be null.
Each `Waypoint` object has the following additional properties,
1) `matchings_index`: Index to the
[`Route`](#route) object in matchings the sub-trace was matched to,
2) `waypoint_index`: Index of
the waypoint inside the matched route.
3) `alternatives_count`: Number of probable alternative matchings for this trace point. A value of zero indicate that this point was matched unambiguously. Split the trace at these points for incremental map matching.
**`matchings`** is an array of [`Route`](#route) objects that assemble the trace. Each `Route` object has an additional `confidence` property,
which is the confidence of the matching. float value between `0` and `1`. `1` is very confident that the matching is correct.
### trip
The trip plugin solves the Traveling Salesman Problem using a greedy heuristic
(farthest-insertion algorithm) for 10 or _ more waypoints and uses brute force for less than 10
waypoints. The returned path does not have to be the shortest path, _ as TSP is NP-hard it is
only an approximation.
Note that all input coordinates have to be connected for the trip service to work.
Currently, not all combinations of `roundtrip`, `source` and `destination` are supported.
Right now, the following combinations are possible:
| roundtrip | source | destination | supported |
| :-------- | :----- | :---------- | :-------- |
| true | first | last | **yes** |
| true | first | any | **yes** |
| true | any | last | **yes** |
| true | any | any | **yes** |
| false | first | last | **yes** |
| false | first | any | no |
| false | any | last | no |
| false | any | any | no |
**Parameters**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the trip query.
- `options.coordinates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `double >= 0` or `null` (unlimited, default).
- `options.hints` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.generate_hints` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not adds a Hint to the response which can be used in subsequent requests. (optional, default `true`)
- `options.steps` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` (optional, default `simplified`)
- `options.roundtrip` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route is a roundtrip. (optional, default `true`)
- `options.source` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route starts at `any` or `first` coordinate. (optional, default `any`)
- `options.destination` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route ends at `any` or `last` coordinate. (optional, default `any`)
- `options.approaches` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Restrict the direction on the road network at a waypoint, relative to the input coordinate. Can be `null` (unrestricted, default), `curb` or `opposite`.
- `options.snapping` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Which edges can be snapped to, either `default`, or `any`. `default` only snaps to edges marked by the profile as `is_startpoint`, `any` will allow snapping to any edge in the routing graph.
- `callback` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
**Examples**
```javascript
var osrm = new OSRM('network.osrm');
var options = {
coordinates: [
[13.36761474609375, 52.51663871100423],
[13.374481201171875, 52.506191342034576]
],
source: "first",
destination: "last",
roundtrip: false
}
osrm.trip(options, function(err, response) {
if (err) throw err;
console.log(response.waypoints); // array of Waypoint objects
console.log(response.trips); // array of Route objects
});
```
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `waypoints` and `trips`.
**`waypoints`**: an array of [`Waypoint`](#waypoint) objects representing all waypoints in input order.
Each Waypoint object has the following additional properties,
1) `trips_index`: index to trips of the sub-trip the point was matched to, and
2) `waypoint_index`: index of the point in the trip.
**`trips`**: an array of [`Route`](#route) objects that assemble the trace.
## Configuration
All plugins support a second additional object that is available to configure some NodeJS
specific behaviours.
**Parameters**
- `plugin_config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Object literal containing parameters for the trip query.
- `plugin_config.format` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** The format of the result object to various API calls.
Valid options are `object` (default if `options.format` is
`json`), which returns a standard Javascript object, as described above, and `buffer`(default if
`options.format` is `flatbuffers`), which will return a NodeJS
**[Buffer](https://nodejs.org/api/buffer.html)** object, containing a JSON string or Flatbuffers
object. The latter has the advantage that it can be immediately serialized to disk/sent over the
network, and the generation of the string is performed outside the main NodeJS event loop. This
option is ignored by the `tile` plugin. Also note that `options.format` set to `flatbuffers`
cannot be used with `plugin_config.format` set to `object`. `json_buffer` is deprecated alias for
`buffer`.
**Examples**
```javascript
var osrm = new OSRM('network.osrm');
var options = {
coordinates: [
[13.36761474609375, 52.51663871100423],
[13.374481201171875, 52.506191342034576]
]
};
osrm.route(options, { format: "buffer" }, function(err, response) {
if (err) throw err;
console.log(response.toString("utf-8"));
});
```
## Responses
### Route
Represents a route through (potentially multiple) waypoints.
**Parameters**
- `external` **documentation** in
[`osrm-backend`](../http.md#route-object)
### RouteLeg
Represents a route between two waypoints.
**Parameters**
- `external` **documentation** in
[`osrm-backend`](../http.md#routeleg-object)
### RouteStep
A step consists of a maneuver such as a turn or merge, followed by a distance of travel along a
single way to the subsequent step.
**Parameters**
- `external` **documentation** in
[`osrm-backend`](../http.md#routestep-object)
### StepManeuver
**Parameters**
- `external` **documentation** in
[`osrm-backend`](../http.md#stepmaneuver-object)
### Waypoint
Object used to describe waypoint on a route.
**Parameters**
- `external` **documentation** in
[`osrm-backend`](../http.md#waypoint-object)

View File

@ -1,34 +1,377 @@
OSRM supports "profiles". Configurations representing different routing behaviours for (typically) different transport modes. A profile describes whether or not we route along a particular type of way, or over a particular node in the OpenStreetMap data, and also how quickly we'll be travelling when we do. This feeds into the way the routing graph is created and thus influences the output routes.
# OSRM profiles
OSRM supports "profiles". Profiles representing routing behavior for different transport modes like car, bike and foot. You can also create profiles for variations like a fastest/shortest car profile or fastest/safest/greenest bicycles profile.
A profile describes whether or not it's possible to route along a particular type of way, whether we can pass a particular node, and how quickly we'll be traveling when we do. This feeds into the way the routing graph is created and thus influences the output routes.
## Available profiles
Out-of-the-box OSRM comes with profiles for car, bicycle and foot. You can easily modify these or create new ones if you like.
Out-of-the-box OSRM comes with several different profiles, including car, bicycle and foot.
Profiles have a 'lua' extension, and are placed in 'profiles' directory.
Profile configuration files have a 'lua' extension, and are found under the 'profiles' subdirectory.
Alternatively commands will take a lua profile specified with an explicit -p param, for example:
When running OSRM preprocessing commands you specify the profile with the --profile (or the shorthand -p) option, for example:
`osrm-extract -p ../profiles/car.lua planet-latest.osm.pbf`
`osrm-extract --profile ../profiles/car.lua planet-latest.osm.pbf`
And then **you will need to extract and contract again** (A change to the profile will typically affect the extract step as well as the contract step. See [Processing Flow](https://github.com/Project-OSRM/osrm-backend/wiki/Processing-Flow))
## Processing flow
It's important to understand that profiles are used when preprocessing the OSM data, NOT at query time when routes are computed.
## lua scripts?
This means that after modifying a profile **you will need to extract, contract and reload the data again** and to see changes in the routing results. See [Processing Flow](https://github.com/Project-OSRM/osrm-backend/wiki/Processing-Flow) for more.
Profiles are not just configuration files. They are scripts written in the "lua" scripting language ( http://www.lua.org ) The reason for this, is that OpenStreetMap data is not sufficiently straightforward, to simply define tag mappings. Lua scripting offers a powerful way of coping with the complexity of different node,way,relation,tag combinations found within OpenStreetMap data.
## Profiles are written in Lua
Profiles are not just configuration files. They are scripts written in the [Lua scripting language](http://www.lua.org). The reason for this is that OpenStreetMap data is complex, and it's not possible to simply define tag mappings. Lua scripting offers a powerful way to handle all the possible tag combinations found in OpenStreetMap nodes and ways.
## Basic structure of a profile
## Basic structure of profiles
A profile will process every node and way in the OSM input data to determine what ways are routable in which direction, at what speed, etc.
You can understand these lua scripts enough to make interesting modifications, without needing to get to grips with how they work completely.
A profile will typically:
Towards the top of the file, a profile (such as [car.lua](../profiles/car.lua)) will typically define various configurations as global variables. A lot of these are look-up hashes of one sort or another.
- Define api version (required)
- Require library files (optional)
- Define setup function (required)
- Define process functions (some are required)
- Return functions table (required)
As you scroll down the file you'll see local variables, and then local functions, and finally...
A profile can also define various local functions it needs.
`way_function` and `node_function` are the important functions which are called when extracting OpenStreetMap data with `osrm-extract`.
Looking at [car.lua](../profiles/car.lua) as an example, at the top of the file the api version is defined and then required library files are included.
## way_function
Then follows the `setup` function, which is called once when the profile is loaded. It returns a big hash table of configurations, specifying things like what speed to use for different way types. The configurations are used later in the various processing functions. Many adjustments can be done just by modifying this configuration table.
Given an OpenStreetMap way, the way_function will either return nothing (meaning we are not going to route over this way at all), or it will set up a result hash to be returned. The most important thing it will do is set the value of `result.forward_speed` and `result.backward_speed` as a suitable integer value representing the speed for traversing the way.
The setup function is also where you can do other setup, like loading an elevation data source if you want to consider that when processing ways.
All other calculations stem from that, including the returned timings in driving directions, but also, less directly, it feeds into the actual routing decisions the engine will take (a way with a slow traversal speed, may be less favoured than a way with fast traversal speed, but it depends how long it is, and... what it connects to in the rest of the network graph)
Then come the `process_node` and `process_way` functions, which are called for each OSM node and way when extracting OpenStreetMap data with `osrm-extract`.
Using the power of the scripting language you wouldn't typically see something as simple as a `result.forward_speed = 20` line within the way_function. Instead a way_function will examine the tagging (e.g. `way:get_value_by_key("highway")` and many others), process this information in various ways, calling other local functions, referencing the global variables and look-up hashes, before arriving at the result.
The `process_turn` function processes every possible turn in the network, and sets a penalty depending on the angle and turn of the movement.
Profiles can also define a `process_segment` function to handle differences in speed along an OSM way, for example to handle elevation. As you can see, this is not currently used in the car profile.
At the end of the file, a table is returned with references to the setup and processing functions the profile has defined.
## Understanding speed, weight and rate
When computing a route from A to B there can be different measures of what is the best route. That's why there's a need for different profiles.
Because speeds vary on different types of roads, the shortest and the fastest route are typically different. But there are many other possible preferences. For example a user might prefer a bicycle route that follow parks or other green areas, even though both duration and distance are a bit longer.
To handle this, OSRM doesn't simply choose the ways with the highest speed. Instead it uses the concepts of `weight` and `rate`. The rate is an abstract measure that you can assign to ways as you like to make some ways preferable to others. Routing will prefer ways with high rate.
The weight of a way is normally computed as length / rate. The weight can be thought of as the resistance or cost when passing the way. Routing will prefer ways with low weight.
You can also set the weight of a way to a fixed value. In this case it's not calculated based on the length or rate, and the rate is ignored.
You should set the speed to your best estimate of the actual speed that will be used on a particular way. This will result in the best estimated travel times.
If you want to prefer certain ways due to other factors than the speed, adjust the rate accordingly. If you adjust the speed, the time estimation will be skewed.
If you set the same rate on all ways, the result will be shortest path routing.
If you set rate = speed on all ways, the result will be fastest path routing.
If you want to prioritize certain streets, increase the rate on these.
## Elements
### api_version
A profile should set `api_version` at the top of your profile. This is done to ensure that older profiles are still supported when the api changes. If `api_version` is not defined, 0 will be assumed. The current api version is 4.
### Library files
The folder [profiles/lib/](../profiles/lib/) contains LUA library files for handling many common processing tasks.
File | Notes
------------------|------------------------------
way_handlers.lua | Functions for processing way tags
tags.lua | Functions for general parsing of OSM tags
set.lua | Defines the Set helper for handling sets of values
sequence.lua | Defines the Sequence helper for handling sequences of values
access.lua | Function for finding relevant access tags
destination.lua | Function for finding relevant destination tags
maxspeed.lua | Function for determining maximum speed
guidance.lua | Function for processing guidance attributes
They all return a table of functions when you use `require` to load them. You can either store this table and reference its functions later, or if you need only a single function you can store that directly.
### setup()
The `setup` function is called once when the profile is loaded and must return a table of configurations. It's also where you can do other global setup, like loading data sources that are used during processing.
Note that processing of data is parallelized and several unconnected LUA interpreters will be running at the same time. The `setup` function will be called once for each. Each LUA interpreter will have its own set of globals.
The following global properties can be set under `properties` in the hash you return in the `setup` function:
Attribute | Type | Notes
-------------------------------------|----------|----------------------------------------------------------------------------
weight_name | String | Name used in output for the routing weight property (default `'duration'`)
weight_precision | Unsigned | Decimal precision of edge weights (default `1`)
left_hand_driving | Boolean | Are vehicles assumed to drive on the left? (used in guidance, default `false`)
use_turn_restrictions | Boolean | Are turn restrictions followed? (default `false`)
continue_straight_at_waypoint | Boolean | Must the route continue straight on at a via point, or are U-turns allowed? (default `true`)
max_speed_for_map_matching | Float | Maximum vehicle speed to be assumed in matching (in m/s)
max_turn_weight | Float | Maximum turn penalty weight
force_split_edges | Boolean | True value forces a split of forward and backward edges of extracted ways and guarantees that `process_segment` will be called for all segments (default `false`)
The following additional global properties can be set in the hash you return in the `setup` function:
Attribute | Type | Notes
-------------------------------------|------------------|----------------------------------------------------------------------------
excludable | Sequence of Sets | Determines which class-combinations are supported by the `exclude` option at query time. E.g. `Sequence{Set{"ferry", "motorway"}, Set{"motorway"}}` will allow you to exclude ferries and motorways, or only motorways.
classes | Sequence | Determines the allowed classes that can be referenced using `{forward,backward}_classes` on the way in the `process_way` function.
restrictions | Sequence | Determines which turn restrictions will be used for this profile.
suffix_list | Set | List of name suffixes needed for determining if "Highway 101 NW" the same road as "Highway 101 ES".
relation_types | Sequence | Determines which relations should be cached for processing in this profile. It contains relations types
### process_node(profile, node, result, relations)
Process an OSM node to determine whether this node is a barrier or can be passed and whether passing it incurs a delay.
Argument | Description
---------|-------------------------------------------------------
profile | The configuration table you returned in `setup`.
node | The input node to process (read-only).
result | The output that you will modify.
relations| Storage of relations to access relations, where `node` is a member.
The following attributes can be set on `result`:
Attribute | Type | Notes
----------------|---------|---------------------------------------------------------
barrier | Boolean | Is it an impassable barrier?
traffic_lights | Boolean | Is it a traffic light (incurs delay in `process_turn`)?
### process_way(profile, way, result, relations)
Given an OpenStreetMap way, the `process_way` function will either return nothing (meaning we are not going to route over this way at all), or it will set up a result hash.
Argument | Description
---------|-------------------------------------------------------
profile | The configuration table you returned in `setup`.
way | The input way to process (read-only).
result | The output that you will modify.
relations| Storage of relations to access relations, where `way` is a member.
Importantly it will set `result.forward_mode` and `result.backward_mode` to indicate the travel mode in each direction, as well as set `result.forward_speed` and `result.backward_speed` to integer values representing the speed for traversing the way.
It will also set a number of other attributes on `result`.
Using the power of the scripting language you wouldn't typically see something as simple as a `result.forward_speed = 20` line within the `process_way` function. Instead `process_way` will examine the tag set on the way, process this information in various ways, calling other local functions and referencing the configuration in `profile`, etc., before arriving at the result.
The following attributes can be set on the result in `process_way`:
Attribute | Type | Notes
----------------------------------------|----------|--------------------------------------------------------------------------
forward_speed | Float | Speed on this way in km/h. Mandatory.
backward_speed | Float | ""
forward_rate | Float | Routing weight, expressed as meters/*weight* (e.g. for a fastest-route weighting, you would want this to be meters/second, so set it to forward_speed/3.6)
backward_rate | Float | ""
forward_mode | Enum | Mode of travel (e.g. `car`, `ferry`). Mandatory. Defined in `include/extractor/travel_mode.hpp`.
backward_mode | Enum | ""
forward_classes | Table | Mark this way as being of a specific class, e.g. `result.classes["toll"] = true`. This will be exposed in the API as `classes` on each `RouteStep`.
backward_classes | Table | ""
duration | Float | Alternative setter for duration of the whole way in both directions
weight | Float | Alternative setter for weight of the whole way in both directions
turn_lanes_forward | String | Directions for individual lanes (normalized OSM `turn:lanes` value)
turn_lanes_backward | String | ""
forward_restricted | Boolean | Is this a restricted access road? (e.g. private, or deliveries only; used to enable high turn penalty, so that way is only chosen for start/end of route)
backward_restricted | Boolean | ""
is_startpoint | Boolean | Can a journey start on this way? (e.g. ferry; if `false`, prevents snapping the start point to this way)
roundabout | Boolean | Is this part of a roundabout?
circular | Boolean | Is this part of a non-roundabout circular junction?
name | String | Name of the way
ref | String | Road number (equal to set `forward_ref` and `backward_ref` with one value)
forward_ref | String | Road number in forward way direction
backward_ref | String | Road number in backward way direction
destinations | String | The road's destinations
exits | String | The ramp's exit numbers or names
pronunciation | String | Name pronunciation
road_classification.motorway_class | Boolean | Guidance: way is a motorway
road_classification.link_class | Boolean | Guidance: way is a slip/link road
road_classification.road_priority_class | Enum | Guidance: order in priority list. Defined in `include/extractor/road_classification.hpp`
road_classification.may_be_ignored | Boolean | Guidance: way is non-highway
road_classification.num_lanes | Unsigned | Guidance: total number of lanes in way
### process_segment(profile, segment)
The `process_segment` function is called for every segment of OSM ways. A segment is a straight line between two OSM nodes.
On OpenStreetMap way cannot have different tags on different parts of a way. Instead you would split the way into several smaller ways. However many ways are long. For example, many ways pass hills without any change in tags.
Processing each segment of an OSM way makes it possible to have different speeds on different parts of a way based on external data like data about elevation, pollution, noise or scenic value and adjust weight and duration of the segment accordingly.
In the `process_segment` function you don't have access to OSM tags. Instead you use the geographical location of the start and end point of the way to look up information from another data source, like elevation data. See [rasterbot.lua](../profiles/rasterbot.lua) for an example.
The following attributes can be read and set on the result in `process_segment`:
Attribute | Read/write? | Type | Notes
-------------------|-------------|---------|----------------------------------------
source.lon | Read | Float | Co-ordinates of segment start
source.lat | Read | Float | ""
target.lon | Read | Float | Co-ordinates of segment end
target.lat | Read | Float | ""
distance | Read | Float | Length of segment
weight | Read/write | Float | Routing weight for this segment
duration | Read/write | Float | Duration for this segment
### process_turn(profile, turn)
The `process_turn` function is called for every possible turn in the network. Based on the angle and type of turn you assign the weight and duration of the movement.
The following attributes can be read and set on the result in `process_turn`:
Attribute | Read/write? | Type | Notes
--------------------- | ------------- | --------- | ------------------------------------------------------
angle | Read | Float | Angle of turn in degrees (`[-179, 180]`: `0`=straight, `180`=u turn, `+x`=x degrees to the right, `-x`= x degrees to the left)
number_of_roads | Read | Integer | Number of ways at the intersection of the turn
is_u_turn | Read | Boolean | Is the turn a u-turn?
has_traffic_light | Read | Boolean | Is a traffic light present at this turn?
is_left_hand_driving | Read | Boolean | Is left-hand traffic?
source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `process_way`)
source_mode | Read | Enum | Travel mode before the turn. Defined in `include/extractor/travel_mode.hpp`
source_is_motorway | Read | Boolean | Is the source road a motorway?
source_is_link | Read | Boolean | Is the source road a link?
source_number_of_lanes | Read | Integer | How many lanes does the source road have? (default when not tagged: 0)
source_highway_turn_classification | Read | Integer | Classification based on highway tag defined by user during setup. (default when not set: 0, allowed classification values are: 0-15))
source_access_turn_classification | Read | Integer | Classification based on access tag defined by user during setup. (default when not set: 0, allowed classification values are: 0-15))
source_speed | Read | Integer | Speed on this source road in km/h
source_priority_class | Read | Enum | The type of road priority class of the source. Defined in `include/extractor/road_classification.hpp`
target_restricted | Read | Boolean | Is the target a restricted access road? (See definition in `process_way`)
target_mode | Read | Enum | Travel mode after the turn. Defined in `include/extractor/travel_mode.hpp`
target_is_motorway | Read | Boolean | Is the target road a motorway?
target_is_link | Read | Boolean | Is the target road a link?
target_number_of_lanes | Read | Integer | How many lanes does the target road have? (default when not tagged: 0)
target_highway_turn_classification | Read | Integer | Classification based on highway tag defined by user during setup. (default when not set: 0, allowed classification values are: 0-15))
target_access_turn_classification | Read | Integer | Classification based on access tag defined by user during setup. (default when not set: 0, allowed classification values are: 0-15))
target_speed | Read | Integer | Speed on this target road in km/h
target_priority_class | Read | Enum | The type of road priority class of the target. Defined in `include/extractor/road_classification.hpp`
roads_on_the_right | Read | Vector<ExtractionTurnLeg> | Vector with information about other roads on the right of the turn that are also connected at the intersection
roads_on_the_left | Read | Vector<ExtractionTurnLeg> | Vector with information about other roads on the left of the turn that are also connected at the intersection. If turn is a u turn, this is empty.
weight | Read/write | Float | Penalty to be applied for this turn (routing weight)
duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds)
#### `roads_on_the_right` and `roads_on_the_left`
The information of `roads_on_the_right` and `roads_on_the_left` that can be read are as follows:
Attribute | Read/write? | Type | Notes
--------------------- | ------------- | --------- | ------------------------------------------------------
is_restricted | Read | Boolean | Is it a restricted access road? (See definition in `process_way`)
mode | Read | Enum | Travel mode before the turn. Defined in `include/extractor/travel_mode.hpp`
is_motorway | Read | Boolean | Is the road a motorway?
is_link | Read | Boolean | Is the road a link?
number_of_lanes | Read | Integer | How many lanes does the road have? (default when not tagged: 0)
highway_turn_classification | Read | Integer | Classification based on highway tag defined by user during setup. (default when not set: 0, allowed classification values are: 0-15)
access_turn_classification | Read | Integer | Classification based on access tag defined by user during setup. (default when not set: 0, allowed classification values are: 0-15)
speed | Read | Integer | Speed on this road in km/h
priority_class | Read | Enum | The type of road priority class of the leg. Defined in `include/extractor/road_classification.hpp`
is_incoming | Read | Boolean | Is the road an incoming road of the intersection
is_outgoing | Read | Boolean | Is the road an outgoing road of the intersection
The order of the roads in `roads_on_the_right` and `roads_on_the_left` are *counter clockwise*. If the turn is a u turn, all other connected roads will be in `roads_on_the_right`.
**Example**
```
c e
| /
| /
a ---- x ---- b
/|
/ |
f d
```
When turning from `a` to `b` via `x`,
* `roads_on_the_right[1]` is the road `xf`
* `roads_on_the_right[2]` is the road `xd`
* `roads_on_the_left[1]` is the road `xe`
* `roads_on_the_left[2]` is the road `xc`
Note that indices of arrays in lua are 1-based.
#### `highway_turn_classification` and `access_turn_classification`
When setting appropriate turn weights and duration, information about the highway and access tags of roads that are involved in the turn are necessary. The lua turn function `process_turn` does not have access to the original osrm tags anymore. However, `highway_turn_classification` and `access_turn_classification` can be set during setup. The classification set during setup can be later used in `process_turn`.
**Example**
In the following example we use `highway_turn_classification` to set the turn weight to `10` if the turn is on a highway and to `5` if the turn is on a primary.
```
function setup()
return {
highway_turn_classification = {
['motorway'] = 2,
['primary'] = 1
}
}
end
function process_turn(profile, turn) {
if turn.source_highway_turn_classification == 2 and turn.target_highway_turn_classification == 2 then
turn.weight = 10
end
if turn.source_highway_turn_classification == 1 and turn.target_highway_turn_classification == 1 then
turn.weight = 5
end
}
```
## Guidance
The guidance parameters in profiles are currently a work in progress. They can and will change.
Please be aware of this when using guidance configuration possibilities.
Guidance uses road classes to decide on when/if to emit specific instructions and to discover which road is obvious when following a route.
Classification uses three flags and a priority-category.
The flags indicate whether a road is a motorway (required for on/off ramps), a link type (the ramps itself, if also a motorway) and whether a road may be omitted in considerations (is considered purely for connectivity).
The priority-category influences the decision which road is considered the obvious choice and which roads can be seen as fork.
Forks can be emitted between roads of similar priority category only. Obvious choices follow a major priority road, if the priority difference is large.
### Using raster data
OSRM has built-in support for loading an interpolating raster data in ASCII format. This can be used e.g. for factoring in elevation when computing routes.
Use `raster:load()` in your `setup` function to load data and store the source in your configuration hash:
```lua
function setup()
return {
raster_source = raster:load(
"rastersource.asc", -- file to load
0, -- longitude min
0.1, -- longitude max
0, -- latitude min
0.1, -- latitude max
5, -- number of rows
4 -- number of columns
)
}
end
```
The input data must an ASCII file with rows of integers. e.g.:
```
0 0 0 0
0 0 0 250
0 0 250 500
0 0 0 250
0 0 0 0
```
In your `segment_function` you can then access the raster source and use `raster:query()` to query to find the nearest data point, or `raster:interpolate()` to interpolate a value based on nearby data points.
You must check whether the result is valid before using it.
Example:
```lua
function process_segment (profile, segment)
local sourceData = raster:query(profile.raster_source, segment.source.lon, segment.source.lat)
local targetData = raster:query(profile.raster_source, segment.target.lon, segment.target.lat)
local invalid = sourceData.invalid_data()
if sourceData.datum ~= invalid and targetData.datum ~= invalid then
-- use values to adjust weight and duration
[...]
end
```
See [rasterbot.lua](../profiles/rasterbot.lua) and [rasterbotinterp.lua](../profiles/rasterbotinterp.lua) for examples.
### Helper functions
There are a few helper functions defined in the global scope that profiles can use:
- `durationIsValid`
- `parseDuration`
- `trimLaneString`
- `applyAccessTokens`
- `canonicalizeStringList`

View File

@ -1,50 +1,59 @@
# Releasing a new OSRM version
Do decide if this is a major or minor version bump use: http://semver.org/
We are using http://semver.org/ for versioning with major, minor and patch versions.
What we guarantee on major version changes:
## Guarantees
- Breaking changes will be in the changelog
- If we break an HTTP API we bump the version
We are giving the following guarantees between versions:
What we guarantee on minor version changes:
### Major version change
- HTTP API does not include breaking changes
- C++ library API does not include breaking changes
- node-osrm API does not include breaking changes
- There are no guarantees about compatiblity of APIs or datasets
- Breaking changes will be noted as `BREAKING` in the changelog
What we DO NOT guarantee on minor version changes:
### Minor version change
- file format comp ability. Breakage will be listed in the changelog.
- new turn types and fields may be introduced. How to handle this see [the HTTP API docs](http.md).
We may introduce forward-compatible changes: query parameters and response properties may be added in responses, but existing properties may not be changed or removed. One exception to this is the addition of new turn types, which we see as forward-compatible changes.
What we guarantee on patch version changes:
- Forward-compatible HTTP API
- Forward-compatible C++ library API
- Forward-compatible node-osrm API
- No compatiblity between OSRM datasets (needs new processing)
- HTTP API does not include breaking changes
- C++ library API does not include breaking changes
- node-osrm API does not include breaking changes
- full file format compatibility
### Patch version change
## Major or Minor release x.y
- No change of query parameters or response formats
- Compatible HTTP API
- Compatible C++ library API
- Compatible node-osrm API
- Compatible OSRM datasets
1. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
## Release and branch management
- The `master` branch is for the bleeding edge development
- We create and maintain release branches `x.y` to control the release flow
- We create the release branch once we create release branches once we want to release the first RC
- RCs go in the release branch, commits needs to be cherry-picked from master
- No minor or major version will be released without a code-equal release candidates
- For quality assurance, release candidates need to be staged beforing tagging a final release
- Patch versions may be released without a release candidate
- We may backport fixes to older versions and release them as patch versions
## Releasing a version
1. Check out the appropriate release branch `x.y`
2. Make sure `CHANGELOG.md` is up to date.
3. Make sure the OSRM version in `CMakeLists.txt` is up to date
4. Use an annotated tag to mark the release: `git tag vx.y.0 -a` Body of the tag description should be the changelog entries.
5. Push tags and commits: `git push; git push --tags`
6. Branch of the `vx.y.0` tag to create a release branch `x.y`:
`git branch x.y. vx.y.0; git push -u x.y:origin/x.y`
7. Modify `.travis.yml` to allow builds for the `x.y` branch.
8. Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
## Patch release x.y.z
1. Check out the appropriate release branch x.y
2. Make sure all fixes are listed in the changelog and included in the branch
3. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
4. Make sure the OSRM version in `CMakeLists.txt` is up to date
5. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries.
6. Push tags and commits: `git push; git push --tags`
7. Proceede with the `node-osrm` release as outlined in the repository.
8. Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
3. Make sure the `package.json` on branch `x.y` has been committed.
4. Make sure all tests are passing (e.g. Github Actions CI gives you a :heavy_check_mark:)
5. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries. Commit should be one in which the `package.json` version matches the version you want to release.
6. Use `npm run docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory
7. Push tags and commits: `git push; git push --tags`
8. On https://github.com/Project-OSRM/osrm-backend/releases press `Draft a new release`,
write the release tag `vx.y.z` in the `Tag version` field, write the changelog entries in the `Describe this release` field
and press `Publish release`. Note that Github Actions CI deployments will create a release when publishing node binaries, so the release
may already exist. In which case the description should be updated with the changelog entries.
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
10. Wait until the Github Actions build has been completed and check if the node binaries were published by doing:
`rm -rf node_modules && npm install` locally.
11. For final releases run `npm publish` or `npm publish --tag next` for release candidates.
12. Bump version in `package.json` to `{MAJOR}.{MINOR+1}.0-unreleased` on the `master` branch after the release.

14
docs/routed.md Normal file
View File

@ -0,0 +1,14 @@
## Environment Variables
### SIGNAL_PARENT_WHEN_READY
If the SIGNAL_PARENT_WHEN_READY environment variable is set osrm-routed will
send the USR1 signal to its parent when it will be running and waiting for
requests. This could be used to upgrade osrm-routed to a new binary on the fly
without any service downtime - no incoming requests will be lost.
### DISABLE_ACCESS_LOGGING
If the DISABLE_ACCESS_LOGGING environment variable is set osrm-routed will
**not** log any http requests to standard output. This can be useful in high
traffic setup.

16
docs/src/content.js Normal file
View File

@ -0,0 +1,16 @@
var fs = require('fs');
/**
* This file exports the content of your website, as a bunch of concatenated
* Markdown files. By doing this explicitly, you can control the order
* of content without any level of abstraction.
*
* Using the brfs module, fs.readFileSync calls in this file are translated
* into strings of those files' content before the file is delivered to a
* browser: the content is read ahead-of-time and included in bundle.js.
*/
module.exports =
'# HTTP API\n' +
fs.readFileSync('./content/http.md', 'utf8') + '\n'+
'# libosrm C++ API\n' +
fs.readFileSync('./content/libosrm.md', 'utf8') + '\n';

16
docs/src/index.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=11' />
<title>OSRM API Documentation</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link href='css/base.css' rel='stylesheet' />
<link href='css/style.css' rel='stylesheet' />
<link href='css/railscasts.css' rel='stylesheet' />
</head>
<body>
<!--START--><div id='app'></div><!--STOP-->
<script src='bundle.js'></script>
</body>
</html>

63
docs/src/index.js Normal file
View File

@ -0,0 +1,63 @@
'use strict';
/**
* Brand names, in order to decreasing length, for different
* media queries.
*/
module.exports.brandNames = {
desktop: 'OSRM API Documentation',
tablet: 'OSRM API Docs',
mobile: 'OSRM API'
};
/**
* Classes that define the top-left brand box.
*/
module.exports.brandClasses = 'fill-red';
/**
* Text for the link back to the linking website.
*/
module.exports.backLink = 'Back to project-osrm.org';
/**
* Runs after highlighting code samples. You can use this
* hook to, for instance, highlight a token and link it
* to some canonical part of documentation.
*/
module.exports.postHighlight = function(html) {
return html;
};
/**
* Highlight tokens in endpoint URLs, optionally linking to documentation
* or adding detail. This is the equivalent of postHighlight but it
* operates on endpoint URLs only.
*/
function highlightTokens(str) {
return str.replace(/{[\w_]+}/g,
(str) => '<span class="strong">' + str + '</span>');
}
/**
* Transform endpoints given as strings in a highlighted block like
*
* ```endpoint
* GET /foo/bar
* ```
*
* Into HTML nodes that format those endpoints in nice ways.
*/
module.exports.transformURL = function(value) {
let parts = value.split(/\s+/);
return {
type: 'html',
value: `<div class='endpoint dark fill-dark round '>
<div class='round-left pad0y pad1x fill-lighten0 code small endpoint-method'>${parts[0]}</div>
<div class='pad0 code small endpoint-url'>${highlightTokens(parts[1])}</div>
</div>`
};
};
module.exports.remarkPlugins = [];

View File

@ -1,6 +1,6 @@
# Testsuite
OSRM comes with a testsuite containing both unit-tests using the Boost library and cucucmber.js for scenario driven testing.
OSRM comes with a testsuite containing both unit-tests using the Boost library and cucumber.js for scenario driven testing.
## Unit Tests
@ -28,6 +28,23 @@ This dataset is a small extract and may not even contain all tags or edge cases.
Furthermore this dataset is not in sync with what you see in up-to-date OSM maps or on the demo server.
See the library tests for how to add new dataset dependent tests.
To prepare the test data simply `cd test/data/` and then run `make`.
### Running Tests
To build the unit tests:
```
cd build
cmake ..
make tests
```
You should see the compiled binaries in `build/unit_tests`, you can then run each suite individually:
```
./engine-tests
```
## Cucumber
@ -55,7 +72,9 @@ Background:
Scenario: Testbot - Straight Road
Given the node map
| a | b | c | d |
"""
a b c d
"""
And the ways
| nodes | highway |
@ -92,7 +111,9 @@ Background:
Scenario: Testbot - Straight Road
Given the node map
| a | b | c | d |
"""
a b c d
"""
And the ways
| nodes | highway | name |
@ -117,8 +138,10 @@ Background:
Scenario: Testbot - Straight Road
Given the node map
| a | b |
| d | c |
"""
a b
d c
"""
And the ways
| nodes | highway | name |
@ -140,8 +163,10 @@ Background:
Scenario: Testbot - Straight Road
Given the node map
| a | b | e |
| d | c | |
"""
a b e
d c
"""
And the ways
| nodes | highway | name |
@ -165,8 +190,10 @@ Scenario: Enter and Exit mini roundabout with sharp angle # features/guidance/
Given the profile "car" # features/step_definitions/data.js:8
Given a grid size of 10 meters # features/step_definitions/data.js:20
Given the node map # features/step_definitions/data.js:45
| a | b | |
| | c | d |
"""
a b
c d
"""
And the ways # features/step_definitions/data.js:128
| nodes | highway | name |
| ab | tertiary | MySt |
@ -195,9 +222,11 @@ OSRM converts the grid into a so called edge-based graph.
```
Scenario: Testbot - Intersection
Given the node map
| | e | |
| b | a | d |
| | c | |
"""
e
b a d
c
"""
And the ways
| nodes | highway | oneway |
@ -213,11 +242,13 @@ To guarantee discovery, use:
```
Scenario: Testbot - Intersection
Given the node map
| | | e | | |
| | | 4 | | |
| b | 1 | a | 3 | d |
| | | 2 | | |
| | | c | | |
"""
e
4
b 1 a 3 d
2
c
"""
And the ways
| nodes | highway | oneway |
@ -237,3 +268,139 @@ If you are testing for a duration metric, allow for a tiny offset to ensure a pa
#### Don't Rely on Alternatives
Alternative route discovery is a random feature in itself. The discovery of routes depends on the contraction order of roads and cannot be assumed successful, ever.
### Understanding Turn Restrictions
Adding turn restrictions requires the restriction to follow a very specific format.
We specify them in a table with the header `| type | way:from | way:to | node:via | restriction |`.
It is important that turn restrictions require micro segmentation.
Consider the following scenario:
```
Given the node map:
"""
e
|
a - - b - - c
|
d
"""
And the ways
| nodes | oneway |
| abc | yes |
| ebd | yes |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | abc | ebd | b | no_right_turn |
```
The setting looks perfectly fine at first glance. However, it is not well defined.
The forbidden right turn could be either a superfluous addition, forbidding the turn `cb` to `be`, or actually refer to the turn `ab` to `bd` to say that a turn is forbidden here.
To model turn-restrictions correctly and uniquely, we need to split segments that contribute to the restriction into the smallest possible parts.
E.g. the above scenario could correctly be expressed as:
```
Given the node map:
"""
e
|
a - - b - - c
|
d
"""
And the ways
| nodes | oneway | name |
| ab | yes | abc |
| bc | yes | abc |
| eb | yes | ebd |
| bd | yes | ebd |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | ab | bd | b | no_right_turn |
```
Unless this format is used, OSRM will omit the (then ambiguous) turn restrictions and ignore them.
## My Guidance Tests are Failing - Understanding what you can change
If you change some stuff in guidance, you will easily see tests change their result. E.g. if you change the angles for which we report `right`, then obviously some tests might not report a `direction modifier` named `right` anymore.
This small section will try to guide you in making the correct decisions for changing the behaviour of tests.
The difficulty in guidance tests is that not all items can be translated 1:1 from the ascii art into turn-angles.
The turn-angle calculation tries to find turn angles that would represent perceived turn angles, not the exact angle at the connection.
This is necessary, since connections in OSM are always bound by the paradigm that the way is supposed to be in the middle of the actual road.
For broad streets, you will see stronger angles than the actual turns.
### Don't change the test, change the expected behaviour
If we have a test that looks like this:
```
Given a grid size of 5 m
Given the node map
"""
a - b - - - - - - c
\
d - - - - - e
"""
When I route I should get
| waypoints | route | turns |
| a,e | abc,bde,bde | depart,turn slight right,arrive|
```
And the test reports `turn right` for the route `a->e`, where before it said `slight right`.
If you change the turn angles, obviously you can expect changes in the distinction between `slight right` and `right`.
In such a case it is, of course, reasonable to change the expected route to report `right` instead of `slight right`. You should consider inspecting the actual turn angles at `b` to see if you feel that change is justified.
However, you should never adjust the test itself.
If you look at a failure, the other way around
```
Given a grid size of 5 m
Given the node map
"""
a - b - - - - - - c
\
d - - - - - e
"""
When I route I should get
| waypoints | route | turns |
| a,e | abc,bde,bde | depart,turn right,arrive|
```
where we see a `slight right`, over the expected `right`.
We could be tempted to adjust the grid size (e.g. from `10 m` to `20` meters).
Such a change would fundamentally alter the tests, though.
Since the part `b-d` is a short offset, when we are looking at a grid of size `5 m`, the angle calculation will try and compensate for this offset.
In this case we would see a very slight turn angle. If your change now reports different turn angles, you can of course change the expected result. But you should not adjust the grid size. The test would be testing turn angles of `180` and `100` degrees, instead of `180` and `160`.
### Consider Post-Processing Impacts
Some changes you might see could look completely unrelated. To understand the impact of your changes, you can make use of the debugging utilities you can find in `util/debug.hpp` (and potentially other related headers).
If your test is inspecting a series of turns (remember, a turn does not necessarily equals an instruction), you could see interaction with post-processing.
To see the unprocessed turns, you should print the steps at the end of step assembly (`assembleSteps` in `engine/guidance/assemble_steps.hpp`).
If you see unexpected changes, you can consider adding the `locations` field to your test to study what location a turn is reported at.
To study a test without post-processing impacts, you can create a copy of the case on a very large grid (like 2000 meters). In such a grid, `turn collapsing` would be essentially disable.
Sadly, there is no general guideline.
### Use Caution
If in doubt, ask another person. Inspect as much of the data as possible (e.g. print un-collapsed steps, turn angles and so on) and use your best judgement, if the new result seems justified.

31
docs/windows-deps.md Normal file
View File

@ -0,0 +1,31 @@
# Building OSRM for Windows
There is experimental support for building OSRM on Windows.
## Dependencies
You will need a modern Windows development stack (e.g. Visual Studio 17). The published binaries are built with
[Windows Server 2022](https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md) Github hosted runners.
Dependencies are managed via [Conan](https://conan.io/) and built with [CMake](https://cmake.org/).
## Building
```bat
cmake -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "Visual Studio 17 2022" ..
msbuild OSRM.sln ^
/p:Configuration=%CONFIGURATION% ^
/p:Platform=x64 ^
/t:rebuild ^
/p:BuildInParallel=true ^
/m:%NUMBER_OF_PROCESSORS% ^
/toolsversion:Current ^
/clp:Verbosity=normal ^
/nologo
```

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.8)
cmake_minimum_required(VERSION 3.18)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND NOT MSVC_IDE)
message(FATAL_ERROR "In-source builds are not allowed.
@ -12,18 +12,16 @@ endif()
project(osrm-example C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(bitness 32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(bitness 64)
message(STATUS "Building on a 64 bit system")
else()
message(WARNING "Building on a 32 bit system is unsupported")
endif()
if(WIN32 AND MSVC_VERSION LESS 1900)
message(FATAL_ERROR "Building with Microsoft compiler needs Latest Visual Studio 2015 (Community or better)")
message(STATUS "Building on a 32 bit system")
endif()
link_directories(${LibOSRM_LIBRARY_DIRS})
@ -33,4 +31,4 @@ find_package(LibOSRM REQUIRED)
target_link_libraries(osrm-example ${LibOSRM_LIBRARIES} ${LibOSRM_DEPENDENT_LIBRARIES})
include_directories(SYSTEM ${LibOSRM_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS ${LibOSRM_CXXFLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LibOSRM_CXXFLAGS}")

View File

@ -1,283 +0,0 @@
# Locate Intel Threading Building Blocks include paths and libraries
# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
# Florian Uhlig <F.Uhlig _at_ gsi.de>,
# Jiri Marsik <jiri.marsik89 _at_ gmail.com>
# The MIT License
#
# Copyright (c) 2011 Hannes Hofmann
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
# e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
# TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
# in the TBB installation directory (TBB_INSTALL_DIR).
#
# GvdB: Mac OS X distribution places libraries directly in lib directory.
#
# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
# which architecture to use
# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
# which compiler to use (detected automatically on Windows)
# This module respects
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
# This module defines
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
# TBB_INSTALL_DIR, the base TBB install directory
# TBB_LIBRARIES, the libraries to link against to use TBB.
# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
# TBB_FOUND, If false, don't try to use TBB.
# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
if (WIN32)
# has em64t/vc8 em64t/vc9
# has ia32/vc7.1 ia32/vc8 ia32/vc9
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
set(_TBB_LIB_NAME "tbb")
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
if (MSVC71)
set (_TBB_COMPILER "vc7.1")
endif(MSVC71)
if (MSVC80)
set(_TBB_COMPILER "vc8")
endif(MSVC80)
if (MSVC90)
set(_TBB_COMPILER "vc9")
endif(MSVC90)
if(MSVC10)
set(_TBB_COMPILER "vc10")
endif(MSVC10)
# Todo: add other Windows compilers such as ICL.
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
endif (WIN32)
if (UNIX)
if (APPLE)
# MAC
set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
# libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
set(_TBB_LIB_NAME "tbb")
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
# default flavor on apple: ia32/cc4.0.1_os10.4.9
# Jiri: There is no reason to presume there is only one flavor and
# that user's setting of variables should be ignored.
if(NOT TBB_COMPILER)
set(_TBB_COMPILER "cc4.0.1_os10.4.9")
elseif (NOT TBB_COMPILER)
set(_TBB_COMPILER ${TBB_COMPILER})
endif(NOT TBB_COMPILER)
if(NOT TBB_ARCHITECTURE)
set(_TBB_ARCHITECTURE "ia32")
elseif(NOT TBB_ARCHITECTURE)
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
endif(NOT TBB_ARCHITECTURE)
else (APPLE)
# LINUX
set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
set(_TBB_LIB_NAME "tbb")
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
# has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
# has ia32/*
# has itanium/*
set(_TBB_COMPILER ${TBB_COMPILER})
set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
endif (APPLE)
endif (UNIX)
if (CMAKE_SYSTEM MATCHES "SunOS.*")
# SUN
# not yet supported
# has em64t/cc3.4.3_kernel5.10
# has ia32/*
endif (CMAKE_SYSTEM MATCHES "SunOS.*")
#-- Clear the public variables
set (TBB_FOUND "NO")
#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
# first: use CMake variable TBB_INSTALL_DIR
if (TBB_INSTALL_DIR)
set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
endif (TBB_INSTALL_DIR)
# second: use environment variable
if (NOT _TBB_INSTALL_DIR)
if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
# Intel recommends setting TBB21_INSTALL_DIR
if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
endif (NOT _TBB_INSTALL_DIR)
# third: try to find path automatically
if (NOT _TBB_INSTALL_DIR)
if (_TBB_DEFAULT_INSTALL_DIR)
set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
endif (_TBB_DEFAULT_INSTALL_DIR)
endif (NOT _TBB_INSTALL_DIR)
# sanity check
if (NOT _TBB_INSTALL_DIR)
message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
else (NOT _TBB_INSTALL_DIR)
# finally: set the cached CMake variable TBB_INSTALL_DIR
if (NOT TBB_INSTALL_DIR)
set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
mark_as_advanced(TBB_INSTALL_DIR)
endif (NOT TBB_INSTALL_DIR)
#-- A macro to rewrite the paths of the library. This is necessary, because
# find_library() always found the em64t/vc9 version of the TBB libs
macro(TBB_CORRECT_LIB_DIR var_name)
# if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
# endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
endmacro(TBB_CORRECT_LIB_DIR var_content)
#-- Look for include directory and set ${TBB_INCLUDE_DIR}
set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
# Jiri: tbbvars now sets the CPATH environment variable to the directory
# containing the headers.
find_path(TBB_INCLUDE_DIR
tbb/task_scheduler_init.h
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
)
mark_as_advanced(TBB_INCLUDE_DIR)
#-- Look for libraries
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
set (_TBB_LIBRARY_DIR
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
)
endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
# Jiri: This block isn't mutually exclusive with the previous one
# (hence no else), instead I test if the user really specified
# the variables in question.
if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
# HH: deprecated
message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
# Jiri: It doesn't hurt to look in more places, so I store the hints from
# ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
# variables and search them both.
set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
# GvdB: Mac OS X distribution places libraries directly in lib directory.
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
# Jiri: No reason not to check the default paths. From recent versions,
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
# variables, which now point to the directories of the lib files.
# It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
# argument instead of the implicit PATHS as it isn't hard-coded
# but computed by system introspection. Searching the LIBRARY_PATH
# and LD_LIBRARY_PATH environment variables is now even more important
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
# the use of TBB built from sources.
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
#Extract path from TBB_LIBRARY name
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
#-- Look for debug libraries
# Jiri: Changed the same way as for the release libraries.
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
# Extract path from TBB_LIBRARY_DEBUG name
get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
if (TBB_INCLUDE_DIR)
if (TBB_LIBRARY)
set (TBB_FOUND "YES")
set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
message(STATUS "Found Intel TBB")
endif (TBB_LIBRARY)
endif (TBB_INCLUDE_DIR)
if (NOT TBB_FOUND)
message("ERROR: Intel TBB NOT found!")
message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
# do only throw fatal, if this pkg is REQUIRED
if (TBB_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find TBB library.")
endif (TBB_FIND_REQUIRED)
endif (NOT TBB_FOUND)
endif (NOT _TBB_INSTALL_DIR)
if (TBB_FOUND)
set(TBB_INTERFACE_VERSION 0)
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
endif (TBB_FOUND)

1
example/cmake/FindTBB.cmake Symbolic link
View File

@ -0,0 +1 @@
../../cmake/FindTBB.cmake

View File

@ -18,7 +18,7 @@
#include <cstdlib>
int main(int argc, const char *argv[]) try
int main(int argc, const char *argv[])
{
if (argc < 2)
{
@ -30,36 +30,45 @@ int main(int argc, const char *argv[]) try
// Configure based on a .osrm base path, and no datasets in shared mem from osrm-datastore
EngineConfig config;
config.storage_config = {argv[1]};
config.use_shared_memory = false;
// We support two routing speed up techniques:
// - Contraction Hierarchies (CH): requires extract+contract pre-processing
// - Multi-Level Dijkstra (MLD): requires extract+partition+customize pre-processing
//
// config.algorithm = EngineConfig::Algorithm::CH;
config.algorithm = EngineConfig::Algorithm::MLD;
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
OSRM osrm{config};
const OSRM osrm{config};
// The following shows how to use the Route service; configure this service
RouteParameters params;
// Route in monaco
params.coordinates.push_back({util::FloatLongitude(7.419758), util::FloatLatitude(43.731142)});
params.coordinates.push_back({util::FloatLongitude(7.419505), util::FloatLatitude(43.736825)});
params.coordinates.push_back({util::FloatLongitude{7.419758}, util::FloatLatitude{43.731142}});
params.coordinates.push_back({util::FloatLongitude{7.419505}, util::FloatLatitude{43.736825}});
// Response is in JSON format
json::Object result;
engine::api::ResultT result = json::Object();
// Execute routing request, this does the heavy lifting
const auto status = osrm.Route(params, result);
auto &json_result = std::get<json::Object>(result);
if (status == Status::Ok)
{
auto &routes = result.values["routes"].get<json::Array>();
auto &routes = std::get<json::Array>(json_result.values["routes"]);
// Let's just use the first route
auto &route = routes.values.at(0).get<json::Object>();
const auto distance = route.values["distance"].get<json::Number>().value;
const auto duration = route.values["duration"].get<json::Number>().value;
auto &route = std::get<json::Object>(routes.values.at(0));
const auto distance = std::get<json::Number>(route.values["distance"]).value;
const auto duration = std::get<json::Number>(route.values["duration"]).value;
// Warn users if extract does not contain the default Berlin coordinates from above
if (distance == 0 or duration == 0)
// Warn users if extract does not contain the default coordinates from above
if (distance == 0 || duration == 0)
{
std::cout << "Note: distance or duration is zero. ";
std::cout << "You are probably doing a query outside of the OSM extract.\n\n";
@ -67,19 +76,15 @@ int main(int argc, const char *argv[]) try
std::cout << "Distance: " << distance << " meter\n";
std::cout << "Duration: " << duration << " seconds\n";
return EXIT_SUCCESS;
}
else if (status == Status::Error)
{
const auto code = result.values["code"].get<json::String>().value;
const auto message = result.values["message"].get<json::String>().value;
const auto code = std::get<json::String>(json_result.values["code"]).value;
const auto message = std::get<json::String>(json_result.values["message"]).value;
std::cout << "Code: " << code << "\n";
std::cout << "Message: " << code << "\n";
return EXIT_FAILURE;
}
}
catch (const std::exception &e)
{
std::cerr << "Error: " << e.what() << std::endl;
return EXIT_FAILURE;
}

32
example/example.js Normal file
View File

@ -0,0 +1,32 @@
process.env.UV_THREADPOOL_SIZE = Math.ceil(require('os').cpus().length * 1.5);
var express = require('express');
var OSRM = require('..');
var path = require('path');
var app = express();
var osrm = new OSRM(path.join(__dirname,"../test/data/ch/monaco.osrm"));
// Accepts a query like:
// http://localhost:8888?start=13.414307,52.521835&end=13.402290,52.523728
app.get('/', function(req, res) {
if (!req.query.start || !req.query.end) {
return res.json({"error":"invalid start and end query"});
}
var coordinates = [];
var start = req.query.start.split(',');
coordinates.push([+start[0],+start[1]]);
var end = req.query.end.split(',');
coordinates.push([+end[0],+end[1]]);
var query = {
coordinates: coordinates,
alternateRoute: req.query.alternatives !== 'false'
};
osrm.route(query, function(err, result) {
if (err) return res.json({"error":err.message});
return res.json(result);
});
});
console.log('Listening on port: ' + 8888);
app.listen(8888);

View File

@ -7,170 +7,180 @@ Feature: Bike - Access tags on ways
Scenario: Bike - Access tag hierarchy on ways
Then routability should be
| highway | access | vehicle | bicycle | bothw |
| | | | | x |
| | yes | | | x |
| | no | | | |
| | | yes | | x |
| | | no | | |
| | no | yes | | x |
| | yes | no | | |
| | | | yes | x |
| | | | no | |
| | no | | yes | x |
| | yes | | no | |
| | | no | yes | x |
| | | yes | no | |
| runway | | | | |
| runway | yes | | | x |
| runway | no | | | |
| runway | | yes | | x |
| runway | | no | | |
| runway | no | yes | | x |
| runway | yes | no | | |
| runway | | | yes | x |
| runway | | | no | |
| runway | no | | yes | x |
| runway | yes | | no | |
| runway | | no | yes | x |
| runway | | yes | no | |
| highway | access | vehicle | bicycle | bothw |
| primary | | | | cycling |
| primary | yes | | | cycling |
| primary | no | | | |
| primary | | yes | | cycling |
| primary | | no | | |
| primary | no | yes | | cycling |
| primary | yes | no | | |
| primary | | | yes | cycling |
| primary | | | no | |
| primary | no | | yes | cycling |
| primary | yes | | no | |
| primary | | no | yes | cycling |
| primary | | yes | no | |
@todo
Scenario: Bike - Access tag in forward direction
Then routability should be
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
| | | | | x | |
| | yes | | | x | |
| | no | | | | |
| | | yes | | x | |
| | | no | | | |
| | no | yes | | x | |
| | yes | no | | | |
| | | | yes | x | |
| | | | no | | |
| | no | | yes | x | |
| | yes | | no | | |
| | | no | yes | x | |
| | | yes | no | | |
| runway | | | | x | |
| runway | yes | | | x | |
| runway | no | | | | |
| runway | | yes | | x | |
| runway | | no | | | |
| runway | no | yes | | x | |
| runway | yes | no | | | |
| runway | | | yes | x | |
| runway | | | no | | |
| runway | no | | yes | x | |
| runway | yes | | no | | |
| runway | | no | yes | x | |
| runway | | yes | no | | |
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
| primary | | | | cycling | |
| primary | yes | | | cycling | |
| primary | no | | | | |
| primary | | yes | | cycling | |
| primary | | no | | | |
| primary | no | yes | | cycling | |
| primary | yes | no | | | |
| primary | | | yes | cycling | |
| primary | | | no | | |
| primary | no | | yes | cycling | |
| primary | yes | | no | | |
| primary | | no | yes | cycling | |
| primary | | yes | no | | |
| runway | | | | cycling | |
| runway | yes | | | cycling | |
| runway | no | | | | |
| runway | | yes | | cycling | |
| runway | | no | | | |
| runway | no | yes | | cycling | |
| runway | yes | no | | | |
| runway | | | yes | cycling | |
| runway | | | no | | |
| runway | no | | yes | cycling | |
| runway | yes | | no | | |
| runway | | no | yes | cycling | |
| runway | | yes | no | | |
@todo
Scenario: Bike - Access tag in backward direction
Then routability should be
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
| | | | | | x |
| | yes | | | | x |
| | no | | | | |
| | | yes | | | x |
| | | no | | | |
| | no | yes | | | x |
| | yes | no | | | |
| | | | yes | | x |
| | | | no | | |
| | no | | yes | | x |
| | yes | | no | | |
| | | no | yes | | x |
| | | yes | no | | |
| runway | | | | | x |
| runway | yes | | | | x |
| runway | no | | | | |
| runway | | yes | | | x |
| runway | | no | | | |
| runway | no | yes | | | x |
| runway | yes | no | | | |
| runway | | | yes | | x |
| runway | | | no | | |
| runway | no | | yes | | x |
| runway | yes | | no | | |
| runway | | no | yes | | x |
| runway | | yes | no | | |
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
| primary | | | | | cycling |
| primary | yes | | | | cycling |
| primary | no | | | | |
| primary | | yes | | | cycling |
| primary | | no | | | |
| primary | no | yes | | | cycling |
| primary | yes | no | | | |
| primary | | | yes | | cycling |
| primary | | | no | | |
| primary | no | | yes | | cycling |
| primary | yes | | no | | |
| primary | | no | yes | | cycling |
| primary | | yes | no | | |
| runway | | | | | cycling |
| runway | yes | | | | cycling |
| runway | no | | | | |
| runway | | yes | | | cycling |
| runway | | no | | | |
| runway | no | yes | | | cycling |
| runway | yes | no | | | |
| runway | | | yes | | cycling |
| runway | | | no | | |
| runway | no | | yes | | cycling |
| runway | yes | | no | | |
| runway | | no | yes | | cycling |
| runway | | yes | no | | |
Scenario: Bike - Overwriting implied acccess on ways
Then routability should be
| highway | access | vehicle | bicycle | bothw |
| cycleway | | | | x |
| runway | | | | |
| cycleway | no | | | |
| cycleway | | no | | |
| cycleway | | | no | |
| runway | yes | | | x |
| runway | | yes | | x |
| runway | | | yes | x |
| highway | access | vehicle | bicycle | bothw |
| cycleway | | | | cycling |
| runway | | | | |
| cycleway | no | | | |
| cycleway | | no | | |
| cycleway | | | no | |
| runway | yes | | | cycling |
| runway | | yes | | cycling |
| runway | | | yes | cycling |
Scenario: Bike - Access tags on ways
Then routability should be
| access | vehicle | bicycle | bothw |
| | | | x |
| yes | | | x |
| permissive | | | x |
| designated | | | x |
| some_tag | | | x |
| no | | | |
| private | | | |
| agricultural | | | |
| forestry | | | |
| delivery | | | |
| | yes | | x |
| | permissive | | x |
| | designated | | x |
| | some_tag | | x |
| | no | | |
| | private | | |
| | agricultural | | |
| | forestry | | |
| | delivery | | |
| | | yes | x |
| | | permissive | x |
| | | designated | x |
| | | some_tag | x |
| | | no | |
| | | private | |
| | | agricultural | |
| | | forestry | |
| | | delivery | |
| access | vehicle | bicycle | bothw |
| | | | cycling |
| yes | | | cycling |
| permissive | | | cycling |
| designated | | | cycling |
| some_tag | | | cycling |
| no | | | |
| private | | | |
| agricultural | | | |
| forestry | | | |
| delivery | | | |
| | yes | | cycling |
| | permissive | | cycling |
| | designated | | cycling |
| | some_tag | | cycling |
| | no | | |
| | private | | |
| | agricultural | | |
| | forestry | | |
| | delivery | | |
| | | yes | cycling |
| | | permissive | cycling |
| | | designated | cycling |
| | | some_tag | cycling |
| | | no | |
| | | private | |
| | | agricultural | |
| | | forestry | |
| | | delivery | |
| | | use_sidepath | |
Scenario: Bike - Access tags on both node and way
Then routability should be
| access | node/access | bothw |
| yes | yes | x |
| yes | no | |
| yes | some_tag | x |
| no | yes | |
| no | no | |
| no | some_tag | |
| some_tag | yes | x |
| some_tag | no | |
| some_tag | some_tag | x |
| access | node/access | bothw |
| yes | yes | cycling |
| yes | no | |
| yes | some_tag | cycling |
| no | yes | |
| no | no | |
| no | some_tag | |
| some_tag | yes | cycling |
| some_tag | no | |
| some_tag | some_tag | cycling |
Scenario: Bike - Access combinations
Then routability should be
| highway | access | vehicle | bicycle | forw | backw |
| runway | private | | yes | x | x |
| footway | | no | permissive | x | x |
| motorway | | | yes | x | |
| track | forestry | | permissive | x | x |
| cycleway | yes | designated | no | | |
| primary | | yes | private | | |
| residential | permissive | | no | | |
| highway | access | vehicle | bicycle | forw | backw |
| runway | private | | yes | cycling | cycling |
| footway | | no | permissive | cycling | cycling |
| motorway | | | yes | cycling | |
| track | forestry | | permissive | cycling | cycling |
| cycleway | yes | designated | no | | |
| primary | | yes | private | | |
| residential | permissive | | no | | |
Scenario: Bike - Ignore access tags for other modes
Then routability should be
| highway | boat | motor_vehicle | moped | bothw |
| river | yes | | | |
| cycleway | no | | | x |
| runway | | yes | | |
| cycleway | | no | | x |
| runway | | | yes | |
| cycleway | | | no | x |
| highway | boat | motor_vehicle | moped | bothw |
| river | yes | | | |
| cycleway | no | | | cycling |
| runway | | yes | | |
| cycleway | | no | | cycling |
| runway | | | yes | |
| cycleway | | | no | cycling |
Scenario: Bike - Bridleways when access is explicit
Then routability should be
| highway | horse | foot | bicycle | bothw |
| bridleway | | | yes | cycling |
| bridleway | | yes | | pushing bike |
| bridleway | designated | | | |
| bridleway | | | | |
Scenario: Bike - Tram with oneway when access is implicit
Then routability should be
| highway | railway | access | oneway | forw | backw |
| residential | tram | | yes | cycling | pushing bike |
| service | tram | psv | yes | cycling | pushing bike |
Scenario: Bike - Access combinations
Then routability should be
| highway | access | bothw |
| primary | permissive | cycling |
| steps | permissive | cycling |
| footway | permissive | cycling |
| garbagetag | permissive | cycling |

View File

@ -7,62 +7,62 @@ Feature: Bike - Access tags on nodes
Scenario: Bike - Access tag hierarchy on nodes
Then routability should be
| node/access | node/vehicle | node/bicycle | node/highway | bothw |
| | | | | x |
| yes | | | | x |
| no | | | | |
| | yes | | | x |
| | no | | | |
| no | yes | | | x |
| yes | no | | | |
| | | yes | | x |
| | | no | | |
| | | no | crossing | x |
| no | | yes | | x |
| yes | | no | | |
| | no | yes | | x |
| | yes | no | | |
| node/access | node/vehicle | node/bicycle | node/highway | bothw |
| | | | | cycling |
| yes | | | | cycling |
| no | | | | |
| | yes | | | cycling |
| | no | | | |
| no | yes | | | cycling |
| yes | no | | | |
| | | yes | | cycling |
| | | no | | |
| | | no | crossing | cycling |
| no | | yes | | cycling |
| yes | | no | | |
| | no | yes | | cycling |
| | yes | no | | |
Scenario: Bike - Overwriting implied acccess on nodes doesn't overwrite way
Then routability should be
| highway | node/access | node/vehicle | node/bicycle | bothw |
| cycleway | | | | x |
| runway | | | | |
| cycleway | no | | | |
| cycleway | | no | | |
| cycleway | | | no | |
| runway | yes | | | |
| runway | | yes | | |
| runway | | | yes | |
| highway | node/access | node/vehicle | node/bicycle | bothw |
| cycleway | | | | cycling |
| runway | | | | |
| cycleway | no | | | |
| cycleway | | no | | |
| cycleway | | | no | |
| runway | yes | | | |
| runway | | yes | | |
| runway | | | yes | |
Scenario: Bike - Access tags on nodes
Then routability should be
| node/access | node/vehicle | node/bicycle | bothw |
| | | | x |
| yes | | | x |
| permissive | | | x |
| designated | | | x |
| some_tag | | | x |
| no | | | |
| private | | | |
| agricultural | | | |
| forestry | | | |
| delivery | | | |
| | yes | | x |
| | permissive | | x |
| | designated | | x |
| | some_tag | | x |
| | no | | |
| | private | | |
| | agricultural | | |
| | forestry | | |
| | delivery | | |
| | | yes | x |
| | | permissive | x |
| | | designated | x |
| | | some_tag | x |
| | | no | |
| | | private | |
| | | agricultural | |
| | | forestry | |
| | | delivery | |
| node/access | node/vehicle | node/bicycle | bothw |
| | | | cycling |
| yes | | | cycling |
| permissive | | | cycling |
| designated | | | cycling |
| some_tag | | | cycling |
| no | | | |
| private | | | |
| agricultural | | | |
| forestry | | | |
| delivery | | | |
| | yes | | cycling |
| | permissive | | cycling |
| | designated | | cycling |
| | some_tag | | cycling |
| | no | | |
| | private | | |
| | agricultural | | |
| | forestry | | |
| | delivery | | |
| | | yes | cycling |
| | | permissive | cycling |
| | | designated | cycling |
| | | some_tag | cycling |
| | | no | |
| | | private | |
| | | agricultural | |
| | | forestry | |
| | | delivery | |

View File

@ -0,0 +1,34 @@
@routing @bicycle @alley
Feature: Bicycle - Route around alleys
Background:
Given the profile file "bicycle" initialized with
"""
profile.properties.weight_name = 'cyclability'
"""
Scenario: Bicycle - Avoid taking alleys
Given the query options
| annotations | nodes |
Given the node map
"""
a-----b-----c
| : |
d.....e.....f
"""
And the ways
| nodes | highway | service |
| abc | residential | |
| def | service | alley |
| ad | residential | |
| be | service | alley |
| cf | residential | |
When I route I should get
| from | to | a:nodes | weight | # |
| a | f | 1:2:3:6 | 196.2 | Avoids d,e,f |
| a | e | 1:2:5 | 172.2 | Take the alley b,e if neccessary |
| d | f | 4:1:2:3:6 | 248.4 | Avoids the alley d,e,f |

View File

@ -7,9 +7,11 @@ Feature: Bike - Squares and other areas
@square
Scenario: Bike - Route along edge of a squares
Given the node map
| x | |
| a | b |
| d | c |
"""
x
a b
d c
"""
And the ways
| nodes | area | highway |
@ -30,9 +32,11 @@ Feature: Bike - Squares and other areas
@building
Scenario: Bike - Don't route on buildings
Given the node map
| x | |
| a | b |
| d | c |
"""
x
a b
d c
"""
And the ways
| nodes | highway | area | building | access |
@ -53,9 +57,11 @@ Feature: Bike - Squares and other areas
@parking
Scenario: Bike - parking areas
Given the node map
| e | | | f |
| x | a | b | y |
| | d | c | |
"""
e f
x a b y
d c
"""
And the ways
| nodes | highway | amenity |
@ -65,24 +71,26 @@ Feature: Bike - Squares and other areas
| abcda | (nil) | parking |
When I route I should get
| from | to | route |
| x | y | xa,abcda,by,by |
| y | x | by,abcda,xa,xa |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |
| from | to | route |
| x | y | xa,abcda,by |
| y | x | by,abcda,xa |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |
@train @platform
Scenario: Bike - railway platforms
Given the node map
| x | a | b | y |
| | d | c | |
"""
x a b y
d c
"""
And the ways
| nodes | highway | railway |
@ -91,14 +99,14 @@ Feature: Bike - Squares and other areas
| abcda | (nil) | platform |
When I route I should get
| from | to | route |
| x | y | xa,abcda,by,by |
| y | x | by,abcda,xa,xa |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |
| from | to | route |
| x | y | xa,abcda,by |
| y | x | by,abcda,xa |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
| c | b | abcda,abcda |
| c | d | abcda,abcda |
| d | c | abcda,abcda |
| d | a | abcda,abcda |
| a | d | abcda,abcda |

View File

@ -10,6 +10,7 @@ Feature: Barriers
| | x |
| bollard | x |
| gate | x |
| lift_gate | x |
| cycle_barrier | x |
| cattle_grid | x |
| border_control | x |
@ -18,7 +19,7 @@ Feature: Barriers
| entrance | x |
| wall | |
| fence | |
| some_tag | |
| some_tag | x |
| block | x |
Scenario: Bike - Access tag trumphs barriers

View File

@ -4,11 +4,13 @@ Feature: Bicycle - Handle cycling
Background:
Given the profile "bicycle"
Scenario: Bicycle - Use a ferry route
Scenario: Bicycle - Use a movable bridge
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
"""
a b c
d
e f g
"""
And the ways
| nodes | highway | bridge | bicycle |
@ -17,21 +19,16 @@ Feature: Bicycle - Handle cycling
| efg | primary | | |
When I route I should get
| from | to | route | modes |
| from | to | route | modes |
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
| e | c | cde,cde | cycling,cycling |
| e | b | cde,abc,abc | cycling,cycling,cycling |
| e | a | cde,abc,abc | cycling,cycling,cycling |
| c | e | cde,cde | cycling,cycling |
| c | f | cde,efg,efg | cycling,cycling,cycling |
| c | g | cde,efg,efg | cycling,cycling,cycling |
Scenario: Bicycle - Properly handle durations
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
"""
a b c
d
e f g
"""
And the ways
| nodes | highway | bridge | duration |
@ -40,8 +37,8 @@ Feature: Bicycle - Handle cycling
| efg | primary | | |
When I route I should get
| from | to | route | modes | speed |
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/h |
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 4 km/h |
| c | e | cde,cde | cycling,cycling | 2 km/h |
| e | c | cde,cde | cycling,cycling | 2 km/h |
| from | to | route | modes | speed |
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 6 km/h |
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/h |
| c | e | cde,cde | cycling,cycling | 2 km/h |
| e | c | cde,cde | cycling,cycling | 2 km/h |

View File

@ -0,0 +1,92 @@
@routing @bicycle @mode
Feature: Bicycle - Mode flag
Background:
Given the profile "bicycle"
Scenario: Bicycle - We tag ferries with a class
Given the node map
"""
a b
c d
"""
And the ways
| nodes | highway | route |
| ab | primary | |
| bc | | ferry |
| cd | primary | |
When I route I should get
| from | to | route | turns | classes |
| a | d | ab,bc,cd,cd | depart,notification right,notification left,arrive | [()],[(ferry)],[()],[()] |
| d | a | cd,bc,ab,ab | depart,notification right,notification left,arrive | [()],[(ferry)],[()],[()] |
| c | a | bc,ab,ab | depart,notification left,arrive | [(ferry)],[()],[()] |
| d | b | cd,bc,bc | depart,notification right,arrive | [()],[(ferry)],[()] |
| a | c | ab,bc,bc | depart,notification right,arrive | [()],[(ferry)],[()] |
| b | d | bc,cd,cd | depart,notification left,arrive | [(ferry)],[()],[()] |
Scenario: Bicycle - We tag tunnel with a class
Background:
Given a grid size of 200 meters
Given the node map
"""
a b
c d
"""
And the ways
| nodes | tunnel |
| ab | no |
| bc | yes |
| cd | |
When I route I should get
| from | to | route | turns | classes |
| a | d | ab,bc,cd,cd | depart,new name right,new name left,arrive | [()],[(tunnel)],[()],[()] |
Scenario: Bicycle - We tag classes without intersections
Background:
Given a grid size of 200 meters
Given the node map
"""
a b c d
"""
And the ways
| nodes | name | tunnel |
| ab | road | |
| bc | road | yes |
| cd | road | |
When I route I should get
| from | to | route | turns | classes |
| a | d | road,road | depart,arrive | [(),(tunnel),()],[()] |
Scenario: Bicycle - From roundabout on ferry
Given the node map
"""
c
/ \
a---b d---f--h
\ /
e
|
g
"""
And the ways
| nodes | oneway | highway | junction | route |
| ab | yes | service | | |
| cb | yes | service | roundabout | |
| dc | yes | service | roundabout | |
| be | yes | service | roundabout | |
| ed | yes | service | roundabout | |
| eg | yes | service | | |
| df | | | | ferry |
| fh | yes | service | | |
When I route I should get
| from | to | route | turns | classes |
| a | h | ab,df,df,fh,fh | depart,roundabout-exit-2,exit roundabout slight right,notification straight,arrive | [()],[(),()],[(ferry)],[()],[()] |

View File

@ -46,12 +46,14 @@ Feature: Bike - Cycle tracks/lanes
| primary | | | | x | x |
| motorway | | | | | |
| motorway | track | | | x | |
| motorway | opposite | | | | x |
| motorway | | track | | | x |
| motorway | | opposite | | | x |
| motorway | opposite | | | x | x |
| motorway | | track | | x | |
| motorway | | opposite | | x | x |
| motorway | | | track | x | |
| motorway | | | opposite | x | |
| motorway | | track | track | x | x |
| motorway | | | opposite | x | x |
# motorways are implicit oneways and cycleway tracks next to oneways always
# follow the oneway direction (unless tagged as opposite)
| motorway | | track | track | x | |
| motorway | | opposite | opposite | x | x |
| motorway | | track | opposite | x | x |
| motorway | | opposite | track | x | x |
@ -79,3 +81,19 @@ Feature: Bike - Cycle tracks/lanes
| residential | lane | yes | x | x |
| footway | lane | yes | x | x |
| cycleway | lane | yes | x | x |
Scenario: Bike - Cycleway on oneways, modes
Then routability should be
| highway | cycleway | oneway | forw | backw |
| motorway | track | yes | cycling | |
| residential | track | yes | cycling | pushing bike |
| cycleway | track | yes | cycling | pushing bike |
| footway | track | yes | cycling | pushing bike |
Scenario: Bike - Cycleway on oneways, speeds
Then routability should be
| highway | cycleway | oneway | forw | backw |
| motorway | track | yes | 15 km/h | |
| residential | track | yes | 15 km/h | 4 km/h +-1 |
| cycleway | track | yes | 15 km/h | 4 km/h +-1 |
| footway | track | yes | 15 km/h | 4 km/h +-1 |

View File

@ -6,10 +6,12 @@ Feature: Bike - Destination only, no passing through
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
"""
a e
b c d
x y
"""
And the ways
| nodes | access |
@ -19,22 +21,24 @@ Feature: Bike - Destination only, no passing through
| axye | |
When I route I should get
| from | to | route |
| a | b | ab,ab |
| a | c | ab,bcd,bcd |
| a | d | ab,bcd,bcd |
| a | e | axye,axye |
| e | d | de,de |
| e | c | de,bcd,bcd |
| e | b | de,bcd,bcd |
| e | a | axye,axye |
| from | to | route |
| a | b | ab,ab |
| a | c | ab,bcd |
| a | d | ab,bcd |
| a | e | axye,axye |
| e | d | de,de |
| e | c | de,bcd |
| e | b | de,bcd |
| e | a | axye,axye |
Scenario: Bike - Destination only street
Given the node map
| a | | | | e |
| | b | c | d | |
| | | | | |
| x | | | | y |
"""
a e
b c d
x y
"""
And the ways
| nodes | access |
@ -45,21 +49,23 @@ Feature: Bike - Destination only, no passing through
| axye | |
When I route I should get
| from | to | route |
| a | b | ab,ab |
| a | c | ab,bc,bc |
| a | d | ab,bc,cd,cd |
| a | e | axye,axye |
| e | d | de,de |
| e | c | de,cd,cd |
| e | b | de,cd,bc,bc |
| e | a | axye,axye |
| from | to | route |
| a | b | ab,ab |
| a | c | ab,bc |
| a | d | ab,bc,cd |
| a | e | axye,axye |
| e | d | de,de |
| e | c | de,cd,cd |
| e | b | de,cd,bc |
| e | a | axye,axye |
Scenario: Bike - Routing inside a destination only area
Given the node map
| a | | c | | e |
| | b | | d | |
| x | | | | y |
"""
a c e
b d
x y
"""
And the ways
| nodes | access |
@ -70,8 +76,8 @@ Feature: Bike - Destination only, no passing through
| axye | |
When I route I should get
| from | to | route |
| a | e | ab,bc,cd,de,de |
| e | a | de,cd,bc,ab,ab |
| b | d | bc,cd,cd |
| d | b | cd,bc,bc |
| from | to | route |
| a | e | ab,bc,cd,de |
| e | a | de,cd,bc,ab |
| b | d | bc,cd |
| d | b | cd,bc |

View File

@ -0,0 +1,35 @@
@routing @bicycle
Feature: Bike - Use distance weight
Background:
Given a grid size of 200 meters
Scenario: Bike - Check distance weight
Given the profile file
"""
local functions = require('bicycle')
functions.setup_testbot = functions.setup
functions.setup = function()
local profile = functions.setup_testbot()
profile.properties.weight_name = 'distance'
return profile
end
return functions
"""
Given the node map
"""
a-b-c
"""
And the ways
| nodes | highway |
| abc | residential |
When I route I should get
| from | to | route | weight | time | distance |
| a | b | abc,abc | 200 | 48s | 200m +-1 |
| a | c | abc,abc | 400 | 96s | 400m +-1 |

View File

@ -0,0 +1,55 @@
@routing @bicycle @exclude
Feature: Bicycle - Exclude flags
Background:
Given the profile file "bicycle" initialized with
"""
profile.excludable = Sequence { Set { 'ferry' } }
"""
Given the node map
"""
a....b~~~~~c...f
: :
d.....e
"""
And the ways
| nodes | highway | route | duration | # |
| ab | service | | | always drivable |
| bc | | ferry | 00:00:01 | not drivable for exclude=ferry, but fast. |
| bd | service | | | always drivable |
| de | service | | | always drivable |
| ec | service | | | always drivable |
| cf | service | | | always drivable |
Scenario: Bicycle - exclude nothing
When I route I should get
| from | to | route |
| a | f | ab,bc,cf,cf |
When I match I should get
| trace | matchings | duration |
| abcf | abcf | 109 |
When I request a travel time matrix I should get
| | a | f |
| a | 0 | 109 |
| f | 109 | 0 |
Scenario: Bicycle - exclude ferry
Given the query options
| exclude | ferry |
When I route I should get
| from | to | route |
| a | f | ab,bd,de,ec,cf,cf |
When I match I should get
| trace | matchings | duration |
| abcf | abcf | 301 |
When I request a travel time matrix I should get
| | a | f |
| a | 0 | 301 +- 1 |
| f | 301.2 +- 1 | 0 |

View File

@ -6,9 +6,11 @@ Feature: Bike - Handle ferry routes
Scenario: Bike - Ferry route
Given the node map
| a | b | c | | |
| | | d | | |
| | | e | f | g |
"""
a b c
d
e f g
"""
And the ways
| nodes | highway | route | bicycle |
@ -19,20 +21,17 @@ Feature: Bike - Handle ferry routes
When I route I should get
| from | to | route |
| a | g | abc,cde,efg,efg |
| b | f | abc,cde,efg,efg |
| e | c | cde,cde |
| e | b | cde,abc,abc |
| e | a | cde,abc,abc |
| c | e | cde,cde |
| c | f | cde,efg,efg |
| c | g | cde,efg,efg |
Scenario: Bike - Ferry duration, single node
Given the node map
| a | b | c | d |
| | | e | f |
| | | g | h |
| | | i | j |
"""
a b c d
e f
g h
i j
"""
And the ways
| nodes | highway | route | bicycle | duration |
@ -48,8 +47,9 @@ Feature: Bike - Handle ferry routes
Scenario: Bike - Ferry duration, multiple nodes
Given the node map
| x | | | | | y |
| | a | b | c | d | |
"""
x a b c d y
"""
And the ways
| nodes | highway | route | bicycle | duration |
@ -58,6 +58,6 @@ Feature: Bike - Handle ferry routes
| abcd | | ferry | yes | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | abcd,abcd | 3600s +-10 |
| d | a | abcd,abcd | 3600s +-10 |
| from | to | route | time |
| a | d | abcd,abcd | 3600s |
| d | a | abcd,abcd | 3600s |

View File

@ -40,7 +40,9 @@ Feature: Bike - Max speed restrictions
Scenario: Bike - Do not use maxspeed when higher that way type speed
Given the node map
| a | b | c |
"""
a b c
"""
And the ways
| nodes | highway | maxspeed |

View File

@ -6,8 +6,10 @@ Feature: Bike - Mode flag
Scenario: Bike - Mode when using a ferry
Given the node map
| a | b | |
| | c | d |
"""
a b
c d
"""
And the ways
| nodes | highway | route | duration |
@ -18,16 +20,15 @@ Feature: Bike - Mode flag
When I route I should get
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,ferry,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,ferry,cycling,cycling |
| c | a | bc,ab,ab | ferry,cycling,cycling |
| d | b | cd,bc,bc | cycling,ferry,ferry |
| a | c | ab,bc,bc | cycling,ferry,ferry |
| b | d | bc,cd,cd | ferry,cycling,cycling |
Scenario: Bike - Mode when using a train
Given the node map
| a | b | |
| | c | d |
"""
a b
c d
"""
And the ways
| nodes | highway | railway | bicycle |
@ -38,22 +39,25 @@ Feature: Bike - Mode flag
When I route I should get
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,train,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,train,cycling,cycling |
| c | a | bc,ab,ab | train,cycling,cycling |
| d | b | cd,bc,bc | cycling,train,train |
| a | c | ab,bc,bc | cycling,train,train |
| b | d | bc,cd,cd | train,cycling,cycling |
#representative test for all pushes (and mode changes). Where a bike is pushed is tested over in access.feature
Scenario: Bike - Mode when pushing bike against oneways
Given the node map
| a | b | |
| | c | d |
"""
a b e
f c d
"""
And the ways
| nodes | highway | oneway |
| ab | primary | |
| bc | primary | yes |
| cd | primary | |
| be | primary | |
| cf | primary | |
When I route I should get
| from | to | route | modes |
@ -61,92 +65,12 @@ Feature: Bike - Mode flag
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
| a | c | ab,bc,bc | cycling,cycling,cycling |
| b | d | bc,cd,cd | cycling,cycling,cycling |
Scenario: Bike - Mode when pushing on pedestrain streets
Given the node map
| a | b | |
| | c | d |
And the ways
| nodes | highway |
| ab | primary |
| bc | pedestrian |
| cd | primary |
When I route I should get
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
Scenario: Bike - Mode when pushing on pedestrain areas
Given the node map
| a | b | | |
| | c | d | f |
And the ways
| nodes | highway | area |
| ab | primary | |
| bcd | pedestrian | yes |
| df | primary | |
When I route I should get
| from | to | route | modes |
| a | f | ab,bcd,df,df | cycling,pushing bike,cycling,cycling |
| f | a | df,bcd,ab,ab | cycling,pushing bike,cycling,cycling |
| d | a | bcd,ab,ab | pushing bike,cycling,cycling |
| f | b | df,bcd,bcd | cycling,pushing bike,pushing bike |
| a | d | ab,bcd,bcd | cycling,pushing bike,pushing bike |
| b | f | bcd,df,df | pushing bike,cycling,cycling |
Scenario: Bike - Mode when pushing on steps
Given the node map
| a | b | | |
| | c | d | f |
And the ways
| nodes | highway |
| ab | primary |
| bc | steps |
| cd | primary |
When I route I should get
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
Scenario: Bike - Mode when bicycle=dismount
Given the node map
| a | b | | |
| | c | d | f |
And the ways
| nodes | highway | bicycle |
| ab | primary | |
| bc | primary | dismount |
| cd | primary | |
When I route I should get
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,pushing bike,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
Scenario: Bicycle - Modes when starting on forward oneway
Given the node map
| a | b |
"""
a b
"""
And the ways
| nodes | oneway |
@ -159,7 +83,9 @@ Feature: Bike - Mode flag
Scenario: Bicycle - Modes when starting on reverse oneway
Given the node map
| a | b |
"""
a b
"""
And the ways
| nodes | oneway |

View File

@ -6,8 +6,10 @@ Feature: Bike - Street names in instructions
Scenario: Bike - A named street
Given the node map
| a | b |
| | c |
"""
a b
c
"""
And the ways
| nodes | name | ref |
@ -15,13 +17,15 @@ Feature: Bike - Street names in instructions
| bc | Your Way | A7 |
When I route I should get
| from | to | route |
| a | c | My Way (A6),Your Way (A7),Your Way (A7) |
| from | to | route | ref |
| a | c | My Way,Your Way | A6,A7 |
@unnamed
Scenario: Bike - Use way type to describe unnamed ways
Scenario: Bike - No longer use way type to describe unnamed ways, see #3231
Given the node map
| a | b | c | d |
"""
a b c d
"""
And the ways
| nodes | highway | name |
@ -29,5 +33,5 @@ Feature: Bike - Street names in instructions
| bcd | track | |
When I route I should get
| from | to | route |
| a | d | {highway:cycleway},{highway:track},{highway:track} |
| from | to | route |
| a | d | , |

View File

@ -8,18 +8,22 @@ Feature: Bike - Oneway streets
Scenario: Bike - Simple oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | yes | x | |
| highway | foot | oneway | forw | backw |
| primary | no | yes | cycling | |
| primary | | yes | cycling | pushing bike |
Scenario: Simple reverse oneway
Then routability should be
| highway | foot | oneway | forw | backw |
| primary | no | -1 | | x |
| highway | foot | oneway | forw | backw |
| primary | no | -1 | | cycling |
| primary | | -1 | pushing bike | cycling |
Scenario: Bike - Around the Block
Given the node map
| a | b |
| d | c |
"""
a b
f d c e
"""
And the ways
| nodes | oneway | foot |
@ -27,6 +31,8 @@ Feature: Bike - Oneway streets
| bc | | no |
| cd | | no |
| da | | no |
| df | | no |
| ce | | no |
When I route I should get
| from | to | route |
@ -35,87 +41,89 @@ Feature: Bike - Oneway streets
Scenario: Bike - Handle various oneway tag values
Then routability should be
| foot | oneway | forw | backw |
| no | | x | x |
| no | nonsense | x | x |
| no | no | x | x |
| no | false | x | x |
| no | 0 | x | x |
| no | yes | x | |
| no | true | x | |
| no | 1 | x | |
| no | -1 | | x |
| foot | oneway | forw | backw |
| no | | cycling | cycling |
| no | nonsense | cycling | cycling |
| no | no | cycling | cycling |
| no | false | cycling | cycling |
| no | 0 | cycling | cycling |
| no | yes | cycling | |
| no | true | cycling | |
| no | 1 | cycling | |
| no | -1 | | cycling |
Scenario: Bike - Implied oneways
Then routability should be
| highway | foot | bicycle | junction | forw | backw | # |
| | no | | | x | x | |
| | no | | roundabout | x | | |
| motorway | no | yes | | x | | |
| motorway_link | no | yes | | x | x | does not imply oneway |
| motorway | no | yes | roundabout | x | | |
| motorway_link | no | yes | roundabout | x | | |
| highway | foot | bicycle | junction | forw | backw | # |
| | no | | | cycling | cycling | |
| | no | | roundabout | cycling | | |
| motorway | no | yes | | cycling | | |
| motorway_link | no | yes | | cycling | cycling | does not imply oneway |
| motorway | no | yes | roundabout | cycling | | |
| motorway_link | no | yes | roundabout | cycling | | |
Scenario: Bike - Overriding implied oneways
Then routability should be
| highway | foot | junction | oneway | forw | backw |
| primary | no | roundabout | no | x | x |
| primary | no | roundabout | yes | x | |
| motorway_link | no | | -1 | | |
| trunk_link | no | | -1 | | |
| primary | no | roundabout | -1 | | x |
| highway | foot | junction | oneway | forw | backw |
| primary | no | roundabout | no | cycling | cycling |
| primary | no | roundabout | yes | cycling | |
| motorway_link | no | | -1 | | |
| trunk_link | no | | -1 | | |
| primary | no | roundabout | -1 | | cycling |
Scenario: Bike - Oneway:bicycle should override normal oneways tags
Then routability should be
| foot | oneway:bicycle | oneway | junction | forw | backw |
| no | yes | | | x | |
| no | yes | yes | | x | |
| no | yes | no | | x | |
| no | yes | -1 | | x | |
| no | yes | | roundabout | x | |
| no | no | | | x | x |
| no | no | yes | | x | x |
| no | no | no | | x | x |
| no | no | -1 | | x | x |
| no | no | | roundabout | x | x |
| no | -1 | | | | x |
| no | -1 | yes | | | x |
| no | -1 | no | | | x |
| no | -1 | -1 | | | x |
| no | -1 | | roundabout | | x |
| foot | oneway:bicycle | oneway | junction | forw | backw |
| no | yes | | | cycling | |
| no | yes | yes | | cycling | |
| no | yes | no | | cycling | |
| no | yes | -1 | | cycling | |
| no | yes | | roundabout | cycling | |
| no | no | | | cycling | cycling |
| no | no | yes | | cycling | cycling |
| no | no | no | | cycling | cycling |
| no | no | -1 | | cycling | cycling |
| no | no | | roundabout | cycling | cycling |
| no | -1 | | | | cycling |
| no | -1 | yes | | | cycling |
| no | -1 | no | | | cycling |
| no | -1 | -1 | | | cycling |
| no | -1 | | roundabout | | cycling |
Scenario: Bike - Contra flow
Then routability should be
| foot | oneway | cycleway | forw | backw |
| no | yes | opposite | x | x |
| no | yes | opposite_track | x | x |
| no | yes | opposite_lane | x | x |
| no | -1 | opposite | x | x |
| no | -1 | opposite_track | x | x |
| no | -1 | opposite_lane | x | x |
| no | no | opposite | x | x |
| no | no | opposite_track | x | x |
| no | no | opposite_lane | x | x |
| foot | oneway | cycleway | forw | backw |
| no | yes | opposite | cycling | cycling |
| no | yes | opposite_track | cycling | cycling |
| no | yes | opposite_lane | cycling | cycling |
| no | -1 | opposite | cycling | cycling |
| no | -1 | opposite_track | cycling | cycling |
| no | -1 | opposite_lane | cycling | cycling |
| no | no | opposite | cycling | cycling |
| no | no | opposite_track | cycling | cycling |
| no | no | opposite_lane | cycling | cycling |
Scenario: Bike - Should not be affected by car tags
Then routability should be
| foot | junction | oneway | oneway:car | forw | backw |
| no | | yes | yes | x | |
| no | | yes | no | x | |
| no | | yes | -1 | x | |
| no | | no | yes | x | x |
| no | | no | no | x | x |
| no | | no | -1 | x | x |
| no | | -1 | yes | | x |
| no | | -1 | no | | x |
| no | | -1 | -1 | | x |
| no | roundabout | | yes | x | |
| no | roundabout | | no | x | |
| no | roundabout | | -1 | x | |
| foot | junction | oneway | oneway:car | forw | backw |
| no | | yes | yes | cycling | |
| no | | yes | no | cycling | |
| no | | yes | -1 | cycling | |
| no | | no | yes | cycling | cycling |
| no | | no | no | cycling | cycling |
| no | | no | -1 | cycling | cycling |
| no | | -1 | yes | | cycling |
| no | | -1 | no | | cycling |
| no | | -1 | -1 | | cycling |
| no | roundabout | | yes | cycling | |
| no | roundabout | | no | cycling | |
| no | roundabout | | -1 | cycling | |
Scenario: Bike - Two consecutive oneways
Given the node map
| a | b | | c |
"""
a b c
"""
And the ways
| nodes | oneway |
@ -126,3 +134,19 @@ Feature: Bike - Oneway streets
When I route I should get
| from | to | route |
| a | c | ab,bc,bc |
Scenario: Bike - Left/right cycleways on oneways
Then routability should be
| highway | oneway | cycleway:left | cycleway:right | forw | backw |
| primary | yes | | | cycling | pushing bike |
| primary | yes | | track | cycling | pushing bike |
| primary | yes | track | | cycling | pushing bike |
| primary | yes | track | track | cycling | pushing bike |
Scenario: Bike - Left/right cycleways on any oneways
Then routability should be
| foot | oneway | cycleway:left | cycleway:right | forw | backw |
| no | yes | track | | cycling | |
| yes | yes | track | | cycling | pushing bike |
| yes | -1 | track | | pushing bike | cycling |

View File

@ -3,41 +3,39 @@ Feature: Bike - Accessability of different way types
Background:
Given the profile "bicycle"
Given the shortcuts
| key | value |
| bike | 15 km/h ~20% |
| foot | 5 km/h ~20% |
Scenario: Bike - Pushing bikes on pedestrian-only ways
Then routability should be
| highway | oneway | forw | backw |
| (nil) | | | |
| cycleway | | bike | bike |
| primary | | bike | bike |
| pedestrian | | foot | foot |
| footway | | foot | foot |
| primary | yes | bike | foot |
| highway | oneway | forw | backw |
| (nil) | | | |
| cycleway | | cycling | cycling |
| primary | | cycling | cycling |
| pedestrian | | pushing bike | pushing bike |
| cycleway | | cycling | cycling |
| primary | yes | cycling | pushing bike |
Scenario: Bike - Pushing bikes against normal oneways
Then routability should be
| highway | oneway | forw | backw |
| (nil) | | | |
| primary | yes | bike | foot |
| pedestrian | yes | foot | foot |
| highway | oneway | forw | backw |
| (nil) | | | |
| primary | yes | cycling | pushing bike |
| pedestrian | yes | pushing bike | pushing bike |
Scenario: Bike - Pushing bikes against reverse oneways
Then routability should be
| highway | oneway | forw | backw |
| (nil) | | | |
| primary | -1 | foot | bike |
| pedestrian | -1 | foot | foot |
| highway | oneway | forw | backw |
| (nil) | | | |
| primary | -1 | pushing bike | cycling |
| pedestrian | -1 | pushing bike | pushing bike |
@square
Scenario: Bike - Push bikes on pedestrian areas
Given the node map
| x | |
| a | b |
| d | c |
"""
x
a b
d c
"""
And the ways
| nodes | area | highway |
@ -45,7 +43,7 @@ Feature: Bike - Accessability of different way types
| abcda | yes | pedestrian |
When I route I should get
| from | to | route |
| from | to | route |
| a | b | abcda,abcda |
| a | d | abcda,abcda |
| b | c | abcda,abcda |
@ -57,18 +55,19 @@ Feature: Bike - Accessability of different way types
Scenario: Bike - Pushing bikes on ways with foot=yes
Then routability should be
| highway | foot | forw | backw |
| motorway | | | |
| motorway | yes | foot | |
| runway | | | |
| runway | yes | foot | foot |
| highway | foot | forw | backw |
| motorway | | | |
| motorway | yes | pushing bike | |
| runway | | | |
| runway | yes | pushing bike | pushing bike |
@todo
Scenario: Bike - Pushing bikes on ways with foot=yes in one direction
Then routability should be
| highway | foot:forward | foot:backward | forw | backw |
| motorway | | | | |
| motorway | yes | | foot | |
| motorway | | yes | | foot |
| highway | foot:forward | foot:backward | forw | backw |
| motorway | | | | |
| motorway | yes | | pushing bike | |
| motorway | | yes | | pushing bike |
@construction
Scenario: Bike - Don't allow routing on ways still under construction
@ -79,6 +78,15 @@ Feature: Bike - Accessability of different way types
| construction | yes | | |
| construction | | yes | |
@proposed
Scenario: Bike - Don't allow routing on ways still being proposed
Then routability should be
| highway | foot | bicycle | proposed | bothw |
| primary | | | | x |
| proposed | | | | |
| proposed | yes | | yes | |
| proposed | | yes | yes | |
@roundabout
Scenario: Bike - Don't push bikes against oneway flow on roundabouts
Then routability should be
@ -87,26 +95,32 @@ Feature: Bike - Accessability of different way types
Scenario: Bike - Instructions when pushing bike on oneways
Given the node map
| a | b | |
| | c | d |
"""
a b e
f c d
"""
And the ways
| nodes | highway | oneway |
| ab | primary | |
| bc | primary | yes |
| cd | primary | |
| be | primary | |
| cf | primary | |
When I route I should get
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
Given the node map
| a | b | |
| | c | d |
"""
a b
c d
"""
And the ways
| nodes | highway |

View File

@ -1,41 +0,0 @@
@routing @bicycle @ref @name
Feature: Bike - Way ref
Background:
Given the profile "bicycle"
Scenario: Bike - Way with both name and ref
Given the node map
| a | b |
And the ways
| nodes | name | ref |
| ab | Utopia Drive | E7 |
When I route I should get
| from | to | route |
| a | b | Utopia Drive (E7),Utopia Drive (E7) |
Scenario: Bike - Way with only ref
Given the node map
| a | b |
And the ways
| nodes | name | ref |
| ab | | E7 |
When I route I should get
| from | to | route |
| a | b | E7,E7 |
Scenario: Bike - Way with only name
Given the node map
| a | b |
And the ways
| nodes | name |
| ab | Utopia Drive |
When I route I should get
| from | to | route |
| a | b | Utopia Drive,Utopia Drive |

View File

@ -5,13 +5,18 @@ Feature: Bike - Turn restrictions
Background:
Given the profile "bicycle"
Given a grid size of 200 meters
# check to see if bicycle profiles handle relations. The code path is the same as in cars.
# If relations are passed, all variants tested in car also work for bike
@no_turning
Scenario: Bike - No left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
"""
n
w j e
s
"""
And the ways
| nodes | oneway | foot |
@ -30,180 +35,15 @@ Feature: Bike - Turn restrictions
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@no_turning
Scenario: Bike - No right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | no_right_turn |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@no_turning
Scenario: Bike - No u-turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_u_turn |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@no_turning
Scenario: Bike - Handle any no_* relation
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | no_weird_zigzags |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@only_turning
Scenario: Bike - Only left turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | wj | j | only_left_turn |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@only_turning
Scenario: Bike - Only right turn
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | ej | j | only_right_turn |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@only_turning
Scenario: Bike - Only straight on
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_straight_on |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
@no_turning
Scenario: Bike - Handle any only_* restriction
Given the node map
| | n | |
| w | j | e |
| | s | |
And the ways
| nodes | oneway | foot |
| sj | yes | no |
| nj | -1 | no |
| wj | -1 | no |
| ej | -1 | no |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | sj | nj | j | only_weird_zigzags |
When I route I should get
| from | to | route |
| s | w | sj,wj,wj |
| s | n | sj,nj,nj |
| s | e | sj,ej,ej |
## exceptions are different for bike over car and need to be tested here
@except
Scenario: Bike - Except tag and on no_ restrictions
Given the node map
| b | x | c |
| a | j | d |
| | s | |
"""
b x c
a j d
s
"""
And the ways
| nodes | oneway | foot |
@ -231,9 +71,11 @@ Feature: Bike - Turn restrictions
@except
Scenario: Bike - Except tag and on only_ restrictions
Given the node map
| a | | b |
| | j | |
| | s | |
"""
a b
j
s
"""
And the ways
| nodes | oneway | foot |
@ -253,12 +95,14 @@ Feature: Bike - Turn restrictions
@except
Scenario: Bike - Multiple except tag values
Given the node map
| s | j | a |
| | | b |
| | | c |
| | | d |
| | | e |
| | | f |
"""
s j a
b
c
d
e
f
"""
And the ways
| nodes | oneway | foot |

View File

@ -0,0 +1,104 @@
@routing @bicycle @safety
Feature: Bicycle - Adds penalties to unsafe roads
Background:
Given the profile file "bicycle" initialized with
"""
profile.properties.weight_name = 'cyclability'
"""
Scenario: Bike - Apply penalties to ways without cycleways
Then routability should be
| highway | cycleway | forw | backw | forw_rate | backw_rate |
| motorway | | | | | |
| primary | | 15 km/h | 15 km/h | 2.1 | 2.1 |
| secondary | | 15 km/h | 15 km/h | 2.7 | 2.7 |
| tertiary | | 15 km/h | 15 km/h | 3.3 | 3.3 |
| primary_link | | 15 km/h | 15 km/h | 2.1 | 2.1 |
| secondary_link | | 15 km/h | 15 km/h | 2.7 | 2.7 |
| tertiary_link | | 15 km/h | 15 km/h | 3.3 | 3.3 |
| residential | | 15 km/h | 15 km/h | 4.2 | 4.2 |
| cycleway | | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | | 4 km/h +-1 | 4 km/h +-1 | 1.1 | 1.1 |
Scenario: Bike - Apply no penalties to ways with cycleways
Then routability should be
| highway | cycleway | forw | backw | forw_rate | backw_rate |
| motorway | track | 15 km/h | | 4.2 | |
| primary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| secondary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| tertiary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| primary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| secondary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| tertiary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| residential | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| cycleway | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | track | 14 km/h | 14 km/h | 4.2 | 4.2 |
| motorway | lane | 15 km/h | | 4.2 | |
| primary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| secondary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| tertiary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| primary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| secondary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| tertiary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| residential | lane | 14 km/h | 14 km/h | 4.2 | 4.2 |
| cycleway | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| motorway | shared_lane | 15 km/h | | 4.2 | |
| primary | shared_lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
Scenario: Bike - Apply no penalties to ways in direction of cycleways
Then routability should be
| highway | cycleway:right | cycleway:left | forw | backw | forw_rate | backw_rate |
| motorway | track | | 15 km/h | | 4.2 | |
| primary | track | | 15 km/h | 15 km/h | 4.2 | 2.1 |
| secondary | track | | 15 km/h | 15 km/h | 4.2 | 2.7 |
| tertiary | track | | 15 km/h | 15 km/h | 4.2 | 3.3 |
| primary_link | track | | 15 km/h | 15 km/h | 4.2 | 2.1 |
| secondary_link | track | | 15 km/h | 15 km/h | 4.2 | 2.7 |
| tertiary_link | track | | 15 km/h | 15 km/h | 4.2 | 3.3 |
| residential | track | | 15 km/h | 15 km/h | 4.2 | 4.2 |
| cycleway | track | | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | track | | 14 km/h | 4 km/h +-1 | 4.2 | 1.1 |
| motorway | | track | 15 km/h | | 4.2 | |
| primary | | track | 15 km/h | 15 km/h | 2.1 | 4.2 |
| secondary | | track | 15 km/h | 15 km/h | 2.7 | 4.2 |
| tertiary | | track | 15 km/h | 15 km/h | 3.3 | 4.2 |
| primary_link | | track | 15 km/h | 15 km/h | 2.1 | 4.2 |
| secondary_link | | track | 15 km/h | 15 km/h | 2.7 | 4.2 |
| tertiary_link | | track | 15 km/h | 15 km/h | 3.3 | 4.2 |
| residential | | track | 14 km/h | 14 km/h | 4.2 | 4.2 |
| cycleway | | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | | track | 4 km/h +-1 | 15 km/h | 1.1 | 4.2 |
| motorway | lane | | 15 km/h | | 4.2 | |
| primary | lane | | 15 km/h | 15 km/h | 4.2 | 2.1 |
| secondary | lane | | 15 km/h | 15 km/h | 4.2 | 2.7 |
| tertiary | lane | | 15 km/h | 15 km/h | 4.2 | 3.3 |
| primary_link | lane | | 15 km/h | 15 km/h | 4.2 | 2.1 |
| secondary_link | lane | | 14 km/h | 14 km/h | 4.2 | 2.7 |
| tertiary_link | lane | | 15 km/h | 15 km/h | 4.2 | 3.3 |
| residential | lane | | 15 km/h +-1 | 15 km/h +-1 | 4.2 | 4.2 |
| cycleway | lane | | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | lane | | 15 km/h | 4 km/h +-1 | 4.2 | 1.1 |
| motorway | | lane | 15 km/h | | 4.2 | |
| primary | | lane | 15 km/h | 15 km/h | 2.1 | 4.2 |
| secondary | | lane | 15 km/h +-1 | 15 km/h +-1 | 2.7 | 4.2 |
| tertiary | | lane | 15 km/h | 15 km/h | 3.3 | 4.2 |
| primary_link | | lane | 14 km/h | 14 km/h | 2.1 | 4.2 |
| secondary_link | | lane | 15 km/h | 15 km/h | 2.7 | 4.2 |
| tertiary_link | | lane | 15 km/h | 15 km/h | 3.3 | 4.2 |
| residential | | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| cycleway | | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| footway | | lane | 4 km/h +-1 | 15 km/h | 1.1 | 4.2 |
| motorway | shared_lane | | 15 km/h | | 4.2 | |
| primary | shared_lane | | 15 km/h | 15 km/h | 4.2 | 2.1 |
| motorway | | shared_lane | 14 km/h | | 4.2 | |
| primary | | shared_lane | 15 km/h | 15 km/h | 2.1 | 4.2 |
Scenario: Bike - Don't apply penalties for all kind of cycleways
Then routability should be
| highway | cycleway | forw | backw | forw_rate | backw_rate |
| tertiary | shared_lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| tertiary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
| tertiary | opposite | 15 km/h | 15 km/h | 3.3 | 3.3 |

View File

@ -0,0 +1,53 @@
@routing @bicycle @startpoint
Feature: Bike - Allowed start/end modes
Background:
Given the profile "bicycle"
Scenario: Bike - Don't start/stop on ferries
Given the node map
"""
a 1 b 2 c
"""
And the ways
| nodes | highway | route | bicycle |
| ab | primary | | |
| bc | | ferry | yes |
When I route I should get
| from | to | route | modes |
| 1 | 2 | ab,ab | cycling,cycling |
| 2 | 1 | ab,ab | cycling,cycling |
Scenario: Bike - Don't start/stop on trains
Given the node map
"""
a 1 b 2 c
"""
And the ways
| nodes | highway | railway | bicycle |
| ab | primary | | |
| bc | | train | yes |
When I route I should get
| from | to | route | modes |
| 1 | 2 | ab,ab | cycling,cycling |
| 2 | 1 | ab,ab | cycling,cycling |
Scenario: Bike - OK to start pushing bike
Given the node map
"""
a 1 b 2 c
"""
And the ways
| nodes | highway |
| ab | primary |
| bc | steps |
When I route I should get
| from | to | route | modes |
| 1 | 2 | ab,bc,bc | cycling,pushing bike,pushing bike |
| 2 | 1 | bc,ab,ab | pushing bike,cycling,cycling |

View File

@ -14,8 +14,10 @@ Feature: Bike - Stop areas for public transport
Scenario: Bike - railway platforms
Given the node map
| a | b | c | d |
| | s | t | |
"""
a b c d
s t
"""
And the nodes
| node | public_transport |

View File

@ -6,35 +6,63 @@ Feature: Bike - Surfaces
Scenario: Bicycle - Slow surfaces
Then routability should be
| highway | surface | bothw |
| cycleway | | 48s |
| cycleway | asphalt | 48s |
| cycleway | cobblestone:flattened | 72s |
| cycleway | paving_stones | 72s |
| cycleway | compacted | 72s |
| cycleway | cobblestone | 120s |
| cycleway | unpaved | 120s |
| cycleway | fine_gravel | 120s |
| cycleway | gravel | 120s |
| cycleway | pebblestone | 120s |
| cycleway | dirt | 120s |
| cycleway | earth | 120s |
| cycleway | grass | 120s |
| cycleway | mud | 240s |
| cycleway | sand | 240s |
| highway | surface | bothw |
| cycleway | | 48 s |
| cycleway | asphalt | 47.9 s |
| cycleway | chipseal | 48 s |
| cycleway | concrete | 48 s |
| cycleway | concrete_lanes | 48 s |
| cycleway | cobblestone:flattened | 72 s |
| cycleway | paving_stones | 72 s |
| cycleway | wood | 72 s |
| cycleway | metal | 72 s |
| cycleway | compacted | 72 s |
| cycleway | fine_gravel | 72 s |
| cycleway | ground | 72 s |
| cycleway | dirt | 90 s |
| cycleway | cobblestone | 102.9 s |
| cycleway | gravel | 120 s |
| cycleway | pebblestone | 120 s |
| cycleway | grass_paver | 120 s |
| cycleway | dirt | 90 s |
| cycleway | earth | 120 s |
| cycleway | grass | 120 s |
| cycleway | mud | 240 s |
| cycleway | sand | 240 s |
| cycleway | woodchips | 240 s |
| cycleway | sett | 80 s |
Scenario: Bicycle - Good surfaces on small paths
Then routability should be
| highway | surface | bothw |
| cycleway | | 48s |
| path | | 60s |
| track | | 60s |
| track | asphalt | 48s |
| path | asphalt | 48s |
| highway | surface | bothw |
| cycleway | | 48 s |
| path | | 55.3 s |
| track | | 60 s |
| track | asphalt | 60 s |
| path | asphalt | 55.4 s |
Scenario: Bicycle - Surfaces should not make unknown ways routable
Then routability should be
| highway | surface | bothw |
| cycleway | | 48s |
| cycleway | | 48 s |
| nosense | | |
| nosense | asphalt | |
Scenario: Bicycle - Surfaces should not increase speed when pushing bikes
Given the node map
"""
a b
c d
"""
And the ways
| nodes | highway | oneway | surface |
| ab | primary | yes | asphalt |
| cd | footway | | asphalt |
When I route I should get
| from | to | route | modes | speed |
| a | b | ab,ab | cycling,cycling | 15 km/h |
| b | a | ab,ab | pushing bike,pushing bike | 4 km/h |
| c | d | cd,cd | pushing bike,pushing bike | 4 km/h |
| d | c | cd,cd | pushing bike,pushing bike | 4 km/h |

View File

@ -1,39 +1,71 @@
@routing @bicycle @train
Feature: Bike - Handle ferry routes
# Bringing bikes on trains and subways
# We cannot currently use a 'routability' type test, since the bike
# profile does not allow starting/stopping on trains, and
# it's not possible to modify the bicycle profile table because it's
# defined as local.
Background:
Given the profile "bicycle"
Scenario: Bike - Bringing bikes on trains
Then routability should be
| highway | railway | bicycle | bothw |
| primary | | | x |
| (nil) | train | | |
| (nil) | train | no | |
| (nil) | train | yes | x |
| (nil) | railway | | |
| (nil) | railway | no | |
| (nil) | railway | yes | x |
| (nil) | subway | | |
| (nil) | subway | no | |
| (nil) | subway | yes | x |
| (nil) | tram | | |
| (nil) | tram | no | |
| (nil) | tram | yes | x |
| (nil) | light_rail | | |
| (nil) | light_rail | no | |
| (nil) | light_rail | yes | x |
| (nil) | monorail | | |
| (nil) | monorail | no | |
| (nil) | monorail | yes | x |
| (nil) | some_tag | | |
| (nil) | some_tag | no | |
| (nil) | some_tag | yes | x |
Given the node map
"""
a 1 b c 2 d e 3 f g 4 h
"""
And the ways
| nodes | highway | railway | bicycle |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| bc | | train | |
| de | | train | yes |
| fg | | train | no |
When I route I should get
| from | to | route |
| 1 | 2 | |
| 2 | 3 | cd,de,ef,ef |
| 3 | 4 | |
Scenario: Bike - Bringing bikes on trains, invalid railway tag is accepted if access specified
Given the node map
"""
a 1 b c 2 d e 3 f g 4 h
"""
And the ways
| nodes | highway | railway | bicycle |
| ab | primary | | |
| cd | primary | | |
| ef | primary | | |
| gh | primary | | |
| bc | | invalid_tag | |
| de | | invalid_tag | yes |
| fg | | invalid_tag | no |
When I route I should get
| from | to | route |
| 1 | 2 | |
| 2 | 3 | cd,de,ef|
| 3 | 4 | |
@construction
Scenario: Bike - Don't route on railways under construction
Then routability should be
| highway | railway | bicycle | bothw |
| primary | | | x |
| (nil) | construction | yes | |
Given the node map
"""
a 1 b c 2 d
"""
And the ways
| nodes | highway | railway | bicycle |
| ab | primary | | |
| cd | primary | | |
| bc | | construction | yes |
When I route I should get
| from | to | route |
| 1 | 2 | |

View File

@ -2,32 +2,41 @@
Feature: Turn Penalties
Background:
Given the profile "turnbot"
Given the profile "bicycle"
Given a grid size of 200 meters
Scenario: Bike - turns should incur a delay that depend on the angle
Scenario: Bicycle - Turn penalties on cyclability
Given the profile file "bicycle" initialized with
"""
profile.properties.weight_name = 'cyclability'
"""
Given the node map
| c | d | e |
| b | j | f |
| a | s | g |
"""
a--b-----c
|
|
d
e--------f-----------g
/
/
/
h
"""
And the ways
| nodes |
| sj |
| ja |
| jb |
| jc |
| jd |
| je |
| jf |
| jg |
| nodes | highway |
| abc | residential |
| bd | residential |
| efg | residential |
| fh | residential |
When I route I should get
| from | to | route | time | distance |
| s | a | sj,ja,ja | 39s +-1 | 242m +-1 |
| s | b | sj,jb,jb | 30s +-1 | 200m +-1 |
| s | c | sj,jc,jc | 29s +-1 | 242m +-1 |
| s | d | sj,jd,jd | 20s +-1 | 200m +-1 |
| s | e | sj,je,je | 29s +-1 | 242m +-1 |
| s | f | sj,jf,jf | 30s +-1 | 200m +-1 |
| s | g | sj,jg,jg | 39s +-1 | 242m +-1 |
| from | to | distance | weight | # |
| a | c | 900m +- 1 | 216 | Going straight has no penalties |
| a | d | 900m +- 1 | 220.2 | Turning right had penalties |
| e | g | 2100m +- 5| 503.9 | Going straght has no penalties |
| e | h | 2100m +- 5| 515.1 | Turn sharp right has even higher penalties|

View File

@ -5,7 +5,7 @@ Feature: Car - Restricted access
Background:
Given the profile "car"
Scenario: Car - Access tag hierarchy on ways
Scenario: Car - Access tag hierarchy on ways
Then routability should be
| access | vehicle | motor_vehicle | motorcar | bothw |
| | | | | x |
@ -30,6 +30,35 @@ Feature: Car - Restricted access
| | | no | yes | x |
| | | yes | no | |
Scenario: Car - Access tag hierarchy and forward/backward
Then routability should be
| access | access:forward | access:backward | motorcar | motorcar:forward | motorcar:backward | forw | backw |
| | | | | | | x | x |
| yes | | | | | | x | x |
| yes | no | | | | | | x |
| yes | yes | | no | | | | |
| yes | yes | | yes | no | | | x |
| yes | | | | | | x | x |
| yes | | no | | | | x | |
| yes | | yes | no | | | | |
| yes | | yes | yes | | no | x | |
| no | | | | | | | |
| no | yes | | | | | x | |
| no | no | | yes | | | x | x |
| no | no | | no | yes | | x | |
| no | | | | | | | |
| no | | yes | | | | | x |
| no | | no | yes | | | x | x |
| no | | no | no | | yes | | x |
| | no | | | no | | | x |
| | | no | | | no | x | |
| | no | | | | no | | |
| | | no | no | | | | |
| | no | | | yes | | x | x |
| | | no | | | yes | x | x |
| | yes | | | no | | | x |
| | | yes | | | no | x | |
Scenario: Car - Access tag hierarchy on nodes
Then routability should be
| node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw |
@ -90,12 +119,13 @@ Feature: Car - Restricted access
| permissive | x |
| designated | x |
| no | |
| private | |
| private | x |
| agricultural | |
| forestry | |
| psv | |
| delivery | |
| delivery | x |
| some_tag | x |
| destination | x |
Scenario: Car - Access tags on nodes
@ -105,11 +135,11 @@ Feature: Car - Restricted access
| permissive | x |
| designated | x |
| no | |
| private | |
| private | x |
| agricultural | |
| forestry | |
| psv | |
| delivery | |
| delivery | x |
| some_tag | x |
Scenario: Car - Access tags on both node and way
@ -127,15 +157,16 @@ Feature: Car - Restricted access
Scenario: Car - Access combinations
Then routability should be
| highway | accesss | vehicle | motor_vehicle | motorcar | bothw |
| runway | private | | | permissive | x |
| primary | forestry | | yes | | x |
| cycleway | | | designated | | x |
| residential | | yes | no | | |
| motorway | yes | permissive | | private | |
| trunk | agricultural | designated | permissive | no | |
| pedestrian | | | | | |
| pedestrian | | | | destination | x |
| highway | access | vehicle | motor_vehicle | motorcar | forw | backw | # |
| runway | private | | | permissive | x | x | |
| primary | forestry | | yes | | x | x | |
| cycleway | | | designated | | x | x | |
| unclassified | | | destination | destination | x | x | |
| residential | | yes | no | | | | |
| motorway | yes | permissive | | private | x | | implied oneway |
| trunk | agricultural | designated | permissive | no | | | |
| pedestrian | | | | | | | |
| pedestrian | | | | destination | | | temporary disabled #3773 |
Scenario: Car - Ignore access tags for other modes
Then routability should be
@ -148,3 +179,129 @@ Feature: Car - Restricted access
| primary | | | no | | x |
| runway | | | | yes | |
| primary | | | | no | x |
@hov
Scenario: Car - designated HOV ways are rated low
Then routability should be
| highway | hov | bothw | forw_rate | backw_rate |
| primary | designated | x | 18.2 | 18.2 |
| primary | yes | x | 18.3 | 18.3 |
| primary | no | x | 18.2 | 18.2 |
# Models:
# https://www.openstreetmap.org/way/124891268
# https://www.openstreetmap.org/way/237173472
@hov
Scenario: Car - I-66 use HOV-only roads with heavy penalty
Then routability should be
| highway | hov | hov:lanes | lanes | access | oneway | forw | backw | forw_rate |
| motorway | designated | designated\|designated\|designated | 3 | hov | yes | x | | 25 |
| motorway | lane | | 3 | designated | yes | x | | 25.3 |
@hov
Scenario: Car - a way with all lanes HOV-designated is highly penalized by default (similar to hov=designated)
Then routability should be
| highway | hov:lanes:forward | hov:lanes:backward | hov:lanes | oneway | forw | backw | forw_rate | backw_rate |
| primary | designated | designated | | | x | x | 18.2 | 18.2 |
# This test is flaky because non-deterministic turn generation sometimes emits a NoTurn here that is marked as restricted. #3769
#| primary | | designated | | | x | x | 18.2 | 18.2 |
#| primary | designated | | | | x | x | 18.2 | 18.2 |
| primary | designated\|designated | designated\|designated | | | x | x | 18.3 | 18.3 |
| primary | designated\|no | designated\|no | | | x | x | 18.2 | 18.2 |
| primary | yes\|no | yes\|no | | | x | x | 18.2 | 18.2 |
| primary | | | | | x | x | 18.2 | 18.2 |
| primary | designated | | | -1 | | x | | 18.2 |
| primary | | designated | | -1 | | x | | 18.2 |
| primary | | | designated | yes | x | | 18.2 | |
| primary | | | designated | -1 | | x | | 18.2 |
| primary | | | designated\| | yes | x | | 18.2 | |
| primary | | | designated\| | -1 | | x | | 18.2 |
| primary | | | designated\|designated | yes | x | | 18.2 | |
| primary | | | designated\|designated | -1 | | x | | 18.2 |
| primary | | | designated\|yes | yes | x | | 18.2 | |
| primary | | | designated\|no | -1 | | x | | 18.2 |
Scenario: Car - these toll roads always work
Then routability should be
| highway | toll | bothw |
| primary | no | x |
| primary | snowmobile | x |
Scenario: Car - toll=yes ways are enabled by default
Then routability should be
| highway | toll | bothw |
| primary | yes | x |
Scenario: Car - directional access tags
Then routability should be
| highway | access | access:forward | access:backward | forw | backw |
| primary | yes | yes | yes | x | x |
| primary | yes | | no | x | |
| primary | yes | no | | | x |
| primary | yes | no | no | | |
| primary | no | no | no | | |
| primary | no | | yes | | x |
| primary | no | yes | | x | |
| primary | no | yes | yes | x | x |
Scenario: Car - barrier=gate should be routed over unless explicitely forbidden
Then routability should be
| node/barrier | access | bothw |
| gate | | x |
| gate | no | |
| gate | yes | x |
| gate | permissive | x |
| gate | designated | x |
| gate | private | x |
| gate | garbagetag | x |
Scenario: Car - a way with conditional access
Then routability should be
| highway | vehicle:forward | vehicle:backward:conditional | forw | backw |
| pedestrian | yes | delivery @ (20:00-11:00) | x | |
Scenario: Car - a way with a list of tags
Then routability should be
| highway | motor_vehicle | motor_vehicle:forward | motor_vehicle:backward | forw | backw | # |
| primary | | no | destination | | x | |
| primary | destination;agricultural | destination | | x | x | |
| footway | | | destination | | | temporary #3373 |
| track | destination;agricultural | destination | | | x | temporary #3373 |
Scenario: Car - Don't route over steps even if marked as accessible
Then routability should be
| highway | access | forw | backw |
| steps | yes | | |
| steps | no | | |
| primary | | x | x |
Scenario: Car - Access combinations
Then routability should be
| highway | access | bothw |
| primary | permissive | x |
| steps | permissive | |
| footway | permissive | x |
| garbagetag | permissive | x |
Scenario: Car - Access private blacklist
Then routability should be
| highway | access | bothw |
| footway | yes | x |
| pedestrian | private | |
| footway | private | |
| service | private | |
| cycleway | private | |
| track | private | |
| footway | customers | |
Scenario: Car - Access blacklist
Then routability should be
| highway | access | bothw |
| primary | | x |
| primary | emergency | |
| primary | forestry | |
| primary | agricultural | |
| primary | psv | |
| primary | no | |
| primary | customers | x |

View File

@ -8,7 +8,9 @@ OSRM will use 4/5 of the projected free-flow speed.
Scenario: Car - Advisory speed overwrites maxspeed
Given the node map
| a | b | c |
"""
a b c
"""
And the ways
| nodes | highway | maxspeed | maxspeed:advisory |
@ -17,12 +19,14 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get
| from | to | route | speed |
| a | b | ab,ab | 47 km/h +- 1 |
| b | c | bc,bc | 47 km/h +- 1 |
| a | b | ab,ab | 36 km/h +- 1 |
| b | c | bc,bc | 36 km/h +- 1 |
Scenario: Car - Advisory speed overwrites forward maxspeed
Given the node map
| a | b | c |
"""
a b c
"""
And the ways
| nodes | highway | maxspeed:forward | maxspeed:advisory:forward |
@ -31,12 +35,14 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get
| from | to | route | speed |
| a | b | ab,ab | 47 km/h +- 1 |
| b | c | bc,bc | 47 km/h +- 1 |
| a | b | ab,ab | 36 km/h +- 1 |
| b | c | bc,bc | 36 km/h +- 1 |
Scenario: Car - Advisory speed overwrites backwards maxspeed
Given the node map
| a | b | c |
"""
a b c
"""
And the ways
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
@ -45,12 +51,14 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get
| from | to | route | speed |
| b | a | ab,ab | 47 km/h +- 1 |
| c | b | bc,bc | 47 km/h +- 1 |
| b | a | ab,ab | 36 km/h +- 1 |
| c | b | bc,bc | 36 km/h +- 1 |
Scenario: Car - Advisory speed overwrites backwards maxspeed
Given the node map
| a | b | c | d |
"""
a b c d
"""
And the ways
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
@ -60,12 +68,14 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get
| from | to | route | speed |
| c | b | bc,bc | 47 km/h +- 1 |
| d | c | cd,cd | 47 km/h +- 1 |
| c | b | bc,bc | 36 km/h +- 1 |
| d | c | cd,cd | 36 km/h +- 1 |
Scenario: Car - Directional advisory speeds play nice with eachother
Given the node map
| a | b | c |
"""
a b c
"""
And the ways
| nodes | highway | maxspeed:advisory | maxspeed:advisory:forward | maxspeed:advisory:backward |
@ -74,9 +84,9 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get
| from | to | route | speed |
| a | b | ab,ab | 47 km/h +- 1 |
| b | a | ab,ab | 59 km/h +- 1 |
| b | c | bc,bc | 59 km/h +- 1 |
| c | b | bc,bc | 47 km/h +- 1 |
| a | b | ab,ab | 36 km/h +- 1 |
| b | a | ab,ab | 48 km/h +- 1 |
| b | c | bc,bc | 48 km/h +- 1 |
| c | b | bc,bc | 36 km/h +- 1 |

Some files were not shown because too many files have changed in this diff Show More