[gdal-dev] gdal_translate file naming for sds and HDF4 files

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Thu May 30 12:46:56 PDT 2013


Jonathan Greenberg <jgrn <at> illinois.edu> writes:

> 
> Folks:
> I'm using a Windows install of GDAL 1.7.0 (FWTools) -- when I run:
> 
> gdal_translate -sds -of "GTiff" [some.hdf] "myoutput"
> The output filenames do not have the .tif extension.  If I set the output
file to "myoutput.tif", it appends the "layer numbers" to the end of the
file, e.g. myoutput.tif1.  Any tricks to getting the naming working properly
(myoutput1.tif would be what I'd expect)?

Hi,

First, acquire more fresh GDAL, current version is 1.10. Use OSGeo4W or
download Windows binaries from http://gisinternals.com/sdk/

Then, perhaps you should use gdalinfo first for seeing the exact names of
layers as GDAL understands them and use such a layer name as input instead
of [some.hdf]. Read usage examples from http://www.gdal.org/frmt_hdf4.html

-Jukka Rahkonen-



More information about the gdal-dev mailing list