Hi,
I'm not sure to understand your question.
But I think this query is quite good to clip all the polygons geometries of
a table with a single geometry.
SELECT
...
CASE
WHEN
ST_GeometryType("geom")='ST_GeometryCollection'
THEN
ST_Multi(ST_CollectionExtract("geom", 3 ))
ELSE
ST_Multi("geom")
END AS "geom"
FROM (
SELECT
...
ST_Intersection("geom", ST_GeomFromEWKB(decode('...', 'hex'))) AS
"geom"
FROM
"public"."table_to_clip"
WHERE
ST_Intersects("geom", ST_GeomFromEWKB(decode('...',
'hex')))=true
) AS t__0
WHERE
ST_GeometryType("geom") IN ('ST_Polygon', 'ST_MultiPolygon',
'ST_GeometryCollection')
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users