Decimated and windowed read in rasterio


(Posted also on

In my workflow using rasterio, I'd like to read an overview from a raster and get only a portion of it through a window at the same time.

Is this possible?

I have a pretty complex script so far and I'm trying to check whether the wrong output is due to this not being possible.

Basically, I am asking if it is possible to do something like this:

data =,
                           math.ceil(src.height / 64),
                           math.ceil(src.width / 64)),

where data is a decimated read of src to get source raster overview for factor 64, and window has the width and height whose dimensions are relative to the source raster (not the overview).

Join to automatically receive all group messages.