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

Method GetGeometryCenter

generator/feature_builder.cpp:61–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61m2::PointD FeatureBuilder::GetGeometryCenter(PointSeq const & poly)
62{
63 m2::PointD ret(0.0, 0.0);
64 size_t const count = poly.size();
65 for (size_t i = 0; i < count; ++i)
66 ret += poly[i];
67 return ret / count;
68}
69
70m2::PointD FeatureBuilder::GetKeyPoint() const
71{

Callers 2

TransformToPointFunction · 0.45
AddMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by 1

AddMethod · 0.36