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

Lorenzo Moretti lorenzo.moretti at bologna.enea.it
Fri Mar 26 07:35:12 EST 2004


I have GDAL 1.2.0 for OS X built with HDF 4.2r0 support in my GRASS 
LIBRARIES for OS X version (see below for site)

This version is built from HDF version in
ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF4.2r0/bin/macosx

Grass does not import HDF directly from r.in.gdal but you have to 
convert to tif with GDAL. (Is it true Andrey ?)

 From my Grass_Libraries

Importing ASTER Level1A and B (HDF files)
HDF version 5 is incompatible with HDF version 4. Aster Level 1A and 
Level 1B are in HDF-EOS format (version 4 of HDF library).
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

In this example I convert HDF files to geotiff file in utm zone 33 projection.

Open Terminal and enter

[lor:~] lor% /usr/local/grasslib/bin/gdalwarp -t_srs '+proj=utm 
+zone=33 +datum=WGS84' 
HDF4_SDS:ASTER_L1B:"/file_ASTER/AST_L1B_003_01102002101254_05222002150244.hdf":2 
/aster_tif/aster1.tif

.... and so on for all subdataset.

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


Some new HDF files have new szip compression

Bye

-- 
________________________________________________________________________
||       Lorenzo Moretti        e-mail: lorenzo.moretti at bologna.enea.it     
||/|/|   ENEA prot/idr          Web: http://wwwamb.bologna.enea.it/    
||   |   via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (res.)
~~~~~~   40128 BOLOGNA - ITALY  Ph: +39-0516098086  Fax: +39-0516098131
			Download GRASS for MAC OS X:    
	           http://wwwamb.bologna.enea.it/forgrass/
________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20040326/d818b5bc/attachment.html


More information about the Gdal-dev mailing list