Use indexes in src.tile, fix top level dir import

pull/1677/head
Piero Toffanin 2025-05-17 12:53:13 -04:00
rodzic c0f4d8d63e
commit b8485e1721
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -435,7 +435,7 @@ class Tiles(TaskNestedView):
tile_buffer=tile_buffer,
resampling_method=resampling, vrt_options=vrt_options)
else:
tile = src.tile(x, y, z, tilesize=tilesize, nodata=nodata,
tile = src.tile(x, y, z, indexes=indexes, tilesize=tilesize, nodata=nodata,
padding=padding,
tile_buffer=tile_buffer,
resampling_method=resampling, vrt_options=vrt_options)

Wyświetl plik

@ -987,7 +987,7 @@ class Task(models.Model):
# Check if the zip file contained a top level directory
# which shouldn't be there and try to fix the structure
top_level = [os.path.join(assets_dir, d) for d in os.listdir(assets_dir)]
if len(top_level) == 1 and os.path.isdir(top_level[0]):
if len(top_level) == 1 and os.path.isdir(top_level[0]) and top_level[0][-14:] != "odm_orthophoto":
second_level = [os.path.join(top_level[0], f) for f in os.listdir(top_level[0])]
if len(second_level) > 0:
logger.info("Top level directory found in imported archive, attempting to fix")