2016-05-13 13:18:00 -04:00
|
|
|
#ifndef OSRM_EXTRACTOR_GUIDANCE_TURN_DISCOVERY_HPP_
|
|
|
|
#define OSRM_EXTRACTOR_GUIDANCE_TURN_DISCOVERY_HPP_
|
|
|
|
|
|
|
|
#include "extractor/guidance/intersection.hpp"
|
2017-12-03 15:32:17 -05:00
|
|
|
#include "extractor/guidance/turn_lane_data.hpp"
|
2017-12-04 07:11:45 -05:00
|
|
|
#include "extractor/restriction_index.hpp"
|
2016-05-13 13:18:00 -04:00
|
|
|
#include "util/typedefs.hpp"
|
|
|
|
|
2017-12-04 07:11:45 -05:00
|
|
|
#include <unordered_set>
|
|
|
|
|
2016-05-13 13:18:00 -04:00
|
|
|
namespace osrm
|
|
|
|
{
|
2017-12-04 07:11:45 -05:00
|
|
|
namespace util
|
|
|
|
{
|
|
|
|
class Coordinate;
|
|
|
|
}
|
|
|
|
|
2016-05-13 13:18:00 -04:00
|
|
|
namespace extractor
|
|
|
|
{
|
2017-12-04 07:11:45 -05:00
|
|
|
|
|
|
|
class CompressedEdgeContainer;
|
|
|
|
|
2016-05-13 13:18:00 -04:00
|
|
|
namespace guidance
|
|
|
|
{
|
2017-12-04 07:11:45 -05:00
|
|
|
|
2016-05-13 13:18:00 -04:00
|
|
|
namespace lanes
|
|
|
|
{
|
|
|
|
|
|
|
|
// OSRM processes edges by looking at a via_edge, coming into an intersection. For turn lanes, we
|
|
|
|
// might require to actually look back a turn. We do so in the hope that the turn lanes match up at
|
|
|
|
// the previous intersection for all incoming lanes.
|
|
|
|
bool findPreviousIntersection(
|
|
|
|
const NodeID node,
|
|
|
|
const EdgeID via_edge,
|
2016-11-15 05:21:26 -05:00
|
|
|
const Intersection &intersection,
|
2016-05-13 13:18:00 -04:00
|
|
|
const util::NodeBasedDynamicGraph &node_based_graph, // query edge data
|
2017-12-03 15:32:17 -05:00
|
|
|
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,
|
2016-05-13 13:18:00 -04:00
|
|
|
// output parameters, will be in an arbitrary state on failure
|
|
|
|
NodeID &result_node,
|
|
|
|
EdgeID &result_via_edge,
|
2016-11-18 03:38:26 -05:00
|
|
|
IntersectionView &result_intersection);
|
2016-05-13 13:18:00 -04:00
|
|
|
|
|
|
|
} // namespace lanes
|
|
|
|
} // namespace guidance
|
|
|
|
} // namespace extractor
|
|
|
|
} // namespace osrm
|
|
|
|
|
|
|
|
#endif /*OSRM_EXTRACTOR_GUIDANCE_TURN_DISCOVERY_HPP_*/
|