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

2009-07-11 Thread Jorge Arévalo
2009/7/11 Tamas Szekeres : > Jorge, > > I think this driver is in a special situation comparing to the file based > raster data sources, that is: we should minimize the round trips to the > server as much as possible which is costly. Therefore in addition to write > IReadBlock correctly (required t

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

2009-07-11 Thread Tamas Szekeres
Jorge, I think this driver is in a special situation comparing to the file based raster data sources, that is: we should minimize the round trips to the server as much as possible which is costly. Therefore in addition to write IReadBlock correctly (required to fetch a single row in each call or m

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

2009-07-11 Thread Jorge Arévalo
2009/7/11 Frank Warmerdam : > Jorge Arévalo wrote: >> >> So, clearly, I have a mistake. Think in a table with tiles of 100x100 >> px. We have 30 tiles. When I create RasterBands, their block size will >> be 100x100. So, IReadBlock(0, 0, bufffer) indicates the block going >> from (0, 0) to (100, 100

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

2009-07-10 Thread Frank Warmerdam
Jorge Arévalo wrote: So, clearly, I have a mistake. Think in a table with tiles of 100x100 px. We have 30 tiles. When I create RasterBands, their block size will be 100x100. So, IReadBlock(0, 0, bufffer) indicates the block going from (0, 0) to (100, 100). Does it mean that the block from (0, 0)

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

2009-07-10 Thread Jorge Arévalo
On Sat, Jul 11, 2009 at 1:32 AM, Tamas Szekeres wrote: > > > 2009/7/11 Frank Warmerdam >> >> Jorge Arévalo wrote: >>> >>> Hello, >>> >>> 2009/7/10 Tamas Szekeres : Jorge, I'm a bit hesitant to think using a server cursor would be the best approach here. Could you expl

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

2009-07-10 Thread Tamas Szekeres
2009/7/11 Frank Warmerdam > Jorge Arévalo wrote: > >> Hello, >> >> 2009/7/10 Tamas Szekeres : >> >>> 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 reg

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

2009-07-10 Thread Frank Warmerdam
Jorge Arévalo wrote: Hello, 2009/7/10 Tamas Szekeres : 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 gi

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

2009-07-10 Thread Jorge Arévalo
Hello, 2009/7/10 Tamas Szekeres : > 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 til

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

2009-07-10 Thread Tamas Szekeres
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? I my understanding each IReadBlock would trigger a normal "SELECT" without the cursor, this will give you all the data at once, just like FETCH ALL. This select would in

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

2009-07-10 Thread Jorge Arévalo
Hello, 2009/7/10 Frank Warmerdam : > Jorge Arévalo wrote: >> >> Hello, >> >> Context: GDAL WKTRaster Driver. When creating Dataset, I declare a >> cursor to read all the rows (tiles) of a table with a raster column >> (DECLARE cursor CURSOR FOR SELECT * FROM TABLE). The RasterBand should >> read o

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

2009-07-10 Thread Frank Warmerdam
Jorge Arévalo wrote: Hello, Context: GDAL WKTRaster Driver. When creating Dataset, I declare a cursor to read all the rows (tiles) of a table with a raster column (DECLARE cursor CURSOR FOR SELECT * FROM TABLE). The RasterBand should read one of the rows' band Question 1: The cursor is created

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

2009-07-10 Thread Jorge Arévalo
Hello, Context: GDAL WKTRaster Driver. When creating Dataset, I declare a cursor to read all the rows (tiles) of a table with a raster column (DECLARE cursor CURSOR FOR SELECT * FROM TABLE). The RasterBand should read one of the rows' band Question 1: The cursor is created during the Dataset crea