[Gdal-dev] Georeferencing a tiff file

Frank Warmerdam warmerdam at pobox.com
Tue Apr 6 10:47:24 EDT 2004


Romano J M Silva wrote:
> Hello all,
>  
> I have a tiff file and I want to georeference it and save it as a 
> GeoTiff to use in GDAL . Does anyone know of a tool to do that?
>  
> Thanks,
> Romano

Romano,

When you say "I want to georeference it", do you already know the georeferencing
or are you wanting to do a tie down in a GUI environment?  If you know the top
left corner and pixel spacing you can manually create a corresponding
"world file" for the file and then use gdal_translate to "apply" that
world file along with a coordinate system and produce an output file.

For instance, imagine you had a file called raw.tif with 60m x 60m pixels, and
a top left corner of 440750m E, 3751290m N in UTM 11 WGS84.  You could
georeference it by creating a world file called raw.tfw with the following
in it (six lines):

            60.0000000000
             0.0000000000
             0.0000000000
           -60.0000000000
        440750.0000000000
       3751290.0000000000

Then use this gdal_translate command to create a geotiff version with a
coordinate system.

  gdal_translate -a_srs '+proj=utm +zone=11 +datum=WGS84' raw.tif geotiff.tif

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list