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

Etienne Tourigny etourigny.dev at gmail.com
Thu May 30 13:50:57 PDT 2013


On Thu, May 30, 2013 at 4:46 PM, Jukka Rahkonen
<jukka.rahkonen at mmmtike.fi>wrote:

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


actually the same thing happens with gdal-1.10. I will prepare a bug report
and fix.


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


the idea of using the -sds argument is to generate an output file for each
subdataset, without having to search for subdataset names


>
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130530/1c5065a5/attachment.html>


More information about the gdal-dev mailing list