[GIS] How to get the wavelength values of bands from hyperspectral image

gdalhyperspectral-sensorpyqgispythonremote sensing

I am trying to open and read a hyperspectral image using GDAL like below.

So after reading the data like this :

data = gdal.Open( filename )

then I can see the x, y, dim information of the dataset :

x = data.RasterXSize
y = data.RasterYSize
dim = data.RasterCount

Now the question is that if there is any way to find out that each band wavelength from image.?
I have the following data image:
sub_66 Type:File
sub_66 Type:hdr
sub_66 Type:aux(xml)
This data file is of AVIRIS(Hyperspectral Data) sensor.

Best Answer

What you need to do is parse the 'fmmyyddtnnpnnrnnrdn_v_.spc' file associated with your dataset. Each line in that file corresponds to a band in your image.
First column in the file is the 'Wavelength Center Position' and the second column is 'Full Width at Half Maximum', meaning the bandwidth. It should be noted that there may be more than two columns, depending on the scene.
With those two pieces of information, you should have what you need.

The same information can also be found in the associated hdr-file, from which it can be parsed by treating the file as a standard text-file. From there, you can combine the information using standard functions in Python.
The way the additional information is presented in the hdr-file is not supported by gdal and as such, you'll have to create your own approach for this.