[gdal-dev] Unable to Rotate Image uisng setGeoTransform
Pratap Chelamilla
pratap.chelamilla at amigooptima.in
Wed Jul 16 05:32:11 PDT 2014
Hi,
How to rotate an image with different angles(such as 30 ,45 60 .....
degress) using SetGeoTransform?
I have tried setting newTie[2] =45 degree and newTie[2] =
(45.0*3.1415926)/180) in radians
double *newTie = new double[6];
newTie[0] = tie[0] + (xPos*tie[1]); /*
adfGeoTransform[0] /* top left x */
newTie[3] = tie[3] + (yPos*tie[5]); /*
adfGeoTransform[3] /* top left y */
newTie[1] = tie[1]; /*
adfGeoTransform[1] /* w-e pixel resolution */
newTie[2] = 45.0; /* adfGeoTransform[2]
/* rotation, 0 if image is "north up" */
newTie[4] = 45.0; /* adfGeoTransform[4]
/* rotation, 0 if image is "north up" */
newTie[5] = tie[5]; /* adfGeoTransform[5] /*
n-s pixel resolution */
But,SetGeoTransform is not affecting any change on image after writing with
RasterIO (unable to see any rotated image),Image is georeferenced.
What values should I use for adfGeoTransform[2]/newTie[2] and
adfGeoTransform[4]/newTie[4]?
Thanks,
Pratap.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140716/c7ca8bb3/attachment.html>
More information about the gdal-dev
mailing list