Trouble using ST_Difference to remove overlapping features

المشرف العام

Administrator
طاقم الإدارة
I am trying to use ST_Difference to create a set of polygons (processing.trimmedparcelsnew) that do not contain any of the area covered by another set of polygons (test.single_geometry_1) using PostGis 2.1 (and Postgres SQL 9.3). Here is my query:

CREATE TABLE processing.trimmedparcelsnew ASSELECT orig.id, ST_Difference(orig.geom, cont.geom) AS differenceFROM test.single_geometry_1 cont, test.multi_geometry_1 orig;But the resulting polygons have not been trimmed, instead they seem to have been split where they intersect with the other layer. I have tried just running the select without putting the result in a table and everything else I can think of, but I can't seem to get this function to work.

I have attached a picture of the result





أكثر...
 
أعلى