Skip to content

Commit f315add

Browse files
committed
fix: Fix bug where Unify rasters CLI mixed output raster names and data
1 parent 4ac36f1 commit f315add

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eis_toolkit/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ def unify_rasters_cli(
13661366

13671367
out_rasters_dict = {}
13681368
for i, (out_image, out_meta) in enumerate(unified[1:]): # Skip writing base raster
1369-
in_raster_name = os.path.splitext(os.path.split(rasters_to_unify[i - 1])[1])[0]
1369+
in_raster_name = os.path.splitext(os.path.split(rasters_to_unify[i])[1])[0]
13701370
output_raster_name = f"{in_raster_name}_unified"
13711371
output_raster_path = output_directory.joinpath(output_raster_name + ".tif")
13721372
with rasterio.open(output_raster_path, "w", **out_meta) as dst:

0 commit comments

Comments
 (0)