When using tifffile version 2022.4.26 (as specified in the requirements.txt), all GeoTIFF files I tried to load read as NODATA (0 in below example). When I manually update tifffile to 2023.4.12 or newer, the data is being loaded properly. I tried loading these files with tifffile directly and the beahvior was the same for older versions, meaning this is not an issue with this library's code. Additionally, this issue only manifests itself when loading as zarr, if loading to a numpy array, the data is loaded correctly.
The code I used for testing:
from geotiff import GeoTiff
import numpy as np
tiff = GeoTiff('FAA_UTM18N_NAD83.tif')
data = tiff.read()
print(np.mean(data))
Also seeing this issue with tifffile version (>=2021.7.2,<2022.4.28) specified in the requirements.txt, but the above fix (upgrading tifffile>=2023.4.12) works.
When using
tifffile
version 2022.4.26 (as specified in the requirements.txt), all GeoTIFF files I tried to load read as NODATA (0 in below example). When I manually updatetifffile
to 2023.4.12 or newer, the data is being loaded properly. I tried loading these files withtifffile
directly and the beahvior was the same for older versions, meaning this is not an issue with this library's code. Additionally, this issue only manifests itself when loading as zarr, if loading to a numpy array, the data is loaded correctly.The code I used for testing:
tifffile
versionThe used GeoTIFF file can be found here.