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

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


> 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


Direct calculation in pure python is possible for example with:

with documetation and a Java version at:
-------------- 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