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

Function ForEachRefInWay

libs/editor/feature_matcher.cpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void ForEachRefInWay(pugi::xml_document const & osmResponse, pugi::xml_node const & way, ForEachRefFn const & fn)
81{
82 for (auto const & xNodeRef : way.select_nodes("nd/@ref"))
83 {
84 std::string const nodeRef = xNodeRef.attribute().value();
85 auto const node = osmResponse.select_node(("osm/node[@id='" + nodeRef + "']").data()).node();
86 ASSERT(node, ("OSM response have ref", nodeRef, "but have no node with such id.", osmResponse));
87 XMLFeature xmlFt(node);
88 fn(xmlFt);
89 }
90}
91
92void ForEachWayInRelation(pugi::xml_document const & osmResponse, pugi::xml_node const & relation,
93 ForEachWayFn const & fn)

Callers 1

AppendWayFunction · 0.85

Calls 3

ASSERTFunction · 0.85
valueMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected