[Qgis-developer] Use Georeferencer Core-Plugin with python

G. Allegri giohappy at gmail.com
Mon May 19 07:33:04 PDT 2014


It depends on what parts of the Georeferencer you need. If you don't need
the GUI but only the math, you could consider writing a SIP wrapper
around QgsGeorefTransformInterface implementations [1].
Otherwise, if Python performance would suffice, you could grab the low
level math from QgsGeorefTransform and QgsLeastSquares [2] and translate it
to Python.

giovanni

[1]
https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsgeoreftransform.cpp
[2]
https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsleastsquares.cpp



2014-05-19 16:32 GMT+02:00 G. Allegri <giohappy at gmail.com>:

> It depends on what parts of the Georeferencer you need. If you don't need
> the GUI but only the math, you could consider writing a SIP wrapper
> around QgsGeorefTransformInterface implementations [1].
> Otherwise, if Python performance would suffice, you could grab the low
> level math from QgsGeorefTransform and QgsLeastSquares [2] and translate it
> to Python.
>
> giovanni
>
> [1]
> https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsgeoreftransform.cpp
> [2]
> https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsleastsquares.cpp
>
>
> 2014-05-19 16:10 GMT+02:00 Felix Schmidt <felix.schmidt at uni-weimar.de>:
>
> Hello Giovanni,
>> thanks for your answer. Do you think it is easier to write the Plugin for
>> the historical border extraction in c++ instead of python, cause of the
>> binding implementation?
>>
>> Felix
>>
>> Am 19.05.2014 14:52, schrieb G. Allegri:
>>
>>> Hi Felix,
>>> I fear you will have to write your own bindings if you want to leavarage
>>> the Georeferencer plugin code. It's a plugin, so it's functionality isn't
>>> exposed through QGIS API.
>>>
>>
>>
>
>
> --
> Giovanni Allegri
> http://about.me/giovanniallegri
> Twitter: https://twitter.com/_giohappy_
> blog: http://blog.spaziogis.it
> GEO+ geomatica in Italia http://bit.ly/GEOplus
>



-- 
Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/_giohappy_
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140519/460a2493/attachment.html>


More information about the Qgis-developer mailing list