[GRASS5] importing ASTER images using hdf2bin and r.in.bin?

Jeff D. Hamann jeff.hamann at forestinformatics.com
Thu Jan 15 15:43:05 EST 2004


I've been trying to import ASTER images using the hdf2bin tool and then
importing the resulting files using r.in.bin with limited success. The
hdf2bin program gives be the a list of the following information:

Swath "TIR_Swath" has following mapping information:
  Regular dimension mapping between geo and data fields:
     GeoTrack/ImageLine,GeoXtrack/ImagePixel
  Mapping increment = 70  83
  Mapping offset = 0  0
Geolocation field(s): Latitude,Longitude
Data field(s): ImageData10,ImageData11,ImageData12,ImageData13,ImageData14

Swath "TIR_Swath" contains following field(s):

 float64  SWATH_TIR_Swath_Latitude.dat (GeoTrack=11,GeoXtrack=11)
  Data type: 64-bit floating point
  Number of Dimensions: 2
    Dim 1:  "GeoTrack" = 11
    Dim 2:  "GeoXtrack" = 11

 float64  SWATH_TIR_Swath_Longitude.dat (GeoTrack=11,GeoXtrack=11)
  Data type: 64-bit floating point
  Number of Dimensions: 2
    Dim 1:  "GeoTrack" = 11
    Dim 2:  "GeoXtrack" = 11

 uint16  SWATH_TIR_Swath_ImageData10.dat (ImageLine=700,ImagePixel=830)
  Data type: unsigned 16-bit integer
  Number of Dimensions: 2
    Dim 1:  "ImageLine" = 700
    Dim 2:  "ImagePixel" = 830

 uint16  SWATH_TIR_Swath_ImageData11.dat (ImageLine=700,ImagePixel=830)
  Data type: unsigned 16-bit integer
  Number of Dimensions: 2
    Dim 1:  "ImageLine" = 700
    Dim 2:  "ImagePixel" = 830

 uint16  SWATH_TIR_Swath_ImageData12.dat (ImageLine=700,ImagePixel=830)
  Data type: unsigned 16-bit integer
  Number of Dimensions: 2
    Dim 1:  "ImageLine" = 700
    Dim 2:  "ImagePixel" = 830

The first three files import correctly, that is to say I can import them at
all and the rest give me the following:

GRASS:~ > r.in.bin input=SWATH_TIR_Swath_ImageData11.dat r=700 c=830
output=tir11
Using N=700.000000 S=0.000000 E=830.000000 W=0.000000
Bytes do not match File size
File Size 1162321 ... Total Bytes 581000
Try bytes=2 or adjusting input parameters
GRASS:~ >

Even when I include the bytes=2 argument, I get an error. Is there something
I'm doing wrong or is the file and/or GRASS broken? Or is there a better way
to import HDF-EOS files into grass? I'm running
GRASS 5.0.3 on cygwin and r.in.hdf isn't found and I haven't had the nerve
to try to compile GRASS with gdal support although I have been able to get
GRASS to build on my machine.

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