I have some BigTiff files that I need to read into Python using gdal to do some analyses. According to GDAL's documentation:
When built with internal libtiff or with libtiff >= 4.0, GDAL also supports reading and writing BigTIFF files (evolution of the TIFF format to support files larger than 4 GB).
My version of libtiff is 4.0.9, so there should be no problem. However, if I try
bt = gdal.Open('path_to_bigtiff.tif'),
bt is a NoneType. I tested to ensure that non-BigTIFF files are readable with gdal.Open(), which they are.
Furthermore, if I check the list of gdal's supported drivers' metadata like this:
md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('BigTIFF') == -1: return 'BigTIFF is not supported'
BigTIFFs are not supported. My version of gdal is 2.2.2.
Using Anaconda, I created a new environment with
conda create --name test1 gdal
but I get the same result--gdal 2.2.2 is installed along with libtiff 4.0.9 and BigTiff files still cannot be read.
Using Anaconda again, I created a new environment with
conda create --name test2 gdal=2.3.1 -c conda-forge
but when I run
import gdal in the test2 environment, I get the error message
ImportError: DLL load failed: The specified module could not be found.
How can I install a version of gdal that will permit me to load BigTiffs? I would also like it to be compatible with rasterio and fiona if possible.
Here is the output from
conda info for the environment containing 2.2.2:
(geoenv) C:\Users\Jon>conda info
active environment : geoenv active env location : C:\Users\Jon\Anaconda3\envs\geoenv shell level : 2 user config file : C:\Users\Jon\.condarc populated config files : C:\Users\Jon\.condarc conda version : 4.5.9 conda-build version : 3.0.27 python version : 3.6.3.final.0 base environment : C:\Users\Jon\Anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : C:\Users\Jon\Anaconda3\pkgs C:\Users\Jon\AppData\Local\conda\conda\pkgs envs directories : C:\Users\Jon\Anaconda3\envs C:\Users\Jon\AppData\Local\conda\conda\envs C:\Users\Jon\.conda\envs platform : win-64 user-agent : conda/4.5.9 requests/2.18.4 CPython/3.6.3 Windows/10 Windows/10.0.15063 administrator : False netrc file : None offline mode : False