| 276 | } |
| 277 | |
| 278 | void ProcessTile(int lat, int lon) |
| 279 | { |
| 280 | auto const tileName = GetIsolinesTileBase(lat, lon); |
| 281 | |
| 282 | if (m_profileParams != nullptr) |
| 283 | { |
| 284 | auto const profilesPath = GetTileProfilesFilePath(lat, lon, m_profileParams->m_tilesProfilesDir); |
| 285 | if (!GetPlatform().IsFileExistsByFullPath(profilesPath)) |
| 286 | { |
| 287 | LOG(LINFO, ("SRTM tile", tileName, "doesn't have profiles, skip processing.")); |
| 288 | return; |
| 289 | } |
| 290 | } |
| 291 | auto const & pl = GetPlatform(); |
| 292 | if (!pl.IsFileExistsByFullPath(base::JoinPath(m_srtmDir, tileName + ".hgt")) && |
| 293 | !pl.IsFileExistsByFullPath(generator::SrtmTile::GetPath(m_srtmDir, tileName))) |
| 294 | { |
| 295 | LOG(LINFO, ("SRTM tile", tileName, "doesn't exist, skip processing.")); |
| 296 | return; |
| 297 | } |
| 298 | |
| 299 | std::ostringstream os; |
| 300 | os << tileName << " (" << lat << ", " << lon << ")"; |
| 301 | m_debugId = os.str(); |
| 302 | |
| 303 | if (m_profileParams != nullptr) |
| 304 | { |
| 305 | auto const profilesPath = GetTileProfilesFilePath(lat, lon, m_profileParams->m_tilesProfilesDir); |
| 306 | |
| 307 | std::set<std::string> profileNames; |
| 308 | CHECK(LoadTileProfiles(profilesPath, profileNames) && !profileNames.empty(), (tileName)); |
| 309 | |
| 310 | for (auto const & profileName : profileNames) |
| 311 | { |
| 312 | auto const & params = m_profileParams->m_profiles.at(profileName); |
| 313 | ProcessTile(lat, lon, tileName, profileName, params); |
| 314 | } |
| 315 | } |
| 316 | else |
| 317 | { |
| 318 | ProcessTile(lat, lon, tileName, "none", *m_params); |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | void ProcessTile(int lat, int lon, std::string const & tileName, std::string const & profileName, |
| 323 | TileIsolinesParams const & params) |
nothing calls this directly
no test coverage detected