[Qgis-developer] Affine transformation code in Georeferencer -- incomplete?

Olivier Dalang olivier.dalang at gmail.com
Tue May 5 02:20:51 PDT 2015


Hi,

If I'm correct, the 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).

Not really sure of what you're trying to do, but just in case, here's my
implementation to compute worldfile parameters with rotation too (I had no
time to port to core yet) :

https://gist.github.com/olivierdalang/ba97fc986ade4545068d

Best,

Olivier




2015-05-04 10:35 GMT+02:00 Benjamin Ducke <benducke at fastmail.fm>:

> Dear Devs --
>
> I am currently converting the transformation methods
> in the QGIS Georeferencer to plain C.
> So far, I have been able to extract and convert the
> projective and Helmert transformations.
>
> However, the code for the affine transformation seems
> incomplete.
>
> Looking here:
>
>
> https://github.com/qgis/QGIS/trunk/src/plugins/georeferencer/qgsleastsquares.cpp
>
> I find this method:
>
> void QgsLeastSquares::affine()
>
> It computes a 6x6 transformation matrix but stops there.
> In analogy to "QgsLeastSquares::helmert()", I _think_
> the next step should be to extract the rotation, scaling,
> translation and shearing vectors using "gsl_vector_get()".
>
> It seems to me that "QgsLeastSquares::affine()" has been
> abandoned code for a while and that the affine transformation
> is now delegated to gdal_warp(?).
>
> Does anyone here still remember how to extract the affine
> components from the 6x6 matrix? I have done some extensive
> searching on the web but came up empty. Any pointers would
> be greatly appreciated.
>
> Cheers,
>
> Ben
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150505/5b3fa064/attachment.html>


More information about the Qgis-developer mailing list