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

Method PushFeature

generator/world_map_generator.hpp:165–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 }
164
165 bool PushFeature(feature::FeatureBuilder & fb)
166 {
167 switch (fb.GetGeomType())
168 {
169 case feature::GeomType::Line:
170 {
171 MergedFeatureBuilder * p = m_typesCorrector(fb);
172 if (p)
173 m_merger(p);
174 return false;
175 }
176 case feature::GeomType::Area:
177 {
178 /// @todo Initial area threshold to push area objects into World.mwm
179 auto const & geometry = fb.GetOuterGeometry();
180 if (GetPolygonArea(geometry.begin(), geometry.end()) < 0.0025)
181 return false;
182 }
183 default: break;
184 }
185
186 if (feature::PreprocessForWorldMap(fb))
187 {
188 m_worldBucket.PushSure(fb);
189 return true;
190 }
191
192 return false;
193 }
194
195 void DoMerge() { m_merger.DoMerge(m_worldBucket); }
196};

Callers

nothing calls this directly

Calls 6

GetPolygonAreaFunction · 0.85
PreprocessForWorldMapFunction · 0.85
PushSureMethod · 0.80
GetGeomTypeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected