From an stack of geotiff (time-series of NDVI) in a file like 'NDVI_TS.tif'
I want to get individual band names. For example: 'Band 086: 20190803T004719'
. I can see that when I load the stack into QGIS for example. I need to trace back the dates in the name, in the example above would be 2019-08-03
. However, I can't find a way to access it from Python. I can access the bands by index but that doesn't help me finding from which date they are from.
from osgeo import gdal
NDVI = gdal.Open('NDVI_TS.tif', gdal.GA_ReadOnly)
#for example I can get data from band 86 as and array with:
band86 = NDVI.GetRasterBand(86).ReadAsArray()
I feel there should be some easy solution for this but failed to find.