Still use low precision bearings
This commit is contained in:
parent
153f9b02a5
commit
08b88bad63
@ -60,7 +60,7 @@ convertToIntersectionView(const util::NodeBasedDynamicGraph &graph,
|
|||||||
// Check for restrictions/barriers and generate a list of valid and invalid turns present at
|
// Check for restrictions/barriers and generate a list of valid and invalid turns present at
|
||||||
// the node reached from `incoming_edge`. The resulting candidates have to be analyzed
|
// the node reached from `incoming_edge`. The resulting candidates have to be analyzed
|
||||||
// for their actual instructions later on.
|
// for their actual instructions later on.
|
||||||
template<bool USE_CLOSE_BEARINGS>
|
template <bool USE_CLOSE_COORDINATE>
|
||||||
guidance::IntersectionView
|
guidance::IntersectionView
|
||||||
getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
||||||
const EdgeBasedNodeDataContainer &node_data_container,
|
const EdgeBasedNodeDataContainer &node_data_container,
|
||||||
|
@ -572,8 +572,8 @@ std::pair<LaneDataVector, LaneDataVector> TurnLaneHandler::partitionLaneData(
|
|||||||
|
|
||||||
// find out about the next intersection. To check for valid matches, we also need the turn
|
// find out about the next intersection. To check for valid matches, we also need the turn
|
||||||
// types. We can skip merging/angle adjustments, though
|
// types. We can skip merging/angle adjustments, though
|
||||||
const auto next_intersection =
|
const auto next_intersection = turn_analysis.AssignTurnTypes(
|
||||||
turn_analysis.AssignTurnTypes(at,
|
at,
|
||||||
straightmost->eid,
|
straightmost->eid,
|
||||||
intersection::getConnectedRoads<false>(node_based_graph,
|
intersection::getConnectedRoads<false>(node_based_graph,
|
||||||
node_data_container,
|
node_data_container,
|
||||||
|
@ -202,7 +202,7 @@ auto getIntersectionLanes(const util::NodeBasedDynamicGraph &graph, const NodeID
|
|||||||
return max_lanes_intersection;
|
return max_lanes_intersection;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<bool USE_CLOSE_BEARINGS>
|
template <bool USE_CLOSE_COORDINATE>
|
||||||
IntersectionEdgeGeometries
|
IntersectionEdgeGeometries
|
||||||
getIntersectionOutgoingGeometries(const util::NodeBasedDynamicGraph &graph,
|
getIntersectionOutgoingGeometries(const util::NodeBasedDynamicGraph &graph,
|
||||||
const extractor::CompressedEdgeContainer &compressed_geometries,
|
const extractor::CompressedEdgeContainer &compressed_geometries,
|
||||||
@ -233,7 +233,7 @@ getIntersectionOutgoingGeometries(const util::NodeBasedDynamicGraph &graph,
|
|||||||
util::coordinate_calculation::bearing(geometry[0], close_coordinate);
|
util::coordinate_calculation::bearing(geometry[0], close_coordinate);
|
||||||
|
|
||||||
const auto representative_coordinate =
|
const auto representative_coordinate =
|
||||||
USE_CLOSE_BEARINGS || graph.GetOutDegree(intersection_node) <= 2
|
USE_CLOSE_COORDINATE || graph.GetOutDegree(intersection_node) <= 2
|
||||||
? coordinate_extractor.GetCoordinateCloseToTurn(
|
? coordinate_extractor.GetCoordinateCloseToTurn(
|
||||||
intersection_node, outgoing_edge, false, remote_node)
|
intersection_node, outgoing_edge, false, remote_node)
|
||||||
: coordinate_extractor.ExtractRepresentativeCoordinate(intersection_node,
|
: coordinate_extractor.ExtractRepresentativeCoordinate(intersection_node,
|
||||||
@ -756,7 +756,7 @@ convertToIntersectionView(const util::NodeBasedDynamicGraph &graph,
|
|||||||
// That means we not only get (from_node, turn_node, c) in the above example
|
// That means we not only get (from_node, turn_node, c) in the above example
|
||||||
// but also (from_node, turn_node, a), (from_node, turn_node, b). These turns are
|
// but also (from_node, turn_node, a), (from_node, turn_node, b). These turns are
|
||||||
// marked as invalid and only needed for intersection classification.
|
// marked as invalid and only needed for intersection classification.
|
||||||
template<bool USE_CLOSE_BEARINGS>
|
template <bool USE_CLOSE_COORDINATE>
|
||||||
guidance::IntersectionView
|
guidance::IntersectionView
|
||||||
getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
||||||
const EdgeBasedNodeDataContainer &node_data_container,
|
const EdgeBasedNodeDataContainer &node_data_container,
|
||||||
@ -769,7 +769,7 @@ getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
|||||||
{
|
{
|
||||||
const auto intersection_node = graph.GetTarget(incoming_edge.edge);
|
const auto intersection_node = graph.GetTarget(incoming_edge.edge);
|
||||||
const auto &outgoing_edges = intersection::getOutgoingEdges(graph, intersection_node);
|
const auto &outgoing_edges = intersection::getOutgoingEdges(graph, intersection_node);
|
||||||
auto edge_geometries = getIntersectionOutgoingGeometries<USE_CLOSE_BEARINGS>(
|
auto edge_geometries = getIntersectionOutgoingGeometries<USE_CLOSE_COORDINATE>(
|
||||||
graph, compressed_geometries, node_coordinates, intersection_node);
|
graph, compressed_geometries, node_coordinates, intersection_node);
|
||||||
|
|
||||||
// Add incoming edges with reversed bearings
|
// Add incoming edges with reversed bearings
|
||||||
@ -800,8 +800,7 @@ getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
|||||||
std::unordered_set<EdgeID>());
|
std::unordered_set<EdgeID>());
|
||||||
}
|
}
|
||||||
|
|
||||||
template
|
template guidance::IntersectionView
|
||||||
guidance::IntersectionView
|
|
||||||
getConnectedRoads<false>(const util::NodeBasedDynamicGraph &graph,
|
getConnectedRoads<false>(const util::NodeBasedDynamicGraph &graph,
|
||||||
const EdgeBasedNodeDataContainer &node_data_container,
|
const EdgeBasedNodeDataContainer &node_data_container,
|
||||||
const std::vector<util::Coordinate> &node_coordinates,
|
const std::vector<util::Coordinate> &node_coordinates,
|
||||||
@ -811,8 +810,7 @@ getConnectedRoads<false>(const util::NodeBasedDynamicGraph &graph,
|
|||||||
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
||||||
const IntersectionEdge &incoming_edge);
|
const IntersectionEdge &incoming_edge);
|
||||||
|
|
||||||
template
|
template guidance::IntersectionView
|
||||||
guidance::IntersectionView
|
|
||||||
getConnectedRoads<true>(const util::NodeBasedDynamicGraph &graph,
|
getConnectedRoads<true>(const util::NodeBasedDynamicGraph &graph,
|
||||||
const EdgeBasedNodeDataContainer &node_data_container,
|
const EdgeBasedNodeDataContainer &node_data_container,
|
||||||
const std::vector<util::Coordinate> &node_coordinates,
|
const std::vector<util::Coordinate> &node_coordinates,
|
||||||
@ -822,7 +820,6 @@ getConnectedRoads<true>(const util::NodeBasedDynamicGraph &graph,
|
|||||||
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
||||||
const IntersectionEdge &incoming_edge);
|
const IntersectionEdge &incoming_edge);
|
||||||
|
|
||||||
|
|
||||||
IntersectionEdge skipDegreeTwoNodes(const util::NodeBasedDynamicGraph &graph, IntersectionEdge road)
|
IntersectionEdge skipDegreeTwoNodes(const util::NodeBasedDynamicGraph &graph, IntersectionEdge road)
|
||||||
{
|
{
|
||||||
std::unordered_set<NodeID> visited_nodes;
|
std::unordered_set<NodeID> visited_nodes;
|
||||||
|
Loading…
Reference in New Issue
Block a user