| 113 | } |
| 114 | |
| 115 | bool CoordinateFromXML(pugi::xml_node const & node, ms::LatLon const & prevCoord, ms::LatLon & latLon) |
| 116 | { |
| 117 | int32_t lat, lon; |
| 118 | if (!GetLatLon(node.child("olr:coordinate"), lat, lon)) |
| 119 | return false; |
| 120 | |
| 121 | // This constant is provided by the given OpenLR variant |
| 122 | // with no special meaning and is used as a factor to store doubles as ints. |
| 123 | auto const kOpenlrDeltaFactor = 100000; |
| 124 | |
| 125 | latLon.m_lat = prevCoord.m_lat + static_cast<double>(lat) / kOpenlrDeltaFactor; |
| 126 | latLon.m_lon = prevCoord.m_lon + static_cast<double>(lon) / kOpenlrDeltaFactor; |
| 127 | |
| 128 | return true; |
| 129 | } |
| 130 | |
| 131 | bool LinePropertiesFromXML(pugi::xml_node const & linePropNode, openlr::LocationReferencePoint & locPoint) |
| 132 | { |
no test coverage detected