[Gdal-dev] Re: GDAL with HDF on OSX

Andrey Kiselev dron at ak4719.spb.edu
Fri Mar 26 08:15:20 EST 2004


On Fri, Mar 26, 2004 at 01:35:12PM +0100, Lorenzo Moretti wrote:
> Grass does not import HDF directly from r.in.gdal but you have to 
> convert to tif with GDAL. (Is it true Andrey ?)

No. If you can convert HDF file using GDAL then you can import that file
with r.in.gdal. Just use name of subdataset on input.

> You must convert HDF files in GeoTiff for importing HDF in other 
> programs like GRASS. Now it's impossible to import directly HDF.
> You must use gdalwarp utility.This is the method:
> 
> [lor:~] lor% /usr/local/grasslib/bin/gdalwarp -t_srs 
> 'projection_of_output' name_of_subdataset_of_hdf name_of_output_file

It is not converting, it is warping. You will get completely different
image on output, because input scene will be rotated. If you want
just convert HDF subdataset into GeoTIFF you should use gdal_translate.

> One geotiff file for any subdatasets: in Aster level_1B I have 15 Geotiff 
> files

Yes, that's true. Note, that subdatasets from the same instrument can be
combined in the single multiband file (using simple Python script).

> Some new HDF files have new szip compression

Please, tell me what data uses szip? Never seen that before. Usually
data distributers don't use any compression at all.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



More information about the Gdal-dev mailing list