diff --git a/routing/features_road_graph.cpp b/routing/features_road_graph.cpp index 64a95947e7..c83065914b 100644 --- a/routing/features_road_graph.cpp +++ b/routing/features_road_graph.cpp @@ -50,8 +50,8 @@ public: void operator()(FeatureType const & ft) { - FeatureID fID = ft.GetID(); - if (m_featureID == fID.m_offset) + FeatureID const fID = ft.GetID(); + if (m_featureID == fID.m_offset || fID.m_mwm != m_graph.GetMwmID()) return; feature::TypesHolder types(ft); @@ -89,7 +89,6 @@ public: m_turns.push_back(t); } } - } }; @@ -104,6 +103,9 @@ void FeatureRoadGraph::LoadFeature(uint32_t id, FeatureType & ft) Index::FeaturesLoaderGuard loader(*m_pIndex, m_mwmID); loader.GetFeature(id, ft); ft.ParseGeometry(FeatureType::BEST_GEOMETRY); + + ASSERT_EQUAL(ft.GetFeatureType(), feature::GEOM_LINE, (id)); + ASSERT_GREATER(ft.GetPointsCount(), 1, (id)); } void FeatureRoadGraph::GetPossibleTurns(RoadPos const & pos, vector & turns) diff --git a/routing/features_road_graph.hpp b/routing/features_road_graph.hpp index 2299422329..9d25765675 100644 --- a/routing/features_road_graph.hpp +++ b/routing/features_road_graph.hpp @@ -23,6 +23,8 @@ public: static uint32_t GetStreetReadScale(); + inline size_t GetMwmID() const { return m_mwmID; } + private: friend class CrossFeaturesLoader;