<div dir="ltr">Hi,<div><div><br></div><div>If I'm correct, the <span style="font-size:12.8000001907349px">QgsLeastSquares::affine() method is used when creating a worldfile, and it seems it does not account for rotation (at least the generated worldfiles don't).</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Not really sure of what you're trying to do, but just in case, here's </span><span style="font-size:12.8000001907349px">my implementation to compute worldfile parameters with rotation too (I had no time to port to core yet) : </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><a href="https://gist.github.com/olivierdalang/ba97fc986ade4545068d">https://gist.github.com/olivierdalang/ba97fc986ade4545068d</a></span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div>Best,</div><div><br></div><div>Olivier</div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-04 10:35 GMT+02:00 Benjamin Ducke <span dir="ltr"><<a href="mailto:benducke@fastmail.fm" target="_blank">benducke@fastmail.fm</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Devs --<br>
<br>
I am currently converting the transformation methods<br>
in the QGIS Georeferencer to plain C.<br>
So far, I have been able to extract and convert the<br>
projective and Helmert transformations.<br>
<br>
However, the code for the affine transformation seems<br>
incomplete.<br>
<br>
Looking here:<br>
<br>
<a href="https://github.com/qgis/QGIS/trunk/src/plugins/georeferencer/qgsleastsquares.cpp" target="_blank">https://github.com/qgis/QGIS/trunk/src/plugins/georeferencer/qgsleastsquares.cpp</a><br>
<br>
I find this method:<br>
<br>
void QgsLeastSquares::affine()<br>
<br>
It computes a 6x6 transformation matrix but stops there.<br>
In analogy to "QgsLeastSquares::helmert()", I _think_<br>
the next step should be to extract the rotation, scaling,<br>
translation and shearing vectors using "gsl_vector_get()".<br>
<br>
It seems to me that "QgsLeastSquares::affine()" has been<br>
abandoned code for a while and that the affine transformation<br>
is now delegated to gdal_warp(?).<br>
<br>
Does anyone here still remember how to extract the affine<br>
components from the 6x6 matrix? I have done some extensive<br>
searching on the web but came up empty. Any pointers would<br>
be greatly appreciated.<br>
<br>
Cheers,<br>
<br>
Ben<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div>