<!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:&quot;/file_ASTER/AST_L1B_003_01102002101254_05222<span
></span>002150244.hdf&quot;: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">||&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lorenzo
Moretti&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e-mail:
lorenzo.moretti@bologna.enea.it&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></div
>
<div><font face="Courier New" color="#000000">||/|/|&nbsp;&nbsp; ENEA
prot/idr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Web:
http://wwwamb.bologna.enea.it/&nbsp;&nbsp;&nbsp;&nbsp;</font></div>
<div><font face="Courier New" color="#000000">||&nbsp;&nbsp; |&nbsp;&nbsp;
via Don Fiammelli, 2&nbsp;&nbsp; FTP:
ftp://ftpamb.bologna.enea.it/&nbsp;(res.)</font></div>
<div><font face="Courier New" color="#000000">~~~~~~&nbsp;&nbsp; 40128
BOLOGNA - ITALY&nbsp; Ph: +39-0516098086&nbsp; Fax:
+39-0516098131</font></div>
<div><font face="Courier New"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>Download GRASS for MAC OS
X:&nbsp;&nbsp;&nbsp;&nbsp;</font></div>
<div><font face="Courier New"
color="#000000"><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
http://wwwamb.bologna.enea.it/forgrass/</font></div>
<div><font face="Courier New"
color="#000000"
>____________________________________________________________________<span
></span>____</font></div>
</body>
</html>