[GIS] Reading a specific overview layer from GeoTIFF file using GDAL / Python

gdalgeotiff-tiffpythonqgis

I know how to create the overviews to a specific geoTIFF file using GDAL ( i have tested it in QGIS), but I cannot find any good information on how to read these overviews individually in Python.

gdal.SetConfigOption('HFA_USE_RRD', 'YES')
outData = gdal.Open("test2.tiff",gdal.GA_Update)
outData.BuildOverviews(overviewlist=[2,4,8])

i would expect the answer to be something like:

array = outData.GetOverviews(overviewlist = 2)

Best Answer

The reason to my problem was that I was not calling the function from the right class. GetOverview is called from the class Band.