Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDF conversion fails silently if there is no write permission #51

Closed
Huite opened this issue Aug 30, 2023 · 1 comment
Closed

IDF conversion fails silently if there is no write permission #51

Huite opened this issue Aug 30, 2023 · 1 comment

Comments

@Huite
Copy link
Contributor

Huite commented Aug 30, 2023

When opening an IDF, it is converted to an equivalent geotiff file, which is written next to the IDF.

However, if the user does not have writing permission, GDAL will fail silently (since the Python bindings of GDAL do not raise exceptions). Then the raster type will be None, and setGeoTransform will fail instead, which is a very confusing error message.

What we should do instead, I think, is check whether GDAL has not failed, then raise that specific error ("IDF could not be converted to GeoTIFF"), which is probably still general, but less cryptic than "NoneType has no attribute setGeoTransform".

@JoerivanEngelen
Copy link
Contributor

Duplicate from #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants