@@ -428,17 +428,15 @@ Complete analysis workflow::
428428 selected_tiles = [r for r in results if r['mean_band_50'] > threshold]
429429
430430 print(f"Exporting {len(selected_tiles)} tiles above threshold")
431-
432- files = []
433- for tile in selected_tiles:
434- file = gt.export_embedding_geotiffs(
435- bbox=(tile['lon']-0.05, tile['lat']-0.05,
436- tile['lon']+0.05, tile['lat']+0.05),
437- output_dir="./selected_tiles",
438- year=2024,
439- bands=[40, 50, 60] # Bands around band 50
440- )
441- files.extend(file)
431+
432+ # Prepare tiles for export
433+ tiles_to_export = [(2024, tile['lon'], tile['lat']) for tile in selected_tiles]
434+
435+ files = gt.export_embedding_geotiffs(
436+ tiles_to_fetch=tiles_to_export,
437+ output_dir="./selected_tiles",
438+ bands=[40, 50, 60] # Bands around band 50
439+ )
442440
443441 # Create PCA visualization from selected tiles
444442 # CLI: geotessera visualize ./selected_tiles pca_selected.tif
@@ -468,17 +466,16 @@ Use both numpy and GeoTIFF formats in the same workflow::
468466 selected_coords.append((lon, lat))
469467
470468 print(f"Selected {len(selected_coords)} interesting tiles")
471-
472- # Step 2: Export selected tiles as GeoTIFF
473- all_files = []
474- for lon, lat in selected_coords:
475- files = gt.export_embedding_geotiffs(
476- bbox=(lon-0.05, lat-0.05, lon+0.05, lat+0.05),
477- output_dir="./interesting_tiles",
478- year=2024,
479- bands=[60, 64, 68] # Bands around interesting band 64
480- )
481- all_files.extend(files)
469+
470+ # Step 2: Export selected tiles as GeoTIFF
471+ # Prepare tiles for export
472+ tiles_to_export = [(2024, lon, lat) for lon, lat in selected_coords]
473+
474+ all_files = gt.export_embedding_geotiffs(
475+ tiles_to_fetch=tiles_to_export,
476+ output_dir="./interesting_tiles",
477+ bands=[60, 64, 68] # Bands around interesting band 64
478+ )
482479
483480 # Step 3: Create PCA visualization from selected tiles
484481 print("Creating PCA visualization...")
0 commit comments