2017-11-20 11:20:49 -05:00
|
|
|
#ifndef OSRM_EXTRACTOR_INTERSECTION_INTERSECTION_ANALYSIS_HPP
|
|
|
|
#define OSRM_EXTRACTOR_INTERSECTION_INTERSECTION_ANALYSIS_HPP
|
|
|
|
|
|
|
|
#include "extractor/compressed_edge_container.hpp"
|
2017-11-21 14:23:35 -05:00
|
|
|
#include "extractor/guidance/mergable_road_detector.hpp"
|
2017-11-20 11:20:49 -05:00
|
|
|
#include "extractor/guidance/turn_lane_types.hpp"
|
|
|
|
#include "extractor/intersection/intersection_edge.hpp"
|
|
|
|
#include "extractor/restriction_index.hpp"
|
|
|
|
|
|
|
|
#include "util/coordinate.hpp"
|
|
|
|
#include "util/node_based_graph.hpp"
|
|
|
|
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace extractor
|
|
|
|
{
|
|
|
|
namespace intersection
|
|
|
|
{
|
|
|
|
|
|
|
|
IntersectionEdges getIncomingEdges(const util::NodeBasedDynamicGraph &graph,
|
|
|
|
const NodeID intersection);
|
|
|
|
|
|
|
|
IntersectionEdges getOutgoingEdges(const util::NodeBasedDynamicGraph &graph,
|
|
|
|
const NodeID intersection);
|
|
|
|
|
2017-12-03 15:32:17 -05:00
|
|
|
bool isTurnAllowed(const util::NodeBasedDynamicGraph &graph,
|
|
|
|
const EdgeBasedNodeDataContainer &node_data_container,
|
|
|
|
const RestrictionMap &restriction_map,
|
|
|
|
const std::unordered_set<NodeID> &barrier_nodes,
|
|
|
|
const IntersectionEdgeGeometries &geometries,
|
|
|
|
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
|
|
|
const IntersectionEdge &from,
|
|
|
|
const IntersectionEdge &to);
|
|
|
|
|
|
|
|
double findEdgeBearing(const IntersectionEdgeGeometries &geometries, const EdgeID &edge);
|
|
|
|
|
|
|
|
double findEdgeLength(const IntersectionEdgeGeometries &geometries, const EdgeID &edge);
|
|
|
|
|
2017-11-21 14:23:35 -05:00
|
|
|
std::pair<IntersectionEdgeGeometries, std::unordered_set<EdgeID>>
|
|
|
|
getIntersectionGeometries(const util::NodeBasedDynamicGraph &graph,
|
|
|
|
const extractor::CompressedEdgeContainer &compressed_geometries,
|
|
|
|
const std::vector<util::Coordinate> &node_coordinates,
|
|
|
|
const guidance::MergableRoadDetector &detector,
|
|
|
|
const NodeID intersection);
|
|
|
|
|
|
|
|
guidance::IntersectionView
|
|
|
|
convertToIntersectionView(const util::NodeBasedDynamicGraph &graph,
|
|
|
|
const EdgeBasedNodeDataContainer &node_data_container,
|
|
|
|
const RestrictionMap &restriction_map,
|
|
|
|
const std::unordered_set<NodeID> &barrier_nodes,
|
|
|
|
const IntersectionEdgeGeometries &edge_geometries,
|
|
|
|
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
|
|
|
const IntersectionEdge &incoming_edge,
|
|
|
|
const IntersectionEdges &outgoing_edges,
|
|
|
|
const std::unordered_set<EdgeID> &merged_edges);
|
2017-11-20 11:20:49 -05:00
|
|
|
|
2017-12-03 15:32:17 -05:00
|
|
|
guidance::IntersectionView
|
|
|
|
getConnectedRoads(const util::NodeBasedDynamicGraph &graph,
|
|
|
|
const EdgeBasedNodeDataContainer &node_data_container,
|
|
|
|
const std::vector<util::Coordinate> &node_coordinates,
|
|
|
|
const extractor::CompressedEdgeContainer &compressed_geometries,
|
|
|
|
const RestrictionMap &node_restriction_map,
|
|
|
|
const std::unordered_set<NodeID> &barrier_nodes,
|
|
|
|
const guidance::TurnLanesIndexedArray &turn_lanes_data,
|
|
|
|
const IntersectionEdge &incoming_edge);
|
2017-11-20 11:20:49 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|