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

Function FirstCoordinateFromXML

tools/openlr/openlr_model_xml.cpp:95–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93namespace // OpenLR tools and abstractions
94{
95bool FirstCoordinateFromXML(pugi::xml_node const & node, ms::LatLon & latLon)
96{
97 int32_t lat, lon;
98 if (!GetLatLon(node.child("olr:coordinate"), lat, lon))
99 return false;
100
101 latLon.m_lat = ((lat - math::Sign(lat) * 0.5) * 360) / (1 << 24);
102 latLon.m_lon = ((lon - math::Sign(lon) * 0.5) * 360) / (1 << 24);
103
104 return true;
105}
106
107std::optional<ms::LatLon> LatLonFormXML(pugi::xml_node const & node)
108{

Callers 1

Calls 2

GetLatLonFunction · 0.85
SignFunction · 0.85

Tested by

no test coverage detected