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

Method ProcessTile

tools/topography_generator/generator.cpp:278–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 14

GetIsolinesTileBaseFunction · 0.85
GetTileProfilesFilePathFunction · 0.85
JoinPathFunction · 0.85
GetPathFunction · 0.85
LoadTileProfilesFunction · 0.85
GetIsolinesFilePathFunction · 0.85
FilterTileFunction · 0.85
SimplifyContoursFunction · 0.85
SaveControursFunction · 0.85
atMethod · 0.80
SetPrefferedTileMethod · 0.80
LatLonClass · 0.50

Tested by

no test coverage detected