[gdal-dev] Howto change geo transform parameters in dataset.

Oliver Eichler oliver.eichler at gmx.de
Mon May 31 12:41:11 EDT 2010


I would like to change the offset of a referenced file. I use
GDALDataset::GetGeoTransform(adfGeoTransform) to read the current
settings. I change adfGeoTransform[0] and adfGeoTransform[3] and use
GDALDataset::SetGeoTransform(adfGeoTransform) to replace the old settings.

Of course that does not work. GDAL tells me that this works only on
newly created datasets. Well ok. 2nd try:

I use GDALDriver::CreateCopy() to create new dataset and to copy all
data. But even with the new copy
GDALDataset::SetGeoTransform(adfGeoTransform) fails for the  same reason.

Can anyone tell me how this is intended to work?



More information about the gdal-dev mailing list