[GIS] How to reverse-georeference with QGIS

georeferencingqgis

I have a map with a "strange" projection (it's basically hand-painted, not an exact one). I can easily georeference it in QGIS using the Georeferencer plugin and the Thin Plate Spline transformation with a set of some 2000-3000 control points into simple WGS 84 (EPSG:4326) "latlong" projection and process/enhance it further with other data, like from Natural Earth or OpenStreetMap.

Now I'd like to perform the inverse operation: Transform one of those raster layers (or rasterised vector layers) back into the hand-painted quasi-projection, ideally using the same set of control points, so that the images match when overlaid in a graphic editor. How do I do it?

Best Answer

If you were using ArcGIS, you use the spatial adjustment toolbar. However, QGIS offers a similar functionality through plugins.

Go to the plugin manager and install 'Affine Transformations'

Also install 'Vector Bender'

Homepage: https://github.com/trenneman/qgsAffine;

https://plugins.qgis.org/plugins/VectorBender/

Since you already have the control points, you should be able to transform your data back to the original "projection". Load your control points into the plugin and perform the transformation. I haven't tried this yet so you may have to play with the control points. The affine transformations plugin uses constants to perform the transformation. Since you already have control points, you'll want to use the vector bender to perform a 'rubber sheet'.
Vector bender is not in the plugin repository, so you'll need to install it manually by adding it to C:\Users.qgis2\python\plugins\VectorBender.


Second option (may only work for rasters, haven't tested with vectors) - In the georeferencer, you can save your control points to a file. You can also load control points from a file.

Here is what you need to do:

Save the cpg file. Change the extension to .csv. Open the file in excel. Swap the values in the to/from columns. Save. Change the extension back to .points.

Once you have the control points set up, you can transform back and forth using the control points and your preferred transformation method.

Related Question