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

Method GetFeatureIdByXmlFeature

libs/editor/osm_editor.cpp:1100–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098}
1099
1100FeatureID Editor::GetFeatureIdByXmlFeature(FeaturesContainer const & features, XMLFeature const & xml,
1101 MwmId const & mwmId, FeatureStatus status, bool needMigrate) const
1102{
1103 ForEachFeaturesNearByFn forEach = [this](FeatureTypeFn && fn, m2::PointD const & point)
1104 { return ForEachFeatureAtPoint(std::move(fn), point); };
1105
1106 // TODO(mgsergio): Deleted features are not properly handled yet.
1107 if (needMigrate)
1108 {
1109 return editor::MigrateFeatureIndex(forEach, xml, status,
1110 [this, &mwmId, &features] { return GenerateNewFeatureId(features, mwmId); });
1111 }
1112
1113 return {mwmId, xml.GetMWMFeatureIndex()};
1114}
1115
1116void Editor::LoadMwmEdits(FeaturesContainer & loadedFeatures, xml_node const & mwm, MwmId const & mwmId,
1117 bool needMigrate)

Callers

nothing calls this directly

Calls 3

ForEachFeatureAtPointFunction · 0.85
MigrateFeatureIndexFunction · 0.85
GetMWMFeatureIndexMethod · 0.80

Tested by

no test coverage detected