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

Method SetGeometry

libs/editor/xml_feature.hpp:94–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 /// with it's own data and lat, lon. Here we store only cooridanes in mercator.
93 template <typename Iterator>
94 void SetGeometry(Iterator begin, Iterator end)
95 {
96 ASSERT_NOT_EQUAL(GetType(), Type::Unknown, ());
97 ASSERT_NOT_EQUAL(GetType(), Type::Node, ());
98
99 for (; begin != end; ++begin)
100 {
101 auto nd = GetRootNode().append_child("nd");
102 nd.append_attribute("x") = strings::to_string_dac(begin->x, kLatLonTolerance).data();
103 nd.append_attribute("y") = strings::to_string_dac(begin->y, kLatLonTolerance).data();
104 }
105 }
106
107 template <typename Collection>
108 void SetGeometry(Collection const & geometry)

Callers 2

ToXMLFunction · 0.45
UNIT_TESTFunction · 0.45

Calls 5

to_string_dacFunction · 0.85
GetTypeFunction · 0.50
beginFunction · 0.50
endFunction · 0.50
dataMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.36