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

Method AddRegionToTree

generator/coastlines_generator.cpp:136–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134CoastlineFeaturesGenerator::CoastlineFeaturesGenerator() : m_merger(kPointCoordBits) {}
135
136void CoastlineFeaturesGenerator::AddRegionToTree(feature::FeatureBuilder const & fb)
137{
138 ASSERT(fb.IsGeometryClosed(), ());
139
140 fb.ForEachPolygon([&](auto const & polygon)
141 {
142 if (polygon.empty())
143 return;
144
145 using namespace coastlines_generator;
146 RegionT rgn = CreateRegionI(polygon);
147 auto const limitRect = GetLimitRect(rgn);
148
149 m_tree.Add(std::move(rgn), limitRect);
150 });
151}
152
153void CoastlineFeaturesGenerator::Process(feature::FeatureBuilder const & fb)
154{

Callers 1

operator()Method · 0.80

Calls 7

ASSERTFunction · 0.85
CreateRegionIFunction · 0.85
IsGeometryClosedMethod · 0.80
GetLimitRectFunction · 0.70
ForEachPolygonMethod · 0.45
emptyMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected