1

I'm trying to read many ASTER images (1B mainly) in IDL (I can try in R also). I'm used to work with Landsat, but the aster metadata is complicated. I write a code with a lots of conditional that can read the image parameters (angles, dates, etc). But I want to know if there is other way I can read this.

Besides, I want to know if all the aster metadata have the same format, so I can batch all the images with the same code (or I need to modify it image by image).

1

I found two ways to read aster metadata in envi (hdf format).

1.- using "envi_file_query" to read a particular attribute

; set the name of the file
FILE_NAME='link to .hdf'
; open data as aster image
    envi_open_data_file, FILE_NAME, /aster, r_fid=fid

;query the metadata inserted in the hdf (global attributes)
envi_file_query, fid[0], nb=nb, ACQUISITION_TIME=ACQUISITION_TIME, BBL=BBL, BNAMES=BNAMES, BYTE_SWAP=BYTE_SWAP, CLASS_NAMES=CLASS_NAMES, CLOUD_COVER=CLOUD_COVER, DATA_GAINS=DATA_GAINS, DATA_OFFSETS=DATA_OFFSETS, DATA_TYPE=DATA_TYPE, DEF_STRETCH=DEF_STRETCH, DESCRIP=DESCRIP, DIMS=DIMS, FILE_TYPE=FILE_TYPE,FNAME=FNAME, FWHM=FWHM, INTERLEAVE=INTERLEAVE, NB=NB, NL=NL, NS=NS, OFFSET=OFFSET, REFLECTANCE_SCALE_FACTOR=REFLECTANCE_SCALE_FACTOR, SENSOR_TYPE =SENSOR_TYPE , SOLAR_IRRADIANCE=SOLAR_IRRADIANCE, SNAME=SNAME, SUN_AZIMUTH=SUN_AZIMUTH, SUN_ELEVATION=SUN_ELEVATION, WAVELENGTH_UNITS=WAVELENGTH_UNITS, WL=WL

more information: http://www.exelisvis.com/docs/ENVI_FILE_QUERY.html

2.- using "metadata" to read all the metadata

; set the name of the file
FILE_NAME='link to .hdf'
;open data as aster image
    raster = e.OpenRaster(FILE_NAME, EXTERNAL_TYPE="eos_aster")

;read metadata by subsystem (VNIR, 3B, SWIR, TIR)
metadata0 = raster[0].METADATA

more information: http://www.exelisvis.com/docs/ENVIRasterMetaData.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.