[postgis-devel] [raster] a more general geomval

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Jul 21 06:32:13 PDT 2011


> > /* WKT string representing each polygon in WKT format acompagned by
> > its correspoding value */ struct rt_geomval_t {
> >     int srid;
> >     double val;
> >     char * geom;
> > };
> >
> > I understand that it works just dandy for the original intended
> > purpose (polygonize a single band of a raster). In this case, the "key" is the
> "val"
> > field, and the "value" is the "geom" field (e.g., you lookup the
> > desired polygons based on the value). But it doesn't work so well for
> > the reverse case. For instance, you can't use it to represent one or
> > more points in the raster (e.g., the value of the raster at position
> > (i,j) (all bands) is
> > [a,b,c,...]) Clearly, you can store the WKT of point (i,j) in "geom",
> > but "val" would need to be an array.
> >
> > Also, is there any reason to pass around WKT in the C struct, instead
> > of a LWGEOM?
> >
> 
> One of the original purposes was to keep WKTRaster as much PostGIS-
> independent as possible at core level, I think. Pierre?

There is a ticket (#637) having the intent of modifying everything WKT to real geometries and hence to a LWGEOM.

> > If I desired a more general geomval, should I just write a different
> > one, or would it be OK to modify this one?
> >
> 
> For the time being, I think you should write a different one, in order to don't
> introduce too much 'noise' (PostGIS 2.0 is close). I don't know if you all agree,
> guys.

I would not say that PostGIS 2.0 is 'closed' yet and I would say that without a more general plan of the indented overall change it is hard to answer this question. Any ticket on this? Is this a change for personal purpose or is it a proposition of PostGIS Raster change? I still have no clear idea... 

Pierre



More information about the postgis-devel mailing list