Commit Graph

528 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Daniel Patterson
b739658681
Reset for next release. 2021-09-21 14:50:45 -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
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
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
ba4e7bfa11 Add changelog entry 2021-09-03 10:55:53 +02: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
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
Jay Zhang
480807500b docs: changelog 2021-03-26 00:28:08 +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
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
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
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
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
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
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
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
c090457f1f docs: changelog 2020-10-23 09:48:21 +00: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
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
Leigh Hunt
3116734bec Merge branch 'master' of github.com:Project-OSRM/osrm-backend 2020-09-02 09:52:01 +12:00
Denis Chaplygin
2d0b2ca987
Removed STXXL support. 2020-08-20 11:54:02 +03: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
Jay Zhang
b7fa2c5981 docs: update changelog 2020-07-29 06:02:19 +00: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
Jay Zhang
11b0a2e02a docs: update change log 2019-12-09 23:19:37 +08:00
Marius Rescheleit
ca5d17adab
Update CHANGELOG.md 2019-12-03 12:21:53 +01:00
Jeroen Hoek
92406da194 Bicycle: treat use_sidepath as no access
Fixes #5557.
2019-12-01 18:34:58 +01: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
Tomonobu Saito
9c1c842b79 update CHANGELOG.md 2019-10-10 12:26:13 +09: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
Denis Chaplygin
a6097cdc01 Changelog updated 2019-09-17 17:56:27 +03:00
Leigh Hunt
6dfcfcb105
Adding entry to change log for #5535 2019-09-03 16:52:30 +12:00
Denis Chaplygin
a9c187c99b Updated changelog entry 2019-08-26 11:09:38 +03:00
Denis Chaplygin
2462826c20 Added changelog entry. 2019-08-23 13:07:17 +03:00
Ilya Zverev
2820853fb6 Update changelog 2019-03-04 13:30:10 +03:00
Ilya Zverev
98294e3ddd Decrease max height to 2 meters 2019-03-04 13:23:17 +03: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
4f0ec785f6
Configurable snapping behaviour (#5361) 2019-02-14 17:14:50 -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
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
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
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
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
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
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
985ab58f45
Add feature to fill null table entries with as-the-crow-flies estimates. 2018-11-02 01:07:24 -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
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
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
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