[Gdal-dev] Geotransform (Rotate Image 270 degrees)
Frank Warmerdam
warmerdam at pobox.com
Thu Apr 24 09:59:27 EDT 2008
Lucena, Ivan wrote:
> Frank,
>
> I totally agree with you that SetGeoTransform() does not rotate but for
> your a user point of view it gives the impression that it does because
> when they open the changed image on a rotation-sensible viewer it shows
> it as if it was rotated.
Ivan,
That is true, but it is important (IMHO) for developers to know the
distinction which is why I stressed it. Otherwise it would be easy to
make lots of mistakes.
> Same thing think if you translate or warp it, no?
A gdal_translate (or CreateCopy()) will carry over the geotransform to
the new file if it can, but it won't reorganize the image data to account
for rotation or anything like that.
Gdalwarp will resample the image and produce a north up result. This then
is where the rotation of the geotransform is applied "for real".
Note that lots of geospatial viewers cannot properly display non-northup
images.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list