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