[Qgis-developer] Enhanced georeferencer plugin

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Wed Feb 4 08:07:52 EST 2009


Hi,
This message has been lying for some days in QGis forum and now I was adviced to send it to mailing list.
-Jukka Rahkonen-
 
Forum message follows:
"The Georeferencer plugin is pretty nice to use. However, I have found that the result of georeferencing with world file is not always satisfactory. Therefore I have used the fine user interface for collecting ground control points and done the rest of georecerencing with other tools. However, I believe that it should be rather easy to modify the Georeferencer plugin so that it could do georeferncing also with this alternative way. As a result QGis would have a georeferencing tool of professional quality both when it comes to easy of use and accuracy.
The work flow would be like this:
1. Ground control points are collected with the existing plugin. It is gathering all the information that is needed for the next step (mapX, mapY, pixelX, pixelY)
2. Ground control points are fed for gdal_translate program as -gcp parameters. Gdal_translate takes them in this order:
[-gcp pixel line easting northing [elevation]]*
The whole gdal_translate command line would be
gdal_translate -of GTiff -gcp [params_1] -gcp [params_2] -gcp [params_3] .... input.tif temporary.tif
3. Third step is to warp the temparary image that contains now the ground control points. It is done with gdalwarp, for example like this:
gdalwarp -of GTiff -s_srs epsg:4326 -t_srs epsg:4326 temporaty.tif warped.tif
Command lines are presented as working examples which can be repeated with gdal utility programs. For the plugin it would be better to call gdal funtions directly, use virtual raster format as temporary format instead of tiff etc. I cannot say very much about how it should be done because I can't program myself. However, in the very end of this link http://www.scangis.org/scangis2007/papers/r3_rahkonen.pdf there is python code that might be useful and that can be used freely. That script is doing basically the same thing, it takes ground control points from external source and warps image automatically with gdal components."


More information about the Qgis-developer mailing list