| 77 | namespace generator |
| 78 | { |
| 79 | bool 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 | |
| 100 | bool BuildCitiesIdsForTesting(std::string const & dataPath) |
| 101 | { |
no test coverage detected