@mytec: iter3.10 start, baseline rc ready
This commit is contained in:
@@ -526,19 +526,33 @@ class CoverageService:
|
||||
progress_fn("Loading terrain", 0.25)
|
||||
await asyncio.sleep(0)
|
||||
t_terrain = time.time()
|
||||
|
||||
# Check for missing tiles before attempting download
|
||||
radius_km = settings.radius / 1000.0
|
||||
missing_tiles = self.terrain.get_missing_tiles(site.lat, site.lon, radius_km)
|
||||
if missing_tiles:
|
||||
_clog(f"⚠ Missing terrain tiles: {missing_tiles} - will attempt download")
|
||||
|
||||
tile_names = await self.terrain.ensure_tiles_for_bbox(
|
||||
min_lat, min_lon, max_lat, max_lon
|
||||
)
|
||||
for tn in tile_names:
|
||||
self.terrain._load_tile(tn)
|
||||
|
||||
# Check what actually loaded
|
||||
loaded_tiles = [tn for tn in tile_names if tn in self.terrain._tile_cache]
|
||||
failed_tiles = [tn for tn in tile_names if tn not in self.terrain._tile_cache]
|
||||
if failed_tiles:
|
||||
_clog(f"⚠ TERRAIN WARNING: Failed to load tiles {failed_tiles}. "
|
||||
"Coverage accuracy reduced - using flat terrain for affected areas.")
|
||||
|
||||
site_elevation = self.terrain.get_elevation_sync(site.lat, site.lon)
|
||||
|
||||
point_elevations = {}
|
||||
for lat, lon in grid:
|
||||
point_elevations[(lat, lon)] = self.terrain.get_elevation_sync(lat, lon)
|
||||
terrain_time = time.time() - t_terrain
|
||||
_clog(f"Tiles: {len(tile_names)}, site elev: {site_elevation:.0f}m, "
|
||||
_clog(f"Tiles: {len(loaded_tiles)}/{len(tile_names)} loaded, site elev: {site_elevation:.0f}m, "
|
||||
f"pre-computed {len(grid)} elevations")
|
||||
_clog(f"━━━ PHASE 2 done: {terrain_time:.1f}s ━━━")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user