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

Allow usage of rasterio instead of GDAL's python bindings for loading/saving of files #63

Merged
merged 1 commit into from May 15, 2024

Conversation

tgrandje
Copy link
Contributor

@tgrandje tgrandje commented Dec 6, 2022

Add possibility to use rasterio rather than GDAL's python bindings: GDAL's python bindings can be gruesome to install, especially on windows) ; rasterio includes it's own API and a GDAL distribution (whereas GDAL python package does not).

GDAL's python bindings (= GDAL python package, refered further to as 'gdal') and rasterio are not compatible; more can be found there. As gdal initializes the context at the first call of the module, I chose to test the presence of rasterio first.

(Sorry for the diff-file format; it will be difficult to read because I moved all exceptions messages at the start of LoadGDAL, instead of duplicating these in rasterio's and gdal's sections...)

Add possibility to use rasterio rather than GDAL python bindings
@tgrandje tgrandje changed the title Update __init__.py Allow usage of rasterio instead of GDAL's python bindings for loading/saving of files Dec 6, 2022
@r-barnes
Copy link
Owner

@tgrandje - Thanks! Rather than using the big try-except blocks, it would have been better to put the contents of said blocks into their own functions in order to make the logic of the try-except clearer. I'll accept this and make that change myself.

@r-barnes r-barnes merged commit d5c9385 into r-barnes:master May 15, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants