[GRASS5] building grass and gdal support with HDF-EOS (ASTER L1B)

Jeff D. Hamann jeff.hamann at forestinformatics.com
Fri Jan 30 03:15:26 EST 2004


Okay, I've been able to compile gdal-1.1.9 and GRASS5.3 (on my way to
building GRASS5.7) so I can import my ASTER images (EOS-HDF) and noticed
that when I built gdal and GRASS5.3
 and run gdalinfo to make sure the build worked I didn't have hdf or hdf4
support as listed in the supported

$ gdalinfo --formats
Supported Formats:
  VRT: Virtual Raster
  GTiff: GeoTIFF
  NITF: National Imagery Transmission Format
  HFA: Erdas Imagine Images (.img)
  SAR_CEOS: CEOS SAR Image
  CEOS: CEOS Image
  ELAS: ELAS
  AIG: Arc/Info Binary Grid
  AAIGrid: Arc/Info ASCII Grid
  SDTS: SDTS Raster
  DTED: DTED Elevation Raster
  PNG: Portable Network Graphics
  JPEG: JPEG JFIF
  MEM: In Memory Raster
  JDEM: Japanese DEM (.mem)
  GIF: Graphics Interchange Format (.gif)
  ESAT: Envisat Image Format
  BSB: Maptech BSB Nautical Charts
  XPM: X11 PixMap Format
  BMP: MS Windows Device Independent Bitmap
  PNM: Portable Pixmap Format (netpbm)
  DOQ1: USGS DOQ (Old Style)
  DOQ2: USGS DOQ (New Style)
  ENVI: ENVI .hdr Labelled
  EHdr: ESRI .hdr Labelled
  PAux: PCI .aux Labelled
  MFF: Atlantis MFF Raster
  MFF2: Atlantis MFF2 (HKV) Raster
  FujiBAS: Fuji BAS Scanner Image
  GSC: GSC Geogrid
  FAST: EOSAT FAST Format
  L1B: NOAA Polar Orbiter Level 1b Data Set
  FIT: FIT Image
  USGSDEM: USGS Optional ASCII DEM
  GXF: GeoSoft Grid Exchange Format

Needless to say, I figured it was built in and I only had to name the file
in r.in.gdal.So I ran


GRASS:~ > gdalinfo ast_l1b.hdf
ERROR 4: `ast_l1b.hdf' does not exist in the file system,
and is not recognised as a supported dataset name.

GDALOpen failed - 4
`ast_l1b.hdf' does not exist in the file system,
and is not recognised as a supported dataset name.

GRASS:~ >


I then ran gdalinfo (assuming the libs and command line tools are build with
the same code/settings) on a png file I have and I work perfectly.

GRASS:~ > gdalinfo --version
GDAL 1.1.9.0, released 2003/06/27

GRASS:~ > gdalinfo streams50.tif
Driver: GTiff/GeoTIFF
Size is 699, 537
Coordinate System is `'
Origin = (484525.000000,4671615.000000)
Pixel Size = (30.000000,-30.000000)
Corner Coordinates:
Upper Left  (  484525.000, 4671615.000)
Lower Left  (  484525.000, 4655505.000)
Upper Right (  505495.000, 4671615.000)
Lower Right (  505495.000, 4655505.000)
Center      (  495010.000, 4663560.000)
Band 1 Block=699x3 Type=Byte, ColorInterp=Red
Band 2 Block=699x3 Type=Byte, ColorInterp=Green
Band 3 Block=699x3 Type=Byte, ColorInterp=Blue


So my question is this, What's the trick to getting hdf compiled into gdal
so that I can use HDF_EOS so I can read ASTER L1B files (.hdf and .met)?

Thanks,
Jeff


---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
(office) 541-754-1428
(cell) 541-740-5988
jeff.hamann at forestinformatics.com
www.forestinformatics.com




More information about the grass-dev mailing list