[gdal-dev] Questions about SQL cursors in GDAL driver
szekerest at gmail.com
Fri Jul 10 19:32:21 EDT 2009
2009/7/11 Frank Warmerdam <warmerdam at pobox.com>
> Jorge Arévalo wrote:
>> 2009/7/10 Tamas Szekeres <szekerest at gmail.com>:
>>> I'm a bit hesitant to think using a server cursor would be the best
>>> here. Could you explain why is this needed?
>> Yes. As now I'm working basically with regularly tiled coverages, an
>> operation like SELECT rast FROM table gives me all the tiles. These
>> tiles don't overlap, and its size can be the size of a block read for
>> IReadBlock method. So, if I have a cursor, I can fetch the tile that
>> the IRasterBlock needs as one of the rows of the resultset without
>> having all the tiles loaded in memory at same time.
> I'm not clear on how you know what row to take out of the resultset
> for a given IReadBlock() call? How do you translate the x/y block
> index into a resultset row offset?
> I would note that spatial searches *should* be quite fast if the
> raster row is spatially indexed.
I'm thinking of exactly the same as Frank. It's ok you have the same block
size in GDAL as the block size in the database but you might have to
construct a different SQL query to select the corresponding block even if a
single row is retrieved in a single IReadBlock call.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev