Calculating segregated node-based edges.

This commit is contained in:
vng
2017-10-14 10:54:26 +00:00
committed by Michael Krasnyk
parent f460a9f17e
commit ee7912f882
5 changed files with 240 additions and 14 deletions
+3
View File
@@ -47,6 +47,7 @@ namespace extractor
class ScriptingEnvironment;
struct ProfileProperties;
class NodeBasedGraphFactory;
class Extractor
{
@@ -100,6 +101,8 @@ class Extractor
void WriteConditionalRestrictions(
const std::string &path,
std::vector<ConditionalTurnRestriction> &conditional_turn_restrictions);
size_t FindSegregatedNodes(NodeBasedGraphFactory &factory);
};
}
}
@@ -36,12 +36,13 @@ class NodeBasedGraphFactory
// node-based graph to represent the OSM network. This includes geometry compression, annotation
// data optimisation and many other aspects. After this step, the edge-based graph factory can
// turn the graph into the routing graph to be used with the navigation algorithms.
NodeBasedGraphFactory(const boost::filesystem::path &input_file,
ScriptingEnvironment &scripting_environment,
std::vector<TurnRestriction> &turn_restrictions,
std::vector<ConditionalTurnRestriction> &conditional_turn_restrictions);
NodeBasedGraphFactory(const boost::filesystem::path &input_file);
auto const &GetGraph() const { return compressed_output_graph; }
void CompressAll(ScriptingEnvironment &scripting_environment,
std::vector<TurnRestriction> &turn_restrictions,
std::vector<ConditionalTurnRestriction> &conditional_turn_restrictions);
auto &GetGraph() { return compressed_output_graph; }
auto const &GetBarriers() const { return barriers; }
auto const &GetTrafficSignals() const { return traffic_signals; }
auto &GetCompressedEdges() { return compressed_edge_container; }
+3 -2
View File
@@ -22,7 +22,7 @@ struct NodeBasedEdgeData
{
NodeBasedEdgeData()
: weight(INVALID_EDGE_WEIGHT), duration(INVALID_EDGE_WEIGHT), geometry_id({0, false}),
reversed(false), annotation_data(-1)
reversed(false), segregated(false), annotation_data(-1)
{
}
@@ -33,7 +33,7 @@ struct NodeBasedEdgeData
extractor::NodeBasedEdgeClassification flags,
AnnotationID annotation_data)
: weight(weight), duration(duration), geometry_id(geometry_id), reversed(reversed),
flags(flags), annotation_data(annotation_data)
segregated(false), flags(flags), annotation_data(annotation_data)
{
}
@@ -41,6 +41,7 @@ struct NodeBasedEdgeData
EdgeWeight duration;
GeometryID geometry_id;
bool reversed : 1;
bool segregated : 1;
extractor::NodeBasedEdgeClassification flags;
AnnotationID annotation_data;
};