[postgis-devel] [raster] a more general geomval
Jorge Arévalo
jorge.arevalo at deimos-space.com
Thu Jul 21 01:13:51 PDT 2011
Hello,
On Wed, Jul 20, 2011 at 11:22 PM, Bryce L Nordgren <bnordgren at gmail.com> wrote:
> I note that the geometry-value type (CV_GeometryValuePair in ISO 19123
> speak) is defined as:
>
> /* 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?
> 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.
Best regards,
Jorge
> Bryce
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
--
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
More information about the postgis-devel
mailing list