I'm trying to clip a raster using gdal.Translate but i get this error message:
Traceback (most recent call last):
File "C:/Users/Mouqsit/Desktop/test.py", line 6, in <module>
ds = gdal.Translate("C:\\wamp\\www\\Donnees_CRTS\\irrisat_dessimination-smiej\\new.tif", ds, projWin = [681483.831264, 3558183.87652, 747933.831264, 3607833.87652])
AttributeError: 'module' object has no attribute 'Translate'
This is my code:
from osgeo import gdal
import sys ,os
output_dir='C:\\wamp\\www\\Donnees_CRTS\\irrisat_dessimination-smiej'
etp = os.path.join(output_dir,"L8_L8_ETpot_24_30m_2016_223.tif")
ds = gdal.Open(etp)
ds = gdal.Translate("C:\\wamp\\www\\Donnees_CRTS\\irrisat_dessimination-
smiej\\new.tif", ds, projWin = [681483.831264, 3558183.87652, 747933.831264,
3607833.87652])
ds = None
Have you any idea about what is happening right here?
gdal.Translate
print gdal.VersionInfo()
return?1110200
should be 1.11.2, if I'm not wrong... So you should update your Python GDAL bindings in order to makegdal.Translate
work.