[Gdal-dev] IRasterIO in Dataset
Frank Warmerdam
warmerdam at pobox.com
Mon Oct 27 08:14:34 EST 2003
Fu Chen wrote:
> Hi!
> I recently use my image browser to look a large image composited of some small rgb ecw file. I find if i access the data band by band, it will be slow by decompress 3 times. Implementing a method which can get 3 bands once a time will enhance the efficience.
> And i find gdaldataset already has a IRasterIO prototype, which i didn't see in former version.
>
> Now i add IRasterIO in ECWDataset and VRTDataset.
...
> I add a attribute "mosaic" in the element of VRTDataset in vrt file. if mosaic is set to 1, it will permit Dataset IRasterIO bypass VRTRasterBand.
> for example
> <VRTDataset rasterXSize="43200" rasterYSize="21600" mosaic="1">
>
> With this change, my program run much quickly :)
> I hope this code will benefit other people. But I am not familiar about CVS , so I post here.
> Frank, would you like to envaluate my code and merge them in the CVS?
Fu Chen,
The changes in each case don't seem quite safe for general use, and will
require some work to apply back to the master. However, you have certainly
deduced the intended purpose of the dataset level IO. The benefit comes
as custom methods are implemented in the drivers to take advantage of
one pass input/output for multiple bands (where appropriate). Currently
only a very few drivers are taking advantage of this.
Actually, I will look at doing the ECW patch this morning.
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