[Gdal-dev] Reading from Overviews with GDALDataset

Frank Warmerdam warmerdam at pobox.com
Sun Nov 26 20:18:07 EST 2006

David Friberg wrote:
> Hi,
> I need a way to read from Overviews using GDALDataset::RasterIO or
> similar, i.e. one call to read retrieves data for bands.  I don't see
> a way to do this without getting each band and reading separately.
> Am I missing something, or is this the only way to do it?


Normally if you do a RasterIO() call against a normal band at a reduced
resolution, the GDAL machinery will automatically use appropriate overviews.

If you want to specifically control which overview you use, you can fetch
back the overview GDALRasterBand object, and access it yourself.  But this
is very rarely necessary.

I did write a little application in gdal/apps called dumpoverviews for
dumping out the overviews, but it mainly useful for various kinds of
detailed testing of overviews in new file formats.

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    | President OSGeo, http://osgeo.org

More information about the Gdal-dev mailing list