[gdal-dev] Overriding IRasterIO in class derived from GDALRasterBand

Frank Warmerdam warmerdam at pobox.com
Wed Aug 12 10:59:29 EDT 2009

2009/8/9 Jorge Arévalo <jorge.arevalo at gmail.com>:
> Then, my point could be, when creating the dataset (Open static
> method), perform a query to get all the blocks that cover the extent
> of the raster (the extent is in RASTER_COLUMNS table) and store them
> in any place (A new class attribute?, flush the data on a tmp file?).
> Then, override IRasterIO in Dataset to get the data fetched in the
> extent query, instead of perform a new call. And override the
> RasterBand::IReadBlock method too.
> It will supppose a change of perspective, but it will improve the
> performance, of course.


I'm afraid I have not quite followed the discussion of the IRasterIO
implementation, but I find the above statement quite alarming.
It is imperative that we *not* end up reading back all blocks
if only a few are requested.  Imagine a 100GB image split up
into blocks in a table.  If an application using GDAL is run and
only needs a small area of the file it is important that the
blocks not requested never be pulled from the DB.

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