Skip to content
Snippets Groups Projects
Verified Commit 8d8fe877 authored by Jesper Zedlitz's avatar Jesper Zedlitz
Browse files

check that the file could be read

parent 4c89f785
No related branches found
No related tags found
Loading
......@@ -7,6 +7,10 @@ import os
def is_geotiff(resource, file_name):
dataset = gdal.Open(file_name)
if not dataset:
resource["error"] = f"could not read file {file_name}"
return False
geotransform = dataset.GetGeoTransform()
default_transform = (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment