Commit Graph

1645 Commits

Author SHA1 Message Date
Dennis Luxen 99809e105c Upgrade clang compiler in CI builds (#6861) 2024-05-06 18:12:17 +02:00
Dennis Luxen 7f9d591ab7 Upgrade clang-format to version 15 (#6859) 2024-05-06 09:14:46 +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
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
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
fenwuyaoji 14dcf91812 add keepalive_timeout flag (#6674)
* add keepalive_timeout flag
2023-08-30 19:06:39 +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
Whytro 72da455185 Allow -1.0 as unlimited for default_radius value (#6599) 2023-05-31 07:52:35 +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
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
Jeremiah e590dae5f6 Fix boost header deprecation warning (#6515) 2023-01-21 08:47:05 +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 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 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 f983d626ac Merge remote-tracking branch 'origin/master' into dl_using_keyword 2022-12-10 16:02:53 +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
Siarhei Fedartsou 6d10523440 Upgrade to clang-tidy 15 (#6439) 2022-11-06 22:45:35 +01:00
Dennis Luxen 8bff55cd85 [CPP17] Modernize: Replace typedef with using statements 2022-11-06 13:21:45 +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 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 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 0021ccef59 Replace boost::string_ref with std::string_view 2022-10-30 13:59:59 +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
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 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 7be9039f53 Get rid of Mason (#6387) 2022-10-06 14:13:12 +02:00
Siarhei Fedartsou 9a4b4648f4 Improve performance of JSON rendering (#6380) 2022-10-03 21:43:51 +02: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
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
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