1

I have a table with a point geometry defined as "geom geometry(Point,28355)" I am trying to insert data using the following:

INSERT INTO tmpwatscint ( scgid, pipeid, geom )
     SELECT s.gid, p.pipe_id, ST_AsText(ST_SetSRID(ST_LineInterpolatePoint(p.geom,ST_LineLocatePoint (p.geom,st_startpoint(s.geom))),28355)) newgeom
       FROM "tmpWatPipe" p, "tmpWatServCon" s
       WHERE s.pipe_id = p.pipe_id ;

When I run the select statement on its own, it runs fine, however, when I try to insert the data I get an error:

ERROR: Geometry SRID (0) does not match column SRID (28355)

I am running POSTGIS="2.3.2 r15302"

1 Answer 1

1

I found the answer. For the insert statement all I had to do was to remove the ST_AsText() function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.