<div dir="ltr">Of course Matthias is right if you want to interface with a plugin instance running inside QGIS. That's why I said you could bind only the inner logic of the Georeferencer to use it "outside" the plugin instance. In case you need to control, or get work done from, the Georeferencer plugin itself you have to do what Matthias is doing in its commit.<div>
<br></div><div>giovanni</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-19 18:33 GMT+02:00 Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias.kuhn@gmx.ch" target="_blank">matthias.kuhn@gmx.ch</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The python modules gui and core are exported and the "iface" variable (QgisInterface) knows about their presence. But QgisInterface should not have any dependencies on plugin code, therefore it's harder to access this code.<br>

It may not be hard if you only make use of code which you use in a standalone library way (maybe that would already be enough for your case). If you want to get access to a running plugin instance this is a different story. You can have a look at the code in [1] for an example of how this might be accomplished. Although the code seems not to be working, I've got to check what's still missing there, but in principle the ideas in commit [1] should work.<br>

<br>
Best,<br>
Matthias<br>
<br>
[1] <a href="https://github.com/m-kuhn/QGIS/commit/571b4fa7e6afcefb9c4911339db2c4b7689ce6a9" target="_blank">https://github.com/m-kuhn/<u></u>QGIS/commit/<u></u>571b4fa7e6afcefb9c4911339db2c4<u></u>b7689ce6a9</a><div class="">
<br>
<br>
<br>
On Mon 19 May 2014 05:34:41 PM CEST, Felix Schmidt wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
@Matthias: what do you mean with:<br>
Am 19.05.2014 16:41, schrieb Matthias Kuhn: "the code is not exported<br>
to the gui or core libraries/sip modules"?<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
It will not be so easy to just write wrappers because the code is not<br>
exported to the gui or core libraries/sip modules.<br>
I have written code that makes it possible to generate python<br>
bindings for (C++) plugins and I'm considering creating a<br>
pull-request for it.<br>
<br>
Matthias<br>
<br>
<br>
On 05/19/2014 04:33 PM, G. Allegri wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
It depends on what parts of the Georeferencer you need. If you don't<br>
need the GUI but only the math, you could consider writing a SIP<br>
wrapper around QgsGeorefTransformInterface implementations [1].<br>
Otherwise, if Python performance would suffice, you could grab the<br>
low level math from QgsGeorefTransform and QgsLeastSquares [2] and<br>
translate it to Python.<br>
<br>
giovanni<br>
<br>
[1]<br>
<a href="https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsgeoreftransform.cpp" target="_blank">https://github.com/qgis/QGIS/<u></u>blob/master/src/plugins/<u></u>georeferencer/<u></u>qgsgeoreftransform.cpp</a><br>

[2]<br>
<a href="https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsleastsquares.cpp" target="_blank">https://github.com/qgis/QGIS/<u></u>blob/master/src/plugins/<u></u>georeferencer/qgsleastsquares.<u></u>cpp</a><br>

<br>
<br>
<br>
2014-05-19 16:32 GMT+02:00 G. Allegri <<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a><br></div>
<mailto:<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a>>>:<div class=""><br>
<br>
    It depends on what parts of the Georeferencer you need. If you<br>
    don't need the GUI but only the math, you could consider writing<br>
    a SIP wrapper around QgsGeorefTransformInterface implementations<br>
    [1].<br>
    Otherwise, if Python performance would suffice, you could grab<br>
    the low level math from QgsGeorefTransform and QgsLeastSquares<br>
    [2] and translate it to Python.<br>
<br>
    giovanni<br>
<br>
    [1]<br>
    <a href="https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsgeoreftransform.cpp" target="_blank">https://github.com/qgis/QGIS/<u></u>blob/master/src/plugins/<u></u>georeferencer/<u></u>qgsgeoreftransform.cpp</a><br>

    [2]<br>
    <a href="https://github.com/qgis/QGIS/blob/master/src/plugins/georeferencer/qgsleastsquares.cpp" target="_blank">https://github.com/qgis/QGIS/<u></u>blob/master/src/plugins/<u></u>georeferencer/qgsleastsquares.<u></u>cpp</a><br>

<br>
<br>
    2014-05-19 16:10 GMT+02:00 Felix Schmidt<br></div>
    <<a href="mailto:felix.schmidt@uni-weimar.de" target="_blank">felix.schmidt@uni-weimar.de</a> <mailto:<a href="mailto:felix.schmidt@uni-weimar.de" target="_blank">felix.schmidt@uni-<u></u>weimar.de</a>>>:<div>
<div class="h5"><br>
<br>
        Hello Giovanni,<br>
        thanks for your answer. Do you think it is easier to write<br>
        the Plugin for the historical border extraction in c++<br>
        instead of python, cause of the binding implementation?<br>
<br>
        Felix<br>
<br>
        Am 19.05.2014 14:52, schrieb G. Allegri:<br>
<br>
            Hi Felix,<br>
            I fear you will have to write your own bindings if you<br>
            want to leavarage the Georeferencer plugin code. It's a<br>
            plugin, so it's functionality isn't exposed through QGIS<br>
            API.<br>
<br>
<br>
<br>
<br>
<br>
    --<br>
    Giovanni Allegri<br>
    <a href="http://about.me/giovanniallegri" target="_blank">http://about.me/<u></u>giovanniallegri</a><br>
    Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a><br>
    blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>
    GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a><br>
<br>
<br>
<br>
<br>
--<br>
Giovanni Allegri<br>
<a href="http://about.me/giovanniallegri" target="_blank">http://about.me/<u></u>giovanniallegri</a><br>
Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a><br>
blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>
GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</div></div></blockquote>
<br>
</blockquote>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div>