fix(raw_to_cog.py): 添加输入文件备用路径的二次检查.
This commit is contained in:
parent
566a75f6fc
commit
4dd7077d56
@ -58,6 +58,9 @@ def tif_to_cog(
|
|||||||
logging.info(f"输入文件: {input_path}")
|
logging.info(f"输入文件: {input_path}")
|
||||||
if not os.path.exists(str(input_path)):
|
if not os.path.exists(str(input_path)):
|
||||||
input_path = str(input_path).replace(".tif", "(2).tif")
|
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)
|
ds = gdal.Open(input_path)
|
||||||
if ds is None:
|
if ds is None:
|
||||||
logging.error(f"无法打开输入文件: {input_path}")
|
logging.error(f"无法打开输入文件: {input_path}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user