I'm using the GUI of the GDAL Georeferencer in qGIS for referencing a lot of images. For a single image it is fine to open qGIS, open the referencer and changing the settings and GCPs manually.

However, the images I want to reference are periodically updated online. I register the changes once a week and use a simple python script to examine the new data, and if needed I indicate some of the images as a 'todo'. Some of these images replace older images, others are completely new. For the replacements, I can simply use the existing GCP-files and run the transformation from python.

For the new images, I would like to automatically open these in the GUI of the referencer, add my GCPs, save the GCPs, close the referencer, and then transform the image.

Is is it possible to automate this in python or the python console from qGIS? It is fine to have the scripts work from the console within qGIS, but am also interested in launching the referencer as stand-alone from python. Tasks I'm looking for to automate:

a) Launch GDAL Georeferencer (as stand-alone)
b) Load raster into the GUI
c) Save GCP-file with given name
d) and close the GUI again.**

I noticed a similar question and answer (https://gis.stackexchange.com/a/244482), but not completely the same, and also not up to the level of automation I'm looking for. Still, the approach or work-around as finding specific buttons is fine for me. But have the feeling this could be much easier..?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.