[Gdal-dev] translate gif file to a gtiff file!

Frank Warmerdam warmerdam at pobox.com
Thu Aug 28 15:55:57 EDT 2003


Andersen, Li SIEP-EPT-AC wrote:
> Hello:
> 
> I am trying to translate a GIF file (together with a world file) to a 
> GeoTiff file using gdal_translate under Solaris2.8 machine. The command 
> line I used is as following:
> 
> ----
>  gdal_translate -of GTiff -a_srs test_arc3000.gifw -projwin 1805157.7500 
> 10010422.0000 1837382.3750 9978569.0 test_arc3000.gif test_arc3000.gtiff
> 
> ----
> 
> 
> It failed to create test_arc3000.gtiff, the message I got was:
> 
> ---
> Failed to process SRS definition: test_arc3000.gifw
> ---

Li,

The -a_srs requires a spatial reference system definition as an argument,
not the filename of a world file.  You don't mention what coordinate system
you are using, but if if it were UTM 13 / WGS84 for instance, you might
use the argument "-a_srs '+proj=utm +zone=13 +datum=WGS84'".

Your world file has the extension .gifw, but I am not convinced that the
GDAL world file checker looks for this.  Try renaming it to
test_arc3000.wld instead.

The -projwin argument is just used to subset based on projected coordinate
system coordinates.  You don't need that if you want to translate the whole
file.  GDAL will (hopefully) pick up the required information to assign to
the GeoTIFF file frm the .wld file.

Good luck,

-- 
---------------------------------------+--------------------------------------
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