<div dir="ltr">Hi Felix,<div><br></div><div>Any progress on this ?</div><div>I've also a case where I'd love to be able to use georeferencer with python...</div><div><br></div><div>Thanks !</div><div><br></div><div>

<div dir="ltr">Olivier Dalang<br><font color="#666666">---<br>Digital Humanities Lab (DHLAB) - <a href="http://dhlab.epfl.ch" target="_blank">http://dhlab.epfl.ch</a><br>EPFL CDH DHLAB  / CM 2 271<br>Station 10 / CH-1015 Lausanne<br>

Tel. <a href="tel:%2B41%2021%20693%2002%2046" value="+41216930246" target="_blank">+41 21 693 02 46</a></font></div>
<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-19 22:07 GMT+02:00 Felix Schmidt <span dir="ltr"><<a href="mailto:felix.schmidt@uni-weimar.de" target="_blank">felix.schmidt@uni-weimar.de</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks a lot for the support,<br>
i will read your commit and talk to my team mates on Wednesday.<br>
<br>
Felix<br>
<br>
Am 19.05.2014 21:09, schrieb Matthias Kuhn:<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A pull request is online for review:<br>
<br>
<a href="https://github.com/qgis/QGIS/pull/1370" target="_blank">https://github.com/qgis/QGIS/<u></u>pull/1370</a><br>
<br>
Please post your comments there if you are interested in this<br>
functionality.<br>
<br>
On Mon 19 Mai 2014 18:55:54 CEST, G. Allegri wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Of course Matthias is right if you want to interface with a plugin<br>
instance running inside QGIS. That's why I said you could bind only<br>
the inner logic of the Georeferencer to use it "outside" the plugin<br>
instance. In case you need to control, or get work done from, the<br>
Georeferencer plugin itself you have to do what Matthias is doing in<br>
its commit.<br>
<br>
giovanni<br>
<br>
<br>
2014-05-19 18:33 GMT+02:00 Matthias Kuhn <<a href="mailto:matthias.kuhn@gmx.ch" target="_blank">matthias.kuhn@gmx.ch</a><br>
<mailto:<a href="mailto:matthias.kuhn@gmx.ch" target="_blank">matthias.kuhn@gmx.ch</a>>><u></u>:<br>
<br>
     The python modules gui and core are exported and the "iface"<br>
     variable (QgisInterface) knows about their presence. But<br>
     QgisInterface should not have any dependencies on plugin code,<br>
     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<br>
     standalone library way (maybe that would already be enough for<br>
     your case). If you want to get access to a running plugin instance<br>
     this is a different story. You can have a look at the code in [1]<br>
     for an example of how this might be accomplished. Although the<br>
     code seems not to be working, I've got to check what's still<br>
     missing there, but in principle the ideas in commit [1] should work.<br>
<br>
     Best,<br>
     Matthias<br>
<br>
     [1]<br>
     <a href="https://github.com/m-kuhn/__QGIS/commit/__571b4fa7e6afcefb9c4911339db2c4__b7689ce6a9" target="_blank">https://github.com/m-kuhn/__<u></u>QGIS/commit/__<u></u>571b4fa7e6afcefb9c4911339db2c4<u></u>__b7689ce6a9</a><br>


     <<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>><br>


<br>
<br>
<br>
     On Mon 19 May 2014 05:34:41 PM CEST, Felix Schmidt wrote:<br>
<br>
         @Matthias: what do you mean with:<br>
         Am 19.05.2014 16:41, schrieb Matthias Kuhn: "the code is not<br>
         exported<br>
         to the gui or core libraries/sip modules"?<br>
<br>
             It will not be so easy to just write wrappers because the<br>
             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>
<br>
                 It depends on what parts of the Georeferencer you<br>
                 need. If you don't<br>
                 need the GUI but only the math, you could consider<br>
                 writing a SIP<br>
                 wrapper around QgsGeorefTransformInterface<br>
                 implementations [1].<br>
                 Otherwise, if Python performance would suffice, you<br>
                 could grab the<br>
                 low level math from QgsGeorefTransform and<br>
                 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>


                 <<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>


                 <<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<br>
                 <<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a> <mailto:<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a>><br>
                 <mailto:<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a> <mailto:<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a>>>>:<br>
<br>
<br>
                     It depends on what parts of the Georeferencer you<br>
                 need. If you<br>
                     don't need the GUI but only the math, you could<br>
                 consider writing<br>
                     a SIP wrapper around QgsGeorefTransformInterface<br>
                 implementations<br>
                     [1].<br>
                     Otherwise, if Python performance would suffice,<br>
                 you could grab<br>
                     the low level math from QgsGeorefTransform and<br>
                 QgsLeastSquares<br>
                     [2] and translate it to Python.<br>
<br>
                     giovanni<br>
<br>
                     [1]<br>
<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>


                 <<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>
<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>


                 <<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>
                     <<a href="mailto:felix.schmidt@uni-weimar.de" target="_blank">felix.schmidt@uni-weimar.de</a><br>
                 <mailto:<a href="mailto:felix.schmidt@uni-weimar.de" target="_blank">felix.schmidt@uni-<u></u>weimar.de</a>><br>
                 <mailto:<a href="mailto:felix.schmidt@uni-__weimar.de" target="_blank">felix.schmidt@uni-__<u></u>weimar.de</a><br>
                 <mailto:<a href="mailto:felix.schmidt@uni-weimar.de" target="_blank">felix.schmidt@uni-<u></u>weimar.de</a>>>>:<br>
<br>
<br>
                         Hello Giovanni,<br>
                         thanks for your answer. Do you think it is<br>
                 easier to write<br>
                         the Plugin for the historical border<br>
                 extraction in c++<br>
                         instead of python, cause of the binding<br>
                 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<br>
                 bindings if you<br>
                             want to leavarage the Georeferencer plugin<br>
                 code. It's a<br>
                             plugin, so it's functionality isn't<br>
                 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>
                 <<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>
                 <<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>
                 <mailto:<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.<u></u>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>
                 <<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>
<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> <mailto:<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.<u></u>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>
     <<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>
<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>
</blockquote>
<br>
</blockquote>
<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></div><br></div>