[feat] add source to prefix string on WRITE_TMP_ON_DISK env
Browse files
samgis/prediction_api/predictors.py
CHANGED
@@ -73,9 +73,9 @@ def samexporter_predict(
|
|
73 |
now = datetime.now().strftime('%Y%m%d_%H%M%S')
|
74 |
app_logger.info(msg_write_tmp_on_disk + f"with coords {prefix}, shape:{img.shape}, {len(img.shape)}.")
|
75 |
if img.shape and len(img.shape) == 2:
|
76 |
-
write_raster_tiff(img, transform, f"{prefix}_{now}_", f"raw_tiff", folder_write_tmp_on_disk)
|
77 |
if img.shape and len(img.shape) == 3 and img.shape[2] == 3:
|
78 |
-
write_raster_png(img, transform, f"{prefix}_{now}_", f"raw_img", folder_write_tmp_on_disk)
|
79 |
|
80 |
app_logger.info(
|
81 |
f"img type {type(img)} with shape/size:{img.size}, transform type: {type(transform)}, transform:{transform}.")
|
|
|
73 |
now = datetime.now().strftime('%Y%m%d_%H%M%S')
|
74 |
app_logger.info(msg_write_tmp_on_disk + f"with coords {prefix}, shape:{img.shape}, {len(img.shape)}.")
|
75 |
if img.shape and len(img.shape) == 2:
|
76 |
+
write_raster_tiff(img, transform, f"{source_name}_{prefix}_{now}_", f"raw_tiff", folder_write_tmp_on_disk)
|
77 |
if img.shape and len(img.shape) == 3 and img.shape[2] == 3:
|
78 |
+
write_raster_png(img, transform, f"{source_name}_{prefix}_{now}_", f"raw_img", folder_write_tmp_on_disk)
|
79 |
|
80 |
app_logger.info(
|
81 |
f"img type {type(img)} with shape/size:{img.size}, transform type: {type(transform)}, transform:{transform}.")
|