| 138 | } |
| 139 | |
| 140 | void PathToXML(Path const & path, pugi::xml_node & node) |
| 141 | { |
| 142 | for (auto const & e : path) |
| 143 | { |
| 144 | auto edge = node.append_child("RoadEdge"); |
| 145 | |
| 146 | { |
| 147 | auto fid = edge.append_child("FeatureID"); |
| 148 | FeatureIdToXML(e.GetFeatureId(), fid); |
| 149 | } |
| 150 | |
| 151 | edge.append_child("IsForward").text() = e.IsForward(); |
| 152 | edge.append_child("SegmentId").text() = e.GetSegId(); |
| 153 | { |
| 154 | auto start = edge.append_child("StartJunction"); |
| 155 | auto end = edge.append_child("EndJunction"); |
| 156 | LatLonToXML(mercator::ToLatLon(GetStart(e)), start); |
| 157 | LatLonToXML(mercator::ToLatLon(GetEnd(e)), end); |
| 158 | } |
| 159 | } |
| 160 | } |
| 161 | } // namespace openlr |
| 162 | |
| 163 | namespace routing |