[gdal-dev] Question about raster interleaving

Jorge Arévalo jorge.arevalo at deimos-space.com
Sat Oct 9 10:58:15 EDT 2010


Hi Frank

2010/10/9 Frank Warmerdam <warmerdam at pobox.com>:
> Jorge Arévalo wrote:
>>
>> Hi everybody,
>>
>> If I'm implementing a driver for a given raster structure, that always
>> has BSQ format, has sense to implement the IRasterIO for Dataset
>> and/or Rasterband derived classes?
>
> Jorge,
>
> If the data is band interleaved there is little value in implementing
> the GDALDataset::IRasterIO() method.  In theory you might be able to
> provide an optimized override for GDALRasterBand::IRasterIO().  Are
> you implementing your bands by deriving from RawRasterBand?  If so,
> there is already an (in theory) optimized GDALRasterBand::IRasterIO()
> override.
>

No, my bands derive from GDALRasterBand, directly


> In any event, I find there are only rare circumstances where IRasterIO
> overrides are worth the trouble of implementation as opposed to providing
> simple block oriented access.  So think about what your needs are and
> remember that implementing IRasterIO() properly is relatively hard.
>

Yes, I think you're right. I'm improving GDAL PostGIS Raster driver
(formerly WKT Raster), but I think the block oriented access is the
right one. At the end, PostGIS raster files are chunks of data (one
chunk = one raster table row), individually georeferenced, that may be
related forming a bigger raster coverage (one raster per table) or not
(one raster per row). That fits in the block scheme.

Many thanks,

Best regards,
Jorge

> 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
>
>



-- 
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge.arevalo at deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com


More information about the gdal-dev mailing list