Hi everyone, I want to layer stack from the metadata file, is it possible? I already read the metadata using this code:
pro landsat8
e = ENVI()
; Open a Landsat-8 file
file = 'F:\Citra\LANDSAT\\20140127\LC81190652014027LGN00\LC81190652014027LGN00_MTL.txt'
raster = e.OpenRaster(file)
; Landsat-8 images are stored in a five-element array.
; Multispectral bands from the OLI sensor are stored in
; the first array element. You do not need to perform this
; step with most multispectral sensors.
OLIBands = raster[0]
; Radiometric calibration and atmospheric correction
; steps would normally go here.
; Get the actual data values for each band
CoastalAerosol = OLIBands.GetData(BANDS=[0])
Blue = OLIBands.GetData(BANDS=[1])
Green = OLIBands.GetData(BANDS=[2])
Red = OLIBands.GetData(BANDS=[3])
NIR = OLIBands.GetData(BANDS=[4])
SWIR1 = OLIBands.GetData(BANDS=[5])
SWIR2 = OLIBands.GetData(BANDS=[6])
Panc = OLIBands.GetData(BANDS=[7])
Cirr = OLIBands.GetData(BANDS=[8])
Thrm1 = OLIBands.GetData(BANDS=[9])
Thrm2 = OLIBands.GetData(BANDS=[10])
Qty = OLIBands.GetData(BANDS=[11])
end
This script I use ENVI+IDL so that in ENVI can see. But I cant open this file in ENVI Classic, why? I also want to layer stack also. Thank you.
|