[postgis-devel] Raster philosophy in a vector world

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Jun 13 18:33:46 PDT 2011


> I spent some time thinking about a statement of work for postgis raster fv.02
> and 03 this morning. (BTW: The "planning" page is out of sync with the
> "Specifications" page, as fv.03 on the planning page is fv.04 on the specs page.)

Fixed.

I also updated many other things in the planning page and reorganized the text of Objective FV.03. 

You might also be interested by Objective FV.14 and Objective FV.15...

> A simple case like this, where the tiles are regularly blocked and disjoint, seems
> amenable to treatment with a raster version of the existing ST_Collect() function
> (which is speedy because it doesn't try anything crafty to eliminate overlaps.)
> The proposed implementations of ST_Union in svn assume a more general case
> where there were overlaps, and hence a need to handle the selection of a
> destination raster value from among the candidates in the source rasters.

This is effectively one adaptation of ST_Collect()  to the raster world that we could decide. What do you do if tiles are actually not regularly blocked and disjoint?

For the rest I must say I have hard time following you... Hard to know when you are referring to ST_Union or to ST_Intersection. I would need drawings and examples...

I know defining a semantic for raster/vector operations is very hard.

I realize that the spec I wrote in the wiki are very different from what I envisioned two years ago (see my original presentation). Originally I was planning that the result of "ST_Intersection(raster, geometry) -> raster" would be a one band raster but the spec says that it should return a two bands raster. Now I'm a bit lost. Was that just a mistake or was there a good reason? I don't remember.

I think the semantic of "ST_Intersection(raster, geometry) -> geometry" (implemented) is well defined and working well, but "ST_Intersection(raster, geometry) -> raster" and "ST_Intersection(raster, raster) -> raster" are unknown worlds.

I think the answer for "ST_Intersection(raster, geometry) -> raster" comes from "ST_Intersection(raster, raster) -> raster". In this last case you have no other choice than returning a two band raster. (Or maybe a set of two band mask rasters sharing a common value?) Does this imply that the first one should also return two bands? 

Please have a look at my original presentation:

http://www.cef-cfr.ca/uploads/Membres/WKTRasterSpecifications1.0.pdf

And let me know your thoughts... (and drawings :) And I will try to clarify mine as well in the coming days.

Pierre



More information about the postgis-devel mailing list