1

I have two PostGIS tables which include geometries`:

CREATE TABLE compcurv
(
    f_id bigint NOT NULL DEFAULT nextval('fid_seq'::regclass), 
    myattr int,
    geom geometry(CompoundCurve,4326) NOT NULL,
 CONSTRAINT compcurv_pkey PRIMARY KEY (fid))

CREATE TABLE pnts
(
    fid bigint NOT NULL DEFAULT nextval('fid_seq'::regclass), 
    myattr int,
    geom geometry(Point,4326) NOT NULL,
 CONSTRAINT compcurv_pkey PRIMARY KEY (fid))

I would now like to create a trigger function that splits my compcurv layer using my pnts layer after a change on either (All pnts features are vertices of a compcurv feature) and add the split compund curves to compcurv. I have tried ST_Split which does not work due to the circularstrings.

1
  • 1
    You would need to transform your ST_CurveToLine - it will conserve your curve vertices - and vice versa. However, it seems ambiguous, and tedious, to have triggers here, especially on changes to the vertex table. I'd suggest to only work with the vertices, and a set of positional identifiers to recreate curves - which is much easier to handle when applying changes (you'd only update the positional ids), and then have a Materialized View that constructs curves based on those ids; a refresh would make changes take effect automatically.
    – geozelot
    Jul 5 at 17:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.