MCPcopy Create free account
hub / github.com/comaps/comaps / FindClosestEdges

Method FindClosestEdges

libs/routing/features_road_graph.cpp:153–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void 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
172vector<IRoadGraph::FullRoadInfo> FeaturesRoadGraphBase::FindRoads(m2::RectD const & rect,
173 IsGoodFeatureFn const & isGoodFeature) const

Callers 3

UNIT_TESTFunction · 0.45
GetNearestEdgesMethod · 0.45

Calls 7

FullRoadInfoClass · 0.85
ForEachStreetMethod · 0.80
AddInformationSourceMethod · 0.80
CenterMethod · 0.45
IsRoadMethod · 0.45
GetIDMethod · 0.45
MakeResultMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.36