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) to
(100, 100) must be the first one in the table if I get the rows
ordered by rid?

No, I do not see how you could depend on this.

It depends on how the tiles have been loaded. So,
instead of making hypothesis, Should I query the block that matchs the
extent from (0, 0) to (100, 100)?

Yes, but furthermore, you will need to transform the pixel bounds into
georeferenced coordinates to do the spatial query.  I would also note that
you might be best to reduce the query rectangle to just be a small central
area of the tile to avoid fetching adjacent tiles or even forcing
postgres to fetch them to check their bounds against your point.  Spatial
index tend to have a certain granularity.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to