| 151 | } |
| 152 | |
| 153 | void FeaturesRoadGraphBase::FindClosestEdges(m2::RectD const & rect, uint32_t count, |
| 154 | vector<pair<Edge, geometry::PointWithAltitude>> & vicinities) const |
| 155 | { |
| 156 | NearestEdgeFinder finder(rect.Center(), nullptr /* IsEdgeProjGood */); |
| 157 | |
| 158 | m_dataSource.ForEachStreet([&](FeatureType & ft) |
| 159 | { |
| 160 | if (!m_vehicleModel.IsRoad(ft)) |
| 161 | return; |
| 162 | |
| 163 | FeatureID const & featureId = ft.GetID(); |
| 164 | |
| 165 | IRoadGraph::RoadInfo const & roadInfo = GetCachedRoadInfo(featureId, ft, kInvalidSpeedKMPH); |
| 166 | finder.AddInformationSource(IRoadGraph::FullRoadInfo(featureId, roadInfo)); |
| 167 | }, rect); |
| 168 | |
| 169 | finder.MakeResult(vicinities, count); |
| 170 | } |
| 171 | |
| 172 | vector<IRoadGraph::FullRoadInfo> FeaturesRoadGraphBase::FindRoads(m2::RectD const & rect, |
| 173 | IsGoodFeatureFn const & isGoodFeature) const |