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

Function PathToXML

tools/openlr/decoded_path.cpp:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void 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
163namespace routing

Callers 3

SaveSampleAsMethod · 0.85
WriteAssessmentFileFunction · 0.85
TestSerializeDeserializeFunction · 0.85

Calls 8

FeatureIdToXMLFunction · 0.85
LatLonToXMLFunction · 0.85
GetStartFunction · 0.85
GetEndFunction · 0.85
GetSegIdMethod · 0.80
ToLatLonFunction · 0.50
GetFeatureIdMethod · 0.45
IsForwardMethod · 0.45

Tested by 1

TestSerializeDeserializeFunction · 0.68