Hi I would like to break lines in intersections of polygons, but without 
erasing anything.
I have used this (but now suddenly, it does not work) :


Create table tmpint2 as
WITH
data AS (
   SELECT * FROM public."linesToBeCut" AS t(id, geom)
),
cutter AS (
   SELECT * FROM "cutterPolygons" AS t(geom)
)
SELECT id,
     CASE WHEN cutting IS NULL THEN geom
         ELSE st_collectionExtract(ST_Split( geom, cutting ),2) END AS geom
FROM (SELECT id, d.geom geom,
            (SELECT ST_Collect(c.geom) geom
                FROM cutter c WHERE ST_Intersects(d.geom, c.geom)
            ) AS cutting
    FROM data d) AS t;

The error code I get is :
st_intersects(integer, geometry) does not exsits
Can anyone please tell me what I'm doing wrong here. I'm not to bright in SQL.
/Paul
_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to