[prev in list] [next in list] [prev in thread] [next in thread]
List: qgis-user
Subject: Re: [Qgis-user] creating a python plugin to autopopulate some of the Georeferencer properties
From: Eric Goddard <egoddard1010 () gmail ! com>
Date: 2016-03-26 0:03:34
Message-ID: CAMM2+YoDMvp4D=-4fz5qFs9y4sBDNDKXtnMMm-1F1_z1AuF=vw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@kde.org> wrote:
> On 25 March 2016 at 20:05, Eric Goddard <egoddard1010@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@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[Attachment #5 (text/html)]
<p dir="ltr">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.</p> <p dir="ltr">Eric</p>
<div class="gmail_quote">On Mar 25, 2016 4:35 PM, "John Layt" <<a \
href="mailto:jlayt@kde.org">jlayt@kde.org</a>> wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On 25 March 2016 at 20:05, Eric \
Goddard <<a href="mailto:egoddard1010@gmail.com">egoddard1010@gmail.com</a>> \
wrote:<br> > It looks like I can make sure most of the settings are configured<br>
> properly using QSettings(), but still not sure how to go about opening<br>
> the georeferencer with an image and the output and report fields<br>
> pre-populated.<br>
<br>
As far as I'm aware you can't, it's written as a separate C++ plugin<br>
and none of the code is accessible via python, in particular launching<br>
it with a given image. See<br>
<a href="https://github.com/qgis/QGIS/tree/master/src/plugins/georeferencer" \
rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/tree/master/src/plugins/georeferencer</a> \
for<br> the code. I wish the code was available via api calls and more<br>
scriptable, I could sure use it myself.<br>
<br>
For our own far simpler special use case when I had to georeference<br>
3000 plans to preset grid points I wrote our own plugin gui to load<br>
the images, set the gcp's and made the calls out to gdal directly<br>
(reduced the effort from 42 clicks per image to just 6, so well worth<br>
it). It could be adaptable to your use case, you can see the code at<br>
<a href="https://github.com/lparchaeology/ArkPlan/tree/master/georef" \
rel="noreferrer" target="_blank">https://github.com/lparchaeology/ArkPlan/tree/master/georef</a>, \
feel free<br> to use any of it. You'd need to change it to have a single image \
view<br> that takes multiple gcp's, and then get the map points from the main<br>
canvas (see <a href="https://github.com/lparchaeology/ArkPlan/blob/master/grid/grid_wizard.py" \
rel="noreferrer" target="_blank">https://github.com/lparchaeology/ArkPlan/blob/master/grid/grid_wizard.py</a><br>
for how to do that), but it shouldn't take too much work.<br>
<br>
If it is useful, let me know, I've been meaning to spin it off as it's<br>
own plugin for some time and having another use case would justify the<br>
effort in generalising it :-)<br>
<br>
John.<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" \
rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" \
rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>
[Attachment #6 (text/plain)]
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic