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

Function BuildCitiesIdsForTesting

generator/cities_ids_builder.cpp:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool BuildCitiesIdsForTesting(std::string const & dataPath)
101{
102 CHECK(IsWorldMwm(dataPath), ());
103
104 ankerl::unordered_dense::map<uint32_t, uint64_t> mapping;
105 if (!ParseFeatureIdToTestIdMapping(dataPath, mapping))
106 return false;
107
108 ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> mappingToGeoObjects;
109 for (auto const & entry : mapping)
110 {
111 // todo(@m) Make test ids a new source in base::GeoObjectId?
112 mappingToGeoObjects.emplace(entry.first, base::MakeOsmNode(entry.second));
113 }
114 WriteCitiesIdsSectionToFile(dataPath, mappingToGeoObjects);
115 return true;
116}
117} // namespace generator

Callers 1

FinishMethod · 0.85

Calls 5

IsWorldMwmFunction · 0.85
MakeOsmNodeFunction · 0.85
emplaceMethod · 0.45

Tested by 1

FinishMethod · 0.68