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