build_overviews


James David Smith
 

Hello,

Would anyone happen to know the answer to this question?

https://stackoverflow.com/questions/57005499/rasterio-version-of-arcgis-raster-pyramids

Essentially I am trying to copy the ArcGIS build overviews dialog box.
But I am unsure how many overviews to use or at what levels they
should be.

I guess this is more of a general GDAL question that rasterio specific.

Thanks, James


vincent.sarago@...
 

Hi James, 
The level of overviews is usually linked to the size of the raster and its internal tiles (block).
here is an example in rio-cogeo: https://github.com/cogeotiff/rio-cogeo/blob/master/rio_cogeo/utils.py#L95-L118

Let say you have a 10 000 x 10 000 px raster with 256x256 block/tile size (to allow fast reading). The overview level is then 6 which results in `[2, 4, 8, 16, 32, 64]` levels (https://github.com/cogeotiff/rio-cogeo/blob/master/rio_cogeo/cogeo.py#L223).


James David Smith
 

A belated thanks for this Vincent !

On Fri, 12 Jul 2019 at 14:56, <vincent.sarago@...> wrote:

Hi James,
The level of overviews is usually linked to the size of the raster and its internal tiles (block).
here is an example in rio-cogeo: https://github.com/cogeotiff/rio-cogeo/blob/master/rio_cogeo/utils.py#L95-L118

Let say you have a 10 000 x 10 000 px raster with 256x256 block/tile size (to allow fast reading). The overview level is then 6 which results in `[2, 4, 8, 16, 32, 64]` levels (https://github.com/cogeotiff/rio-cogeo/blob/master/rio_cogeo/cogeo.py#L223).