<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 11/21/2012 5:32 AM, Mateusz Loskot wrote:
<blockquote type="cite">
<pre wrap="">On 21 November 2012 12:06, Even Rouault <a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@mines-paris.org"><even.rouault@mines-paris.org></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Selon David Strip <a class="moz-txt-link-rfc2396E" href="mailto:gdal@stripfamily.net"><gdal@stripfamily.net></a>:
</pre>
<blockquote type="cite">
<pre wrap="">The GDAL API tutorial describes this array as:
adfGeoTransform[0]/* top left x */
adfGeoTransform[1]/* w-e pixel resolution */
adfGeoTransform[2]/* rotation, 0 if image is "north up" */
adfGeoTransform[3]/* top left y */
adfGeoTransform[4]/* rotation, 0 if image is "north up" */
adfGeoTransform[5]/* n-s pixel resolution */
The GDAL Data model page says
Xgeo = GT(0) + Xpixel*GT(1) + Yline*GT(2)
Ygeo = GT(3) + Xpixel*GT(4) + Yline*GT(5)
where the GT[i]are the coeffs described above.
From this I conclude that the rotations are not sin/cos of the rotation, but
rather the sin/cos times the
appropriate pixel size. Is that right, or did I miss something?
</pre>
</blockquote>
<pre wrap="">
Yes, for a pure rotation. If the [1], [2], [4] and [5] have no particular
relation, the matrix can represent a combination of scaling, rotation and
shearing. See <a class="moz-txt-link-freetext" href="http://en.wikipedia.org/wiki/Transformation_matrix">http://en.wikipedia.org/wiki/Transformation_matrix</a>
</pre>
</blockquote>
<pre wrap="">
Isaac's "Improving the Documentation of Get/SetGeoTransform" post is
worth checking too:
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/pipermail/gdal-dev/2011-July/029449.html">http://lists.osgeo.org/pipermail/gdal-dev/2011-July/029449.html</a>
Best regards,
</pre>
</blockquote>
Isaac's post is quite informative. However, combined with the
Wikipedia entry and Even's comment, the post is incomplete as it
does not represent the shear coefficients, but that's pretty
straightforward to understand. I think the simplest summary is that
the coeffs 1,2,4,and 5 are the terms of the matrix that we get from
a concatenation of the rotation, sheer, and scaling matrices. <br>
<br>
But that raises a new question about pixel resolution. If I read
this carefully, what I conclude is the [1] is the pixel resolution
of a transformed pixel in true E/W space. It is <i>not</i> the
resolution in the x-direction in the original raster. Is that
correct? If I want the resolution in the original raster, I have to
solve for the underlying scale factors, resolutions, shear, and
rotation angle. That's six unknowns and four equations. <br>
<br>
</body>
</html>