[GRASSLIST:8847] HDF files?

Is there any way to get HDF files into GRASS? I saw there is an r.in.hdf
command, but Grass 6.0.1 on MacOS X is throwing and error when I try it:
command not found

--j

--
Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
Office: 650-604-5896
Cell: 415-794-5043
AIM: jgrn307
MSN: jgrn307@hotmail.com

Is there any way to get HDF files into GRASS? I saw there is an
r.in.hdf command, but Grass 6.0.1 on MacOS X is throwing and error
when I try it: command not found

Use r.in.gdal, but GDAL must be built using the --with-hdf4 switch.

http://www.remotesensing.org/gdal/frmt_hdf4.html

try "gdal_translate --formats" and check for:

  HDF4 (ro): Hierarchical Data Format Release 4
  HDF4Image (rw+): HDF4 Dataset

or just "gdalinfo <dataset>" and see if it understands the file(s).

"r.in.gdal -f in=dummy out=dummy" will also list supported GDAL formats.
(often there will be about 50 of them)

Hamish

I tried to import Terra ASTER hdf files using the latest gdalwarp and my
r.in.aster script last week, after compiling the latest version (1.3.1) of
gdal. It still gives an error that gdal cannot read the projection info in
the ASTER hdf's. This has been an issue since 1.2.7 (version 1.2.6 still
works fine on my Mac).

I haven't tried r.in.gdal, but suspect that I'd have similar problems
(please correct me if wrong!).

Is there a fix or workaround to this? All ASTERs are in WGS84, UTM
projection (the zone varies of course).

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Hamish <hamish_nospam@yahoo.com>
Date: Thu, 3 Nov 2005 14:44:44 +1300
To: Jonathan Greenberg <jgreenberg@arc.nasa.gov>
Cc: <GRASSLIST@baylor.edu>
Subject: [GRASSLIST:8849] Re: HDF files?

Is there any way to get HDF files into GRASS? I saw there is an
r.in.hdf command, but Grass 6.0.1 on MacOS X is throwing and error
when I try it: command not found

Use r.in.gdal, but GDAL must be built using the --with-hdf4 switch.

http://www.remotesensing.org/gdal/frmt_hdf4.html

try "gdal_translate --formats" and check for:

  HDF4 (ro): Hierarchical Data Format Release 4
  HDF4Image (rw+): HDF4 Dataset

or just "gdalinfo <dataset>" and see if it understands the file(s).

"r.in.gdal -f in=dummy out=dummy" will also list supported GDAL formats.
(often there will be about 50 of them)

Hamish

I tried to import Terra ASTER hdf files using the latest gdalwarp and
my r.in.aster script last week, after compiling the latest version
(1.3.1) of gdal. It still gives an error that gdal cannot read the
projection info in the ASTER hdf's. This has been an issue since 1.2.7
(version 1.2.6 still works fine on my Mac).

I haven't tried r.in.gdal, but suspect that I'd have similar problems
(please correct me if wrong!).

Please do try. It may help to narrow or give context to the problem.

Is there a fix or workaround to this? All ASTERs are in WGS84, UTM
projection (the zone varies of course).

As a first point of contact you should check the GDAL bug list:
  http://bugzilla.remotesensing.org/buglist.cgi?product=GDAL

there are a few open HDF bugs there.

After your tests and checking to see if the bug is already reported, you
could ask on the gdal-dev mailing list as someone there probably knows
the status or could have a look at what changed between 1.2.6 and 1.2.7.

http://www.gdal.org/

search the mailing list here:
  http://news.gmane.org/gmane.comp.gis.gdal.devel

Hamish