I'm working with large rasters which require overviews in order to be browsed efficiently. I'm successful in creating overviews, external in my case (.ovr), but I haven't found a source about figuring out the correct amount of overview levels for a raster. I'm looking either for an automatic way or a formula with which one could deduce the right amount of them.

Right now I'm creating external overviews, then checking out if amount of specified levels was enough in QGIS and finally rerun gdaladdo if it wasn't. An example of gdaladdo syntax I'm using:

gdaladdo raster.tif 2 4 8 16 32 64 128 256 1024 2048 -r average -ro --config COMPRESS_OVERVIEW 

Does anyone have any tips?


Since June 28th, 2017 you do not really need to bother about the explicit levels if you are fine with the power of two levels. See the announcement in gdal-dev mailing list https://lists.osgeo.org/pipermail/gdal-dev/2017-June/046820.html

Default levels are also documented in the manual https://www.gdal.org/gdaladdo.html

levels: A list of integral overview levels to build. Ignored with -clean option. Starting with GDAL 2.3, levels are no longer required to build overviews. In which case, appropriate overview power-of-two factors will be selected until the smallest overview is smaller than the value of the -minsize switch.

-minsize val: (starting with GDAL 2.3) Maximum width or height of the smallest overview level. Only taken into account if explicit levels are not specified. Defaults to 256.

  • Thanks again for helping me out. So in the end it's just a question of version, I have GDAL 2.2.4 that dates back to 03/2018. – Ville Koivisto Oct 29 '18 at 8:13
  • Tested and works. GDAL version can be checked with gdalinfo --version on Windows. – Ville Koivisto Oct 30 '18 at 7:32

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.