[Gdal-dev] Re: GDAL with HDF on OSX
Lorenzo Moretti
lorenzo.moretti at bologna.enea.it
Fri Mar 26 09:32:40 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.
Andrey
I have enter in r.in.gdal box (GIS file input) subdataset file:
HDF4_SDS:ASTER_L1B:"/file_ASTER//AST_L1B_003_01102002101254_05222002150244.hdf":2
but I have this error in output:
ERROR: Input map is rotated - cannot import. You may use 'gdalwarp' to
transform the map to North-up.
This error does not permit me to import HDF file into GRASS but I
must use gdalwarp in terminal.
Is this correct?
> > 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.
Ok it is warping but this method creates a geotiff file: I don't use
gdal_translate.
I enter in terminal:
[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
I write at the end aster1.tif and I have a geotif output.
Is this wrong ?
> > 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).
OK. I have 15 geotiff
>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
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.
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/9c9da83f/attachment.html
More information about the Gdal-dev
mailing list