[postgis-devel] [WKT Raster] Regular blocking in gdal2wktraster.py

Mateusz Loskot mateusz at loskot.net
Fri Mar 27 16:54:13 PDT 2009


Pierre Racine wrote:
> I now better see your point: What if regular_blocking is set to false
>  but still, tiles are not overlapping and are then proper for such an
>  application?

Then no constraints are defined and no constraints are being checked
during SQL operations like INSERT, UPDATE, etc.

> Good question.
> 
> Probably we should split the regular_blocking flag in three:
> 
> -same_size: tiles are all the same size and blocksize_x == 
> blocksize_y


I don't see point behind restricting X and Y dimensions to
must be equal.

> -overlap: at least two tiles overlaps 
> -firsttileupperleft: the tiles are ordered in the table as they 
>  should be ordered in a file. (I'm not sure this can be garanteed by a
>  select statement)

What is the 3rd one for? We have spatial index, haven't we?

> (Is this sufficient?)

I don't know.
Honestly, I'm starting to drown in the variety of options and
options of options. I am unable to match corresponding puzzles
and build a complete picture in my head.

The story started as just database with table(s) with column of
RASTER data type and a bunch of functions. User is free like a wild
pig to combine and structure rasters and tables as he likes.
He can store any raster mess he likes.

Later, we proposed to add optional ability to apply a few basic rules
that help to treat the whole table as a single raster. It is not or
rarely possible to load and render raster of 60000 x60000 pixels,
but it is very well known how to render it if tiled to smaller
easily crunch-able pieces - tiles. In order to treat a table
as a single raster, we have to assure 3-principles (already
discussed, deeply). Why?
For the same reasons for which we can't imagine how to handle
***overlapping***pixels*** in single file-based raster image.
That's how the metadata and regular_blocking were born.

Without metadata and without regular blocking user is
still free to juggle tiles in single table, as he is
free to store any combination of rasters in single table.

> if same_size && ! overlap && firsttileupperleft then regular_blocking
>  = true
> 
> Really, I find this regular_blocking constraint, constraining :-( :-)

Pierre, perhaps it would be easier to find common denominator this way:

As you don't like regular blocking, you don't need it, so just don't
use it, don't care about it, just think as there is nothing like
that in there :-) And, I'm sure in 100% that you will be able to achieve
*all* use cases you have drawn originally and you won't notice any
influence from the fact that there is infrastructure to support
regular blocking.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the postgis-devel mailing list