2018-01-05 08:33:53 -05:00
|
|
|
#ifndef OSRM_GUIDANCE_MOTORWAY_HANDLER_HPP_
|
|
|
|
#define OSRM_GUIDANCE_MOTORWAY_HANDLER_HPP_
|
2016-04-08 06:49:14 -04:00
|
|
|
|
2018-03-21 07:10:02 -04:00
|
|
|
#include "extractor/name_table.hpp"
|
|
|
|
|
2018-01-05 07:05:53 -05:00
|
|
|
#include "guidance/intersection.hpp"
|
|
|
|
#include "guidance/intersection_handler.hpp"
|
|
|
|
#include "guidance/is_through_street.hpp"
|
2016-04-08 06:49:14 -04:00
|
|
|
|
2016-08-02 09:43:29 -04:00
|
|
|
#include "util/attributes.hpp"
|
2016-04-08 06:49:14 -04:00
|
|
|
#include "util/node_based_graph.hpp"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace guidance
|
|
|
|
{
|
|
|
|
|
|
|
|
// Intersection handlers deal with all issues related to intersections.
|
2022-06-27 19:14:28 -04:00
|
|
|
class MotorwayHandler final : public IntersectionHandler
|
2016-04-08 06:49:14 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
MotorwayHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
2018-01-05 08:33:53 -05:00
|
|
|
const extractor::EdgeBasedNodeDataContainer &node_data_container,
|
2017-04-02 19:58:06 -04:00
|
|
|
const std::vector<util::Coordinate> &coordinates,
|
2017-12-03 15:32:17 -05:00
|
|
|
const extractor::CompressedEdgeContainer &compressed_geometries,
|
2018-01-05 08:33:53 -05:00
|
|
|
const extractor::RestrictionMap &node_restriction_map,
|
2017-12-03 15:32:17 -05:00
|
|
|
const std::unordered_set<NodeID> &barrier_nodes,
|
2018-01-05 08:33:53 -05:00
|
|
|
const extractor::TurnLanesIndexedArray &turn_lanes_data,
|
2018-03-21 07:10:02 -04:00
|
|
|
const extractor::NameTable &name_table,
|
2018-01-05 08:33:53 -05:00
|
|
|
const extractor::SuffixTable &street_name_suffix_table);
|
2016-07-04 06:19:49 -04:00
|
|
|
|
|
|
|
~MotorwayHandler() override final = default;
|
2016-04-08 06:49:14 -04:00
|
|
|
|
|
|
|
// check whether the handler can actually handle the intersection
|
|
|
|
bool canProcess(const NodeID nid,
|
|
|
|
const EdgeID via_eid,
|
|
|
|
const Intersection &intersection) const override final;
|
|
|
|
|
|
|
|
// process the intersection
|
|
|
|
Intersection operator()(const NodeID nid,
|
|
|
|
const EdgeID via_eid,
|
|
|
|
Intersection intersection) const override final;
|
|
|
|
|
|
|
|
private:
|
2016-08-02 09:43:29 -04:00
|
|
|
OSRM_ATTR_WARN_UNUSED
|
2016-05-25 09:24:11 -04:00
|
|
|
Intersection handleSliproads(const NodeID intersection_node_id,
|
|
|
|
Intersection intersection) const;
|
2016-08-02 09:43:29 -04:00
|
|
|
|
|
|
|
OSRM_ATTR_WARN_UNUSED
|
2016-04-08 06:49:14 -04:00
|
|
|
Intersection fromMotorway(const EdgeID via_edge, Intersection intersection) const;
|
2016-08-02 09:43:29 -04:00
|
|
|
|
|
|
|
OSRM_ATTR_WARN_UNUSED
|
2016-04-08 06:49:14 -04:00
|
|
|
Intersection fromRamp(const EdgeID via_edge, Intersection intersection) const;
|
|
|
|
|
2016-08-02 09:43:29 -04:00
|
|
|
OSRM_ATTR_WARN_UNUSED
|
2016-04-08 06:49:14 -04:00
|
|
|
Intersection fallback(Intersection intersection) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace guidance
|
|
|
|
} // namespace osrm
|
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
#endif /*OSRM_GUIDANCE_MOTORWAY_HANDLER_HPP_*/
|