[Gdal-dev] Re: RasterIO tile size issue
Frank Warmerdam
warmerdam at pobox.com
Fri Feb 17 10:19:49 EST 2006
Sheykhet, Rostic wrote:
> Frank,
>
> Though it is probably a significant departure from the current
> algorithm, what came to my mind is a solution which instead of writing
> the passed-in buffer line-by-line, writes it image-block-by-image-block.
> So instead of writing line #1 across all the affected image blocks, it
> would write all relevant pieces of all relevant lines onto the block #1,
> then flush it to disk and never need to access it again in this
> particular RasterIO() operation.
>
> The advantage, in my opinion, is that the blocks are written
> completely one-by-one resulting in a very small memory footprint. The
> tile cache is also not used at all, leaving more space in it for other
> tiles. However, as mentioned above, and as you probably can
> see, this would require writing a rather involved piece of code.
>
> In general, I would be very happy no matter what solution to the
> problem is implemented.
Rostic,
Yes, I was kicking this option around in my mind as well. I think I will
take a crack at this approach as it removes my need for complicated
block locking logic, and gives the optimal memory footprint handling. It
may also have some performance benefits even in plentiful memory cases.
The main downside is that it will take some careful coding to get just
right.
I would add there are several places with similar core loops. It may
take a while to update them all, but I can address the most common
cases.
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