refactor merging of segregated roads
adjust to generalFindMaximum function moved parallel detection to ratio/absolute based regression testing considerably improved detection quality using normalised regression lines only follow initial direction/narrow turns for parallel detection
This commit is contained in:
@@ -5,10 +5,14 @@
|
||||
#include "util/guidance/name_announcements.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include "util/bearing.hpp"
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
using EdgeData = osrm::util::NodeBasedDynamicGraph::EdgeData;
|
||||
using osrm::extractor::guidance::getTurnDirection;
|
||||
using osrm::util::angularDeviation;
|
||||
|
||||
namespace osrm
|
||||
@@ -384,19 +388,17 @@ IntersectionHandler::getNextIntersection(const NodeID at, const EdgeID via) cons
|
||||
// Starting at node `a` via edge `e0` the intersection generator returns the intersection at `c`
|
||||
// writing `tl` (traffic signal) node and the edge `e1` which has the intersection as target.
|
||||
|
||||
NodeID node = SPECIAL_NODEID;
|
||||
EdgeID edge = SPECIAL_EDGEID;
|
||||
|
||||
std::tie(node, edge) = intersection_generator.SkipDegreeTwoNodes(at, via);
|
||||
auto intersection = intersection_generator(node, edge);
|
||||
|
||||
const auto intersection_parameters = intersection_generator.SkipDegreeTwoNodes(at, via);
|
||||
// This should never happen, guard against nevertheless
|
||||
if (node == SPECIAL_NODEID || edge == SPECIAL_EDGEID)
|
||||
if (intersection_parameters.nid == SPECIAL_NODEID ||
|
||||
intersection_parameters.via_eid == SPECIAL_EDGEID)
|
||||
{
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
auto intersection_node = node_based_graph.GetTarget(edge);
|
||||
auto intersection =
|
||||
intersection_generator(intersection_parameters.nid, intersection_parameters.via_eid);
|
||||
auto intersection_node = node_based_graph.GetTarget(intersection_parameters.via_eid);
|
||||
|
||||
if (intersection.size() <= 2 || intersection.isTrafficSignalOrBarrier())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user