[Gdal-dev] Re: gdal overviews

Frank Warmerdam warmerdam at pobox.com
Wed Jul 16 15:36:44 EDT 2003

Gillian Walter wrote:
> Hi Frank,
> I tried sending a message to gdal-dev about this a while ago, but it 
> didn't go through.  Lately I have been noticing that openev/gdal from 
> the main CVS does not seem to use overviews for formats other than 
> geotiff (ie. formats that store overviews in .ovr files).  I tried ceos 
> and envisat files.  I looked in gvraster.c/gvrasterlayer.c and did not 
> see any changes that should affect this.  Has something changed recently 
> in the way that gdal handles overviews?  Do you run into this problem on 
> your machine?


I have investigated and discovered that overview support was effectively
disabled for any RasterIO() call against formats built on top of the
RawRasterBand class, such as the CEOS, MFF, Envi, and various other formats.
This occured when the RawRasterBand class was optimized at my request by
Andrey on May 2, 2003.  The optimization was to do direct IO, instead of
read and caching whole-scanline blocks so that small subwindow loads didn't
cause so much cache thrashing and potentially extra read activity.  Note,
that means overview use was effectively disabled in the GDAL 1.1.9 release
for many formats.

I have modified the gdal/frmts/rawdataset.cpp class to use overviews now
if present, and the change is committed.

I think Andrey and I will need to do some further review on the cases where
direct IO is done vs. cases where block (ie. scanline) based access is
appropriate.  At the very least, if most of a scanline is being accessed we
might as well go through the caching mechanism.

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Gdal-dev mailing list