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

asmita asmitawankhede at gmail.com
Mon Jan 30 14:33:28 PST 2017


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:

our implementation : 
class XRasterBand : public GDALRasterBand
{
  
 public:
  XRasterBand(GDALDataset          *dataset,
                 int                   gdalBandNum,
                 const xyzSize<uint32> &rastersize,
                 const xyzSize<uint32> &blocksize,
                 GDALDataType          gdalDatatype,
                 GDALColorInterp       colorInterp_,
                 const xyzTransferGuard<GDALColorTable> &ctbl_,
                 bool                  haveNoData_,
                 double                noDataValue_);
  virtual CPLErr IRasterIO( GDALRWFlag eRWFlag,
                            int nXOff, int nYOff, int nXSize, int nYSize,
                            void *pData, int nBufXSize, int nBufYSize,
                            GDALDataType eBufType,
                            int nPixelSpace, int nLineSpace,
                            GDALRasterIOExtraArg* sExtraArg);

  virtual CPLErr IReadBlock(int nXBlockOff, int nYBlockOff, void *pabyData){
   CPLError(CE_Failure, CPLE_AppDefined,
             "Internal Error: doesn't support block reading");
    return CE_Failure;
  }

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

My Question is :
1. has anyone seen this issue ? 
2. what has changed that may not be documented ?
3. is there a need to implement IReadBlock 2.0 onwards ?




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Change-of-behavior-GDALRasterBand-IReadBlock-vs-RasterIO-tp5305401.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list