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
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
#ifndef OSRM_EXTRACTOR_GUIDANCE_CONSTANTS_HPP_
|
|
#define OSRM_EXTRACTOR_GUIDANCE_CONSTANTS_HPP_
|
|
|
|
namespace osrm
|
|
{
|
|
namespace extractor
|
|
{
|
|
namespace guidance
|
|
{
|
|
|
|
const bool constexpr INVERT = true;
|
|
|
|
// what angle is interpreted as going straight
|
|
const double constexpr STRAIGHT_ANGLE = 180.;
|
|
// if a turn deviates this much from going straight, it will be kept straight
|
|
const double constexpr MAXIMAL_ALLOWED_NO_TURN_DEVIATION = 3.;
|
|
// angle that lies between two nearly indistinguishable roads
|
|
const double constexpr NARROW_TURN_ANGLE = 40.;
|
|
const double constexpr GROUP_ANGLE = 60;
|
|
// angle difference that can be classified as straight, if its the only narrow turn
|
|
const double constexpr FUZZY_ANGLE_DIFFERENCE = 25.;
|
|
const double constexpr DISTINCTION_RATIO = 2;
|
|
|
|
// Named roundabouts with radii larger then than this are seen as rotary
|
|
const double constexpr MAX_ROUNDABOUT_RADIUS = 15;
|
|
// Unnamed small roundabouts that look like intersections are announced as turns,
|
|
// guard against data issues or such roundabout intersections getting too large.
|
|
const double constexpr MAX_ROUNDABOUT_INTERSECTION_RADIUS = 25;
|
|
|
|
const double constexpr INCREASES_BY_FOURTY_PERCENT = 1.4;
|
|
|
|
const int constexpr MAX_SLIPROAD_THRESHOLD = 250;
|
|
|
|
} // namespace guidance
|
|
} // namespace extractor
|
|
} // namespace osrm
|
|
|
|
#endif // OSRM_EXTRACTOR_GUIDANCE_CONSTANTS_HPP_
|