| 161 | } |
| 162 | |
| 163 | bool GetBordersRect(std::string const & baseDir, std::string const & country, m2::RectD & bordersRect) |
| 164 | { |
| 165 | auto const bordersFile = base::JoinPath(baseDir, BORDERS_DIR, country + BORDERS_EXTENSION); |
| 166 | if (!Platform::IsFileExistsByFullPath(bordersFile)) |
| 167 | { |
| 168 | LOG(LWARNING, ("File with borders does not exist:", bordersFile)); |
| 169 | return false; |
| 170 | } |
| 171 | |
| 172 | PolygonsList borders; |
| 173 | CHECK(LoadBorders(bordersFile, borders), ()); |
| 174 | bordersRect.MakeEmpty(); |
| 175 | for (auto const & border : borders) |
| 176 | bordersRect.Add(border.GetRect()); |
| 177 | |
| 178 | return true; |
| 179 | } |
| 180 | |
| 181 | CountryPolygonsCollection LoadCountriesList(std::string const & baseDir) |
| 182 | { |
no test coverage detected