[gdal-dev] Questions about SQL cursors in GDAL driver

Frank Warmerdam warmerdam at pobox.com
Fri Jul 10 19:18:19 EDT 2009

Jorge Arévalo wrote:
> Hello,
> 2009/7/10 Tamas Szekeres <szekerest at gmail.com>:
>> Jorge,
>> I'm a bit hesitant to think using a server cursor would be the best approach
>> 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.

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