2016-02-25 08:40:26 -05:00
|
|
|
#ifndef OSRM_EXTRACTOR_TURN_ANALYSIS
|
|
|
|
#define OSRM_EXTRACTOR_TURN_ANALYSIS
|
|
|
|
|
2016-03-23 08:04:23 -04:00
|
|
|
#include "extractor/compressed_edge_container.hpp"
|
2016-04-08 06:49:14 -04:00
|
|
|
#include "extractor/guidance/intersection.hpp"
|
|
|
|
#include "extractor/guidance/intersection_generator.hpp"
|
2016-04-11 06:51:06 -04:00
|
|
|
#include "extractor/guidance/motorway_handler.hpp"
|
|
|
|
#include "extractor/guidance/roundabout_handler.hpp"
|
2016-03-01 16:30:31 -05:00
|
|
|
#include "extractor/guidance/toolkit.hpp"
|
2016-03-23 08:04:23 -04:00
|
|
|
#include "extractor/guidance/turn_classification.hpp"
|
2016-04-08 06:49:14 -04:00
|
|
|
#include "extractor/guidance/turn_handler.hpp"
|
|
|
|
#include "extractor/query_node.hpp"
|
2016-02-25 08:40:26 -05:00
|
|
|
#include "extractor/restriction_map.hpp"
|
2016-04-22 05:31:46 -04:00
|
|
|
#include "extractor/suffix_table.hpp"
|
2016-02-25 08:40:26 -05:00
|
|
|
|
2016-03-16 10:47:33 -04:00
|
|
|
#include "util/name_table.hpp"
|
2016-04-08 06:49:14 -04:00
|
|
|
#include "util/node_based_graph.hpp"
|
2016-03-16 10:47:33 -04:00
|
|
|
|
2016-03-03 12:30:41 -05:00
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
#include <memory>
|
2016-03-23 08:04:23 -04:00
|
|
|
#include <string>
|
2016-02-25 08:40:26 -05:00
|
|
|
#include <unordered_set>
|
2016-03-23 08:04:23 -04:00
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
2016-02-25 08:40:26 -05:00
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace extractor
|
|
|
|
{
|
2016-03-01 16:30:31 -05:00
|
|
|
namespace guidance
|
|
|
|
{
|
2016-02-25 08:40:26 -05:00
|
|
|
|
2016-03-08 06:40:45 -05:00
|
|
|
class TurnAnalysis
|
2016-02-25 12:31:29 -05:00
|
|
|
{
|
2016-03-17 09:09:09 -04:00
|
|
|
|
2016-03-08 06:40:45 -05:00
|
|
|
public:
|
|
|
|
TurnAnalysis(const util::NodeBasedDynamicGraph &node_based_graph,
|
|
|
|
const std::vector<QueryNode> &node_info_list,
|
|
|
|
const RestrictionMap &restriction_map,
|
|
|
|
const std::unordered_set<NodeID> &barrier_nodes,
|
2016-03-16 10:47:33 -04:00
|
|
|
const CompressedEdgeContainer &compressed_edge_container,
|
2016-04-22 05:31:46 -04:00
|
|
|
const util::NameTable &name_table,
|
|
|
|
const SuffixTable &street_name_suffix_table);
|
2016-03-08 06:40:45 -05:00
|
|
|
|
|
|
|
// the entry into the turn analysis
|
2016-03-17 09:09:09 -04:00
|
|
|
std::vector<TurnOperation> getTurns(const NodeID from_node, const EdgeID via_eid) const;
|
2016-03-08 06:40:45 -05:00
|
|
|
|
2016-04-26 07:27:40 -04:00
|
|
|
// access to the intersection representation for classification purposes
|
|
|
|
Intersection getIntersection(const NodeID from_node, const EdgeID via_eid) const;
|
|
|
|
|
2016-03-08 06:40:45 -05:00
|
|
|
private:
|
|
|
|
const util::NodeBasedDynamicGraph &node_based_graph;
|
2016-04-08 06:49:14 -04:00
|
|
|
const IntersectionGenerator intersection_generator;
|
|
|
|
const RoundaboutHandler roundabout_handler;
|
|
|
|
const MotorwayHandler motorway_handler;
|
|
|
|
const TurnHandler turn_handler;
|
2016-03-08 06:40:45 -05:00
|
|
|
|
|
|
|
// Utility function, setting basic turn types. Prepares for normal turn handling.
|
2016-04-08 06:49:14 -04:00
|
|
|
Intersection
|
|
|
|
setTurnTypes(const NodeID from, const EdgeID via_edge, Intersection intersection) const;
|
2016-05-25 09:24:11 -04:00
|
|
|
|
|
|
|
Intersection handleSliproads(const NodeID intersection_node_id,
|
|
|
|
Intersection intersection) const;
|
2016-03-08 06:40:45 -05:00
|
|
|
}; // class TurnAnalysis
|
2016-02-26 11:33:18 -05:00
|
|
|
|
2016-03-01 16:30:31 -05:00
|
|
|
} // namespace guidance
|
2016-02-25 08:40:26 -05:00
|
|
|
} // namespace extractor
|
|
|
|
} // namespace osrm
|
|
|
|
|
|
|
|
#endif // OSRM_EXTRACTOR_TURN_ANALYSIS
|