[Gdal-dev] GDAL affine transform Non-North-Up

Klokan Petr Přidal klokan at klokan.cz
Fri Dec 19 03:02:50 EST 2008


Hi,


> If I know the co-ordinates for all 4 corners of a non-north-up image, how
> can I calculate the 6 GDAL affine transform parameters?
>

There is a script gcps2wld.py in GDAL:

You should assign the corners (ground control points) to a raster by:

gdal_translate -of vrt -gcp 0 0 19.3 50.5 ... input.tif temp.vrt

and then

gcps2wld.py temp.vrt

will return a world file.

Best regards

Klokan

P.S.
Direct calculation in pure python is possible for example with:
http://code.google.com/p/oldmapsonline/source/browse/trunk/gcps2wld/python-no-dep/gcps2wld.py

with documetation and a Java version at:
http://blog.oldmapsonline.org/2008/06/georeferencing-images-by-control-points.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081219/5efc0d8d/attachment.html


More information about the gdal-dev mailing list