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

Method GetKeyPoint

generator/feature_merger.cpp:79–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79std::pair<m2::PointD, bool> MergedFeatureBuilder::GetKeyPoint(size_t i) const
80{
81 // 1. check first rounds
82 size_t sz = m_roundBounds[0].size();
83 if (i < sz)
84 return std::make_pair(m_roundBounds[0][i], false);
85 i -= sz;
86
87 // 2. check first point
88 if (i == 0)
89 return std::make_pair(FirstPoint(), false);
90
91 // 3. check last rounds
92 --i;
93 sz = m_roundBounds[1].size();
94 if (i < sz)
95 return std::make_pair(m_roundBounds[1][i], true);
96 i -= sz;
97
98 // 4. return last point
99 ASSERT_EQUAL(i, 0, ());
100 return std::make_pair(LastPoint(), true);
101}
102
103size_t MergedFeatureBuilder::GetKeyPointsCount() const
104{

Callers 6

LessFunction · 0.45
ProcessPlacesMethod · 0.45
CollectMethod · 0.45
EnrichMethod · 0.45
HierarchyPlaceMethod · 0.45
DoMergeMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected