Fwd: [Gdal-dev] Level 2 caching mechanism question

Frank Warmerdam warmerdam at pobox.com
Mon Jun 19 12:31:05 EDT 2006


Daniele Romagnoli wrote:
> Post Scriptum to my previous email:
>  
> I'm working in the Summer of Code with the Refractions Research, having 
> Simone Giannecchini as my Mentor.
> My purpose is encapsulating the GDAL library within the ImageIO Java 
> tools, by using SWIG java bindings.
> 
> In such a way, we can exploit the Java ImageIO plugins within the 
> GeoTools grid coverage plugins, in order to access (read and write) many 
> coverage formats.
> 
> Probably, we need to modify the bindings to handle tile management.
> As an instance, we need to add a binding for retrieving the chunk size. 

Daniele,

I concur that the GDALRasterBand::GetBlockSize() method needs to be
exposed via SWIG.  I hadn't realized this was missing.  Likely the
way to do this would be to expose these values as XBlockSize and
YBlockSize attributes or something similar.

I think this would be a task I could handle if you need it, though I'm
not really too savvy about some of the fancier swig issues.

> In such a manner, within the ImageIO plugin, we can know the rasterband 
> block size and set the tilesize of the Image to this value.
> This allows to use powerfull features of JAI ImageIO toolkit, as the 
> tile caching and the tile scheduling mechanismes, with great efficiency 
> because the data accesses will be performed in compliance with the 
> rasterband natural access size which  represents the more efficient 
> chunk access size, as stated in the GDAL Data Model.

There are also methods on the GDALRasterBand intended to be a more
efficient way of fetching on block boundaries.  However, I would discourage
trying to expose these through swig.  Instead I would encourage doing
regular RasterIO() calls on block boundaries.  This is certain to work
well for all drivers, and should have nearly the same performance as the
specialized block methods.

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




More information about the Gdal-dev mailing list