2

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)
  • 1
    How about outdata.GetOverview(2)? – Kersten Feb 16 '16 at 15:02
  • It seems like i dont have that function. i have just installed the OSgeo4w64, is this function not available? Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Dataset' object has no attribute 'GetOverview' >>> – William Feb 17 '16 at 8:12
  • I checked my gdal version. it says: 1.11.3 – William Feb 17 '16 at 8:48
1

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

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.