Python GDAL tiff file; not recognised as a supported file format

المشرف العام

Administrator
طاقم الإدارة
When I want to open a tiff file using Python gdal, it gives an error using a relative path to the file location:

from os.path import joinimport gdalfrom gdalconst import *filelocation = r'../../tiff - files'filename = '2015-01-01 geodata.tiff'# open the raster data setds = gdal.Open(join(filelocation, filename), GA_ReadOnly)I get the error:

ERROR 4: '../../tiff - files/2015-01-01 geodata.tiff' not recognised as a supported file format.Strangely it does work with an absolute path to the file location. I'm sure the relative path is correct, since I can listdir it.



أكثر...
 
أعلى