diff --git a/utils/raw_to_cog.py b/utils/raw_to_cog.py index d97a5e6..2179f56 100644 --- a/utils/raw_to_cog.py +++ b/utils/raw_to_cog.py @@ -58,6 +58,9 @@ def tif_to_cog( logging.info(f"输入文件: {input_path}") if not os.path.exists(str(input_path)): input_path = str(input_path).replace(".tif", "(2).tif") + if not os.path.exists(input_path): + logging.error(f"无法找到输入文件: {input_path}") + return ds = gdal.Open(input_path) if ds is None: logging.error(f"无法打开输入文件: {input_path}")