I am using GDAL from osgeo to work on geotif files. I have not figured out out to use the option -a_gt to alter the geotransform and used a systen call instead.
shifted_geotransform = tuple([geoTransform[0]+shift_x, geoTransform[1],geoTransform[2],geoTransform[3]+shift_y,geoTransform[4],geoTransform[5]])
phrase = 'gdal_translate -of GTiff -a_gt '+str(shifted_geotransform[0])+
' '+str(shifted_geotransform[1])+
' '+str(shifted_geotransform[2])+
' '+str(shifted_geotransform[3])+
' '+str(shifted_geotransform[4])+
' '+str(shifted_geotransform[5])+ ' '+file_in+' '+file_out
subprocess.call(phrase)
I would like to use something like
gdal.Transformer(Dataset src, Dataset dst,options)
but I have not found how to formulate the -a_gt in the options.
New contributor
David Boutelier is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.