osrm-backend/include/engine/guidance/lane_processing.hpp

34 lines
1.1 KiB
C++
Raw Normal View History

2016-06-15 08:38:24 -04:00
#ifndef OSRM_ENGINE_GUIDANCE_LANE_PROCESSING_HPP_
#define OSRM_ENGINE_GUIDANCE_LANE_PROCESSING_HPP_
#include <vector>
#include "engine/guidance/route_step.hpp"
#include "util/attributes.hpp"
2016-06-15 08:38:24 -04:00
namespace osrm
{
namespace engine
{
namespace guidance
{
// Constrains lanes for multi-hop situations where lane changes depend on earlier ones.
// Instead of forcing users to change lanes rapidly in a short amount of time,
// we anticipate lane changes emitting only matching lanes early on.
// the second parameter describes the duration that we feel two segments need to be apart to count
// as separate maneuvers.
OSRM_ATTR_WARN_UNUSED
std::vector<RouteStep> anticipateLaneChange(std::vector<RouteStep> steps,
const double min_duration_needed_for_lane_change = 15);
2016-06-15 08:38:24 -04:00
Remove lanes from roundabouts, closes #2626 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).
2016-07-22 12:59:08 -04:00
// Remove all lane information from roundabouts. See #2626.
OSRM_ATTR_WARN_UNUSED
Remove lanes from roundabouts, closes #2626 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).
2016-07-22 12:59:08 -04:00
std::vector<RouteStep> removeLanesFromRoundabouts(std::vector<RouteStep> steps);
2016-06-15 08:38:24 -04:00
} // namespace guidance
} // namespace engine
} // namespace osrm
#endif /* OSRM_ENGINE_GUIDANCE_LANE_PROCESSING_HPP_ */