I can open and read a hyperspectral image using GDAL according to the instructions brought by Max König here:
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 is actually representing what electromagnetic spectrum?
After reading all bands as a list in python like this:
RasterBands = for i in range(data.RasterCount): RasterBands.append(data.GetRasterBand(i))
I can write:
This will give me two float values, but I am not sure if they are representing the wavelengths of band 1 or not.
Would be thankful if anyone can give me a clue!