Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-05-25 18:40:03 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-05-27 14:17:13 +0300
commitc51114a4779d93665fdeac54a0e2600bc2195933 (patch)
tree1bd20625e1cc9f82d371356b226603c1beec951f /routing/features_road_graph.cpp
parentd797fc0ff1e38c048d13652d9125ff7a97667ce6 (diff)
[bicycle routing] Taking into account oneway osm tag (road direction) while bicycle routing.
Diffstat (limited to 'routing/features_road_graph.cpp')
-rw-r--r--routing/features_road_graph.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/routing/features_road_graph.cpp b/routing/features_road_graph.cpp
index 65e5b039bc..1fa3793f48 100644
--- a/routing/features_road_graph.cpp
+++ b/routing/features_road_graph.cpp
@@ -101,9 +101,9 @@ void FeaturesRoadGraph::RoadInfoCache::Clear()
m_cache.clear();
}
-
-FeaturesRoadGraph::FeaturesRoadGraph(Index & index, unique_ptr<IVehicleModelFactory> && vehicleModelFactory)
- : m_index(index),
+FeaturesRoadGraph::FeaturesRoadGraph(Index const & index, bool onewayAsBidirectional,
+ unique_ptr<IVehicleModelFactory> && vehicleModelFactory)
+ : m_index(index), m_onewayAsBidirectional(onewayAsBidirectional),
m_vehicleModel(move(vehicleModelFactory))
{
}
@@ -114,7 +114,7 @@ class CrossFeaturesLoader
{
public:
CrossFeaturesLoader(FeaturesRoadGraph const & graph,
- IRoadGraph::CrossEdgesLoader & edgesLoader)
+ IRoadGraph::ICrossEdgesLoader & edgesLoader)
: m_graph(graph), m_edgesLoader(edgesLoader)
{}
@@ -136,7 +136,7 @@ public:
private:
FeaturesRoadGraph const & m_graph;
- IRoadGraph::CrossEdgesLoader & m_edgesLoader;
+ IRoadGraph::ICrossEdgesLoader & m_edgesLoader;
};
IRoadGraph::RoadInfo FeaturesRoadGraph::GetRoadInfo(FeatureID const & featureId) const
@@ -159,7 +159,7 @@ double FeaturesRoadGraph::GetMaxSpeedKMPH() const
}
void FeaturesRoadGraph::ForEachFeatureClosestToCross(m2::PointD const & cross,
- CrossEdgesLoader & edgesLoader) const
+ ICrossEdgesLoader & edgesLoader) const
{
CrossFeaturesLoader featuresLoader(*this, edgesLoader);
m2::RectD const rect = MercatorBounds::RectByCenterXYAndSizeInMeters(cross, kMwmRoadCrossingRadiusMeters);
@@ -230,6 +230,11 @@ void FeaturesRoadGraph::GetJunctionTypes(Junction const & junction, feature::Typ
m_index.ForEachInRect(f, rect, GetStreetReadScale());
}
+bool FeaturesRoadGraph::ConsiderOnewayFeaturesAsBidirectional() const
+{
+ return m_onewayAsBidirectional;
+};
+
void FeaturesRoadGraph::ClearState()
{
m_cache.Clear();