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

Function GetMercatorPointFromNode

libs/editor/xml_feature.cpp:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73m2::PointD GetMercatorPointFromNode(pugi::xml_node const & node)
74{
75 m2::PointD p;
76 if (!strings::to_double(node.attribute("x").value(), p.x))
77 MYTHROW(editor::NoXY, ("Can't parse x attribute: " + string(node.attribute("x").value())));
78 if (!strings::to_double(node.attribute("y").value(), p.y))
79 MYTHROW(editor::NoXY, ("Can't parse y attribute: " + string(node.attribute("y").value())));
80 return p;
81}
82
83void ValidateElement(pugi::xml_node const & nodeOrWay)
84{

Callers 1

GetGeometryMethod · 0.85

Calls 2

to_doubleFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected