[postgis-devel] [WKT Raster] Regular blocking restrictions

Mateusz Loskot Mateusz.Loskot at cadcorp.com
Wed Mar 18 08:19:00 PDT 2009


Hi,

If regular blocking is used, number of constraints are assumed.
They are listed in the specification [1].
I'd like to discuss them in details and ask for comments:

1. All tiles have the same size can be expressed as:

RT_Width(rast) = blocksize_x AND RT_Height(rast) = blocksize_y

2. All tiles must be non-overlapping.

AFAIU, it doesn't mean OGC overlapping (ST_Overlaps) but means
overlapping of extents of all tiles:

SELECT rast && new_rast 

Any ideas how to enforce restriction of all tiles appearing on regular block grid?

3. The top-left block must start at the top-left corner of the extent

Assuming, we don't know which is top-left tile/block, the only way to check this 
is to do full-scan to find if there is exactly one tile that fits this requirement.
Also, this CHECK seems to be impossible to perform per single INSERT.
Am I right?

4. Portions of tiles that extend behond the raster extent are NODATA

The definition of this restriction is clear, but it's unclear how it
influences some of RT_* functions. For instance, what RT_Width and RT_Height
should return for such tiles? Also, what should be the accumulated width/height
for the whole coverage?

[1] RASTER_COLUMNS Metadata Table
http://www.cef-cfr.ca/index.php?n=Membres.PierreRacineWKTRasterSpecifications


Best regards
--
Mateusz Loskot
Senior Programmer, Cadcorp
http://www.cadcorp.com





More information about the postgis-devel mailing list