File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3132,16 +3132,21 @@ def weights_of_evidence_calculate_weights_cli(
3132
3132
3133
3133
df .to_csv (output_dir .joinpath ("wofe_results.csv" ))
3134
3134
3135
+ out_rasters_dict = {}
3135
3136
file_name = input_raster .name .split ("." )[0 ]
3136
3137
for key , array in arrays .items ():
3137
- output_raster_path = output_dir .joinpath (file_name + "_weights_" + weights_type + "_" + key + ".tif" )
3138
+ output_raster_name = file_name + "_weights_" + weights_type + "_" + key
3139
+ output_raster_path = output_dir .joinpath (output_raster_name + ".tif" )
3138
3140
with rasterio .open (output_raster_path , "w" , ** raster_meta ) as dst :
3139
3141
dst .write (array , 1 )
3142
+ out_rasters_dict [output_raster_name ] = str (output_raster_path )
3140
3143
3144
+ json_str = json .dumps (out_rasters_dict )
3141
3145
typer .echo ("Progress 100%" )
3142
3146
3143
3147
typer .echo (f"Number of deposit pixels: { nr_of_deposits } " )
3144
3148
typer .echo (f"Number of all evidence pixels: { nr_of_pixels } " )
3149
+ typer .echo (f"Output rasters: { json_str } " )
3145
3150
typer .echo (f"Weight calculations completed, rasters and CSV saved to { output_dir } ." )
3146
3151
3147
3152
You can’t perform that action at this time.
0 commit comments