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

Method CreatePlace

generator/place_processor.cpp:249–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249FeaturePlace PlaceProcessor::CreatePlace(feature::FeatureBuilder && fb) const
250{
251 m2::RectD rect = fb.GetLimitRect();
252
253 if (fb.GetGeomType() == GeomType::Point)
254 {
255 // Update point rect with boundary polygons. Rect is used to filter places.
256 auto const id = fb.GetMostGenericOsmId();
257
258 m2::RectD const r = m_boundariesHolder.GetBoundaryRect(id);
259 if (r.IsValid())
260 {
261 if (!r.IsIntersect(rect))
262 {
263 LOG(LERROR,
264 (m_logTag, "FB center not in polygon's bound for:", id, mercator::ToLatLon(rect), mercator::ToLatLon(r)));
265 }
266 rect.Add(r);
267 }
268 }
269
270 return {std::move(fb), rect};
271}
272
273void PlaceProcessor::Add(FeatureBuilder && fb)
274{

Callers

nothing calls this directly

Calls 8

GetMostGenericOsmIdMethod · 0.80
GetBoundaryRectMethod · 0.80
ToLatLonFunction · 0.70
GetLimitRectMethod · 0.45
GetGeomTypeMethod · 0.45
IsValidMethod · 0.45
IsIntersectMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected