[gdal-dev] Re: Copy only georeference between two images

Jean-Claude REPETTO jrepetto at free.fr
Tue Sep 14 05:32:33 EDT 2010


Le 14/09/2010 11:17, canduc17 a écrit :
>
> @Ralf Suhr-3
> I have produced the ftw file as you suggested:
>             10.0000000000
>              0.0000000000
>              0.0000000000
>            -10.0000000000
>         584018.5625000000
>        5147058.5000000000
> but why the values are different from gdalinfo?
> gdalinfo img.tif | grep Origin
> Origin = (584013.562500000000000,5147063.500000000000000)

The world file contains the coordinates of the center of the upper left 
pixel of the map.
gdalinfo gives the coordinates of the upper left corner of the map.
You'll notice that the difference is equal to half the pixel size.
Have you read the Wikipedia article at 
http://en.wikipedia.org/wiki/World_file ?

Jean-Claude


More information about the gdal-dev mailing list