[Qgis-user] creating a python plugin to autopopulate some of the Georeferencer properties

Eric Goddard egoddard1010 at gmail.com
Fri Mar 25 17:03:34 PDT 2016


Awesome, thanks John. We have about the same number of images to georef so
that will be a big help. I looked at the georeferencer code which is how I
discovered that some of the properties were stored in QSettings. I'm not
too familiar with c++ though, but since the qgis api can be used to do
custom applications I was hoping for a constructor for the georeferencer
that I could use.

Eric
On Mar 25, 2016 4:35 PM, "John Layt" <jlayt at kde.org> wrote:

> On 25 March 2016 at 20:05, Eric Goddard <egoddard1010 at gmail.com> wrote:
> > It looks like I can make sure most of the settings are configured
> > properly using QSettings(), but still not sure how to go about opening
> > the georeferencer with an image and the output and report fields
> > pre-populated.
>
> As far as I'm aware you can't, it's written as a separate C++ plugin
> and none of the code is accessible via python, in particular launching
> it with a given image. See
> https://github.com/qgis/QGIS/tree/master/src/plugins/georeferencer for
> the code. I wish the code was available via api calls and more
> scriptable, I could sure use it myself.
>
> For our own far simpler special use case when I had to georeference
> 3000 plans to preset grid points I wrote our own plugin gui to load
> the images, set the gcp's and made the calls out to gdal directly
> (reduced the effort from 42 clicks per image to just 6, so well worth
> it). It could be adaptable to your use case, you can see the code at
> https://github.com/lparchaeology/ArkPlan/tree/master/georef, feel free
> to use any of it. You'd need to change it to have a single image view
> that takes multiple gcp's, and then get the map points from the main
> canvas (see
> https://github.com/lparchaeology/ArkPlan/blob/master/grid/grid_wizard.py
> for how to do that), but it shouldn't take too much work.
>
> If it is useful, let me know, I've been meaning to spin it off as it's
> own plugin for some time and having another use case would justify the
> effort in generalising it :-)
>
> John.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160325/1ad7ed64/attachment.html>


More information about the Qgis-user mailing list