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.
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.
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).
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.
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.
* 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>
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.
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.
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.
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.
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.
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
* 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
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.
* 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
* 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
* 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
* 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.
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.
* 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
* 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
* 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
* 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
- 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)
- 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)