| 179 | } |
| 180 | |
| 181 | CountryPolygonsCollection LoadCountriesList(std::string const & baseDir) |
| 182 | { |
| 183 | LOG(LINFO, ("Loading countries in", BORDERS_DIR, "folder in", baseDir)); |
| 184 | |
| 185 | CountryPolygonsCollection countryPolygonsCollection; |
| 186 | ForEachCountry(baseDir, [&](std::string name, PolygonsList && borders) |
| 187 | { |
| 188 | PolygonsTree polygons; |
| 189 | for (Polygon & border : borders) |
| 190 | { |
| 191 | auto const rect = border.GetRect(); |
| 192 | polygons.Add(std::move(border), rect); |
| 193 | } |
| 194 | |
| 195 | countryPolygonsCollection.Add(CountryPolygons(std::move(name), std::move(polygons))); |
| 196 | }); |
| 197 | |
| 198 | LOG(LINFO, ("Countries loaded:", countryPolygonsCollection.GetSize())); |
| 199 | CHECK_NOT_EQUAL(countryPolygonsCollection.GetSize(), 0, (baseDir)); |
| 200 | return countryPolygonsCollection; |
| 201 | } |
| 202 | |
| 203 | void GeneratePackedBorders(std::string const & baseDir) |
| 204 | { |
no test coverage detected