<div dir="ltr">Hi Martin<div><br></div><div>this was one element in my todo list months ago.</div><div>In some automatic processing workflow, sometimes is necessary to give a straightforward interactive tool to facilitate rectification when polinomial parameters are not enough to reach precision... fortunately, struggling with gdal code, I reached enough precision 1.5m (for our application) on WorldView images.</div><div><br></div><div>BTW in case wouldn't be enough, I provided a custom and simplified QGIS to go straightforward to create GCPs.</div><div><br></div><div>A better approach I found, but not ported to 3.x, is the use of "J Rectifier" [1] plugin. This plugin theoretically reorganise de GUI to allo live georeferencing that facilitating a lot the work. The main problem to port to 3.x is that have to be redesigned from scratch, having one big class doing all!</div><div>IMHO from this plugin we can get some interesting ideas how to facilitate the user interaction.</div><div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Luigi Pirelli</div><div><br></div><div>[1]  <a href="https://plugins.qgis.org/plugins/J_Rectifier/">https://plugins.qgis.org/plugins/J_Rectifier/</a><br><br>**************************************************************************************************<br>* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br>* Book: <a href="https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition" target="_blank">Mastering QGIS3 - 3rd Edition</a></div><div>* Hire a team: <a href="http://www.qcooperative.net" target="_blank">http://www.qcooperative.net</a><br>**************************************************************************************************</div></div></div></div></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 13 Mar 2020 at 16:13, Martin Dobias <<a href="mailto:wonder.sk@gmail.com">wonder.sk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all<br>
<br>
There has been some interest from a client to improve the<br>
georeferencer in QGIS to better suit their needs, mainly to support<br>
their workflow where they commonly georeference multiple raster images<br>
at the same time. So for example you pick a single ground control<br>
point (GCP) with XY(Z) map coordinates and in multiple images you<br>
would visually pick where that point is located in image coordinates.<br>
Ideally you want to see side-by-side the main map canvas and images<br>
you are georeferencing.<br>
<br>
With this kind of change, it is maybe a good time to have a look at<br>
what are the other issues with the georeferencer and address them as<br>
well. The budget is limited (as usual), so I cannot promise that<br>
anything mentioned in this thread would get implemented, but I am sure<br>
there are people around who have some ideas what could be improved. At<br>
some point later I would like to prepare a QEP that will be hopefully<br>
in line with the discussion here.<br>
<br>
Let me start with a list of current issues I see with georeferencer in<br>
addition to the lack of georeferencing of multiple images at once. The<br>
following is a mixture of UI/UX and technical bits:<br>
<br>
1. Georeferencer opens in a new window. In order to see the main map<br>
canvas and the georeferenced layer side by side, it is necessary to do<br>
some resizing of windows which is inconvenient. It would be maybe more<br>
practical to have the georeferenced image in a dock widget in the main<br>
window - and all georeferencer related map tools included in the main<br>
QGIS window as well. (Or maybe the other way around - to keep<br>
georeferencer as a separate window, but allow the main map canvas to<br>
be embedded in it?)<br>
<br>
2. Georeferencer is a plugin. Its core/gui functionality cannot be<br>
reused elsewhere. It would be useful to have some Processing<br>
algorithms to load/save GCPs, to extract GCPs to raster images, to<br>
save GCPs to raster images and to warp imagery according to GCPs (and<br>
chosen transformation method).<br>
<br>
3. Georeferencer does not allow live preview of how the georeferenced<br>
raster image would end up looking on the map - user is required to<br>
write warped image to disk as a new file and only then see the<br>
results. It should be possible to use the estimated transformation<br>
based on GCPs and show the layer in the main map canvas any time (if<br>
wanted).<br>
<br>
4. It uses a combination of GDAL-based transformation methods<br>
(Polynomial of 1st/2nd/3rd order, thin plate spline) and some of its<br>
own (Helmert, Projective), for which it also requires GSL library as a<br>
dependency. In my opinion, QGIS georeferencer should leave all the<br>
math to GDAL which does a great job there. Moreover, I have some<br>
doubts about the methods that do not come from GDAL: the “Helmert”<br>
method is simply 2D affine transform (offset+scale+angle), while true<br>
Helmert transformation is 3D transformation with 7 parameters. Do we<br>
need it if GDAL’s 1st order polynomial transformation should do just<br>
that? And the “Projective” method which is a bit of a mystery to me.<br>
First of all, I am not sure in what situation it is useful and the<br>
documentation only says it is “a linear rotation and translation of<br>
coordinates” - which is a bit vague. It looks like a subset of RPC<br>
method supported by GDAL (although GDAL does not have estimation of<br>
RPC coefficients). Overall I would be for removal of these methods and<br>
stick to what GDAL offers.<br>
<br>
I would be keen to hear what you think, if you agree/disagree with the<br>
above or have some ideas how to improve things here.<br>
<br>
Regards<br>
Martin<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>