<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Gdal-dev] Re: GDAL with HDF on
OSX</title></head><body>
<div>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)</div>
<div><br></div>
<div>This version is built from HDF version in</div>
<div>ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF4.2r0/bin/macosx</div>
<div><br></div>
<div>Grass does not import HDF directly from r.in.gdal but you have to
convert to tif with GDAL. (Is it true Andrey ?)</div>
<div><br></div>
<div>From my Grass_Libraries</div>
<div><br></div>
<blockquote><font face="Helvetica" size="-1" color="#000000">Importing
ASTER Level1A and B (HDF files)</font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">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).</font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">You must
convert HDF files in GeoTiff for importing HDF in other programs like
GRASS. Now it's impossible to import directly HDF.</font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">You must
use gdalwarp utility.This is the method:</font></blockquote>
<blockquote><font size="-2" color="#000000"><br></font></blockquote>
<blockquote><font size="-2" color="#000000">[lor:~] lor%
/usr/local/grasslib/bin/gdalwarp -t_srs 'projection_of_output'
name_of_subdataset_of_hdf name_of_output_file</font></blockquote>
<blockquote><font face="Helvetica" size="-1"
color="#000000"><br></font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">In this
example I convert HDF files to geotiff file in utm zone 33
projection.</font></blockquote>
<blockquote><font face="Helvetica" size="-1"
color="#000000"><br></font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">Open
Terminal and enter</font></blockquote>
<blockquote><font face="Helvetica" size="-1"
color="#000000"><br></font></blockquote>
<blockquote><font size="-2" color="#000000">[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_05222<span
></span>002150244.hdf":2
/aster_tif/aster1.tif</font></blockquote>
<blockquote><font face="Helvetica" size="-1"
color="#000000"><br></font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">.... and
so on for all subdataset.</font></blockquote>
<blockquote><font face="Helvetica" size="-1"
color="#000000"><br></font></blockquote>
<blockquote><font face="Helvetica" size="-1" color="#000000">One
geotiff file for any subdatasets: in Aster level_1B I have 15 Geotiff
files</font></blockquote>
<blockquote><br></blockquote>
<blockquote><br></blockquote>
<div>Some new HDF files have new szip compression</div>
<div><br></div>
<div>Bye</div>
<div><br></div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><font face="Courier New"
color="#000000"
>____________________________________________________________________<span
></span>____</font></div>
<div><font face="Courier New"
color="#000000">|| Lorenzo
Moretti e-mail:
lorenzo.moretti@bologna.enea.it </font></div
>
<div><font face="Courier New" color="#000000">||/|/| ENEA
prot/idr Web:
http://wwwamb.bologna.enea.it/ </font></div>
<div><font face="Courier New" color="#000000">|| |
via Don Fiammelli, 2 FTP:
ftp://ftpamb.bologna.enea.it/ (res.)</font></div>
<div><font face="Courier New" color="#000000">~~~~~~ 40128
BOLOGNA - ITALY Ph: +39-0516098086 Fax:
+39-0516098131</font></div>
<div><font face="Courier New"
color="#000000"><x-tab>
</x-tab><x-tab>
</x-tab><x-tab>
</x-tab>Download GRASS for MAC OS
X: </font></div>
<div><font face="Courier New"
color="#000000"><x-tab>
</x-tab>
http://wwwamb.bologna.enea.it/forgrass/</font></div>
<div><font face="Courier New"
color="#000000"
>____________________________________________________________________<span
></span>____</font></div>
</body>
</html>