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

Function BuildCitiesIds

generator/cities_ids_builder.cpp:79–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77namespace generator
78{
79bool BuildCitiesIds(std::string const & dataPath, std::string const & osmToFeaturePath)
80{
81 if (!IsWorldMwm(dataPath))
82 {
83 LOG(LINFO, ("Skipping generation of cities ids for the non-world mwm file at", dataPath));
84 return false;
85 }
86
87 classificator::Load();
88
89 ankerl::unordered_dense::map<uint32_t, base::GeoObjectId> mapping;
90 if (!ParseFeatureIdToOsmIdMapping(osmToFeaturePath, mapping))
91 {
92 LOG(LERROR, ("Can't parse feature id to osm id mapping."));
93 return false;
94 }
95
96 WriteCitiesIdsSectionToFile(dataPath, mapping);
97 return true;
98}
99
100bool BuildCitiesIdsForTesting(std::string const & dataPath)
101{

Callers 1

generator_tool.cppFile · 0.85

Calls 4

IsWorldMwmFunction · 0.85
LoadFunction · 0.70

Tested by

no test coverage detected