<!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>
<blockquote type="cite" cite>On Fri, Mar 26, 2004 at 01:35:12PM +0100,
Lorenzo Moretti wrote:<br>
> Grass does not import HDF directly from r.in.gdal but you have
to<br>
> convert to tif with GDAL. (Is it true Andrey ?)<br>
<br>
No. If you can convert HDF file using GDAL then you can import that
file</blockquote>
<blockquote type="cite" cite>with r.in.gdal. Just use name of
subdataset on input.</blockquote>
<div><br></div>
<div>Andrey</div>
<div><br></div>
<div>I have enter in r.in.gdal box (GIS file input) subdataset
file:</div>
<div><br></div>
<blockquote
>HDF4_SDS:ASTER_L1B:"/file_ASTER//AST_L1B_003_01102002101254_052<span
></span>22002150244.hdf":2</blockquote>
<div><br></div>
<div>but I have this error in output:</div>
<div><br></div>
<blockquote>ERROR: Input map is rotated - cannot import. You may use
'gdalwarp' to</blockquote>
<blockquote> transform the map to
North-up.</blockquote>
<blockquote><br></blockquote>
<div>This error does not permit me to import HDF file into GRASS but I
must use gdalwarp in terminal.</div>
<div>Is this correct?</div>
<div><br></div>
<blockquote type="cite" cite>> You must convert HDF files in
GeoTiff for importing HDF in other<br>
> programs like GRASS. Now it's impossible to import directly
HDF.<br>
> You must use gdalwarp utility.This is the method:<br>
><br>
> [lor:~] lor% /usr/local/grasslib/bin/gdalwarp -t_srs<br>
> 'projection_of_output' name_of_subdataset_of_hdf
name_of_output_file<br>
<br>
It is not converting, it is warping. You will get completely
different<br>
image on output, because input scene will be rotated. If you
want</blockquote>
<blockquote type="cite" cite>just convert HDF subdataset into GeoTIFF
you should use gdal_translate.</blockquote>
<div><br></div>
<div>Ok it is warping but this method creates a geotiff file: I don't
use gdal_translate.</div>
<div>I enter in terminal:</div>
<div><br></div>
<div><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></div>
<div><br></div>
<div>I write at the end aster1.tif and I have a geotif output.</div>
<div><br></div>
<div>Is this wrong ?</div>
<div><br></div>
<blockquote type="cite" cite>> One geotiff file for any
subdatasets: in Aster level_1B I have 15 Geotiff<br>
> files<br>
<br>
Yes, that's true. Note, that subdatasets from the same instrument can
be<br>
combined in the single multiband file (using simple Python
script).</blockquote>
<div><br></div>
<div>OK. I have 15 geotiff</div>
<div><br></div>
<blockquote type="cite" cite>Some new HDF files have new szip
compression</blockquote>
<blockquote type="cite" cite>Please, tell me what data uses szip?
Never seen that before. Usually</blockquote>
<blockquote type="cite" cite>data distributers don't use any
compression at all.</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite"
cite><x-tab>
</x-tab><x-tab>
</x-tab><x-tab>
</x-tab><x-tab>
</x-tab><x-tab>
</x-tab><x-tab>
</x-tab>Andrey</blockquote>
<div><br></div>
<div>I read this information in one small note in a web page (I don't
remember in what site) for this format but like you I have not seen
until now this method. HDF from distributor is without compression but
I suspect that new HDF format will be much greater in size and perhaps
this szip compression is for the future. I don't know it: it's only my
opinion.</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>