[gdal-dev] Change of behavior ?? GDALRasterBand:IReadBlock vs RasterIO ?

Even Rouault even.rouault at spatialys.com
Mon Jan 30 23:24:28 PST 2017


On lundi 30 janvier 2017 15:33:28 CET asmita wrote:
> Recently seen that GDALRasterBand read for the Mosaics is affected because
> the read always trying to default to IReadBlock and we never implemented
> IReadBlock because of less generic type support I guess:
> 

IReadBlock() must definitely be implemented. If you've implemented IRasterIO(), you can 
easily redirect IReadBlock() to IRasterIO(). For example like done in
https://github.com/OSGeo/gdal/blob/trunk/gdal/frmts/ecw/ecwdataset.cpp#L911

> 
> Since we recently upgraded to GDAL 2.1.2 from GDAL 1.1 all the Raster reads
> are defaulting to IReadBlock for warping /mosaics.
> 
> I referred to Migration Guide, but it does not mention of such a change(
> even the RasterIO RFC is unrelated) - ref
> 
> :https://svn.osgeo.org/gdal/branches/2.0/gdal/MIGRATION_GUIDE.TXT

> 2. what has changed that may not be documented ?

Probably something that did band per band access and was modified to do block per block 
access. An implementation detail.

> 3. is there a need to implement IReadBlock 2.0 onwards ?

It has been a requirement since GDAL 1.0. You were just lucky to not have triggered code 
paths that needed it before.

Even


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170131/b5f725e1/attachment-0001.html>


More information about the gdal-dev mailing list