I'm trying to open a TIFF using GDAL, read it as a array, do some math, and write it back as a TIFF.

However, when I try to gdal.Open(tif) in Python, I get the error:

RuntimeError: /att/gpfsfs/userfs01/ppl/mwooten3/IDS/climate_data_analysis/MODIS_EVI/AverageOutputs/MODIS_EVI_Jan2001-2015_Average_ave.tif' not recognised as a supported file format.

I just did the same thing the same server, with the same versions of gdal/python, but with a different TIFF, and it worked. Also I looked at the TIFF I'm trying to open and it's not corrupt. Also also, triple checked the path and it is in the right spot.

Any idea why this is happening? What am I missing? I'm on a Linux server using GDAL 2.0.1.

  • Could you edit your question and provide more information about the tif. Such as: how it was created (i.e by what software, or where you got it from) and some basic info such as data type, compression, tiling, overviews, masks. Also, can you try in a command line gdalinfo --config CPL_DEBUG ON /path/to/your.tif and include any output. – user2856 Feb 17 '16 at 4:36
  • What do you get with gdalinfo /att/gpfsfs/userfs01/ppl/mwooten3/IDS/climate_data_analysis/MODIS_EVI/AverageOutputs/MODIS_EVI_Jan2001-2015_Average_ave.tif --debug on? – user30184 Feb 17 '16 at 12:08
  • you need to close the dataset before you call gdalwarp. – Yasir Kaheil Dec 1 '17 at 21:58
  • I provided a step by step method at gis.stackexchange.com/a/285685/98816 It could be useful to you too. – Andrea Massetti Oct 12 '18 at 14:30

Browse other questions tagged or ask your own question.