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

Method AssignGeometry

generator/coastlines_generator.cpp:115–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 }
114
115 void AssignGeometry(feature::FeatureBuilder & fb)
116 {
117 for (size_t i = 0; i < m_res.size(); ++i)
118 {
119 std::vector<m2::PointD> points;
120 points.reserve(m_res[i].Size() + 1);
121
122 m_res[i].ForEachPoint([&points](PointT const & p)
123 {
124 points.push_back(
125 PointUToPointD(m2::PointU(static_cast<uint32_t>(p.x), static_cast<uint32_t>(p.y)), kPointCoordBits));
126 });
127
128 fb.AddPolygon(std::move(points));
129 }
130 }
131};
132} // namespace coastlines_generator
133

Callers 1

GetFeaturesMethod · 0.80

Calls 7

PointUToPointDFunction · 0.85
AddPolygonMethod · 0.80
sizeMethod · 0.45
reserveMethod · 0.45
SizeMethod · 0.45
ForEachPointMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected