Hi, I think you might add a where st_intersects(aoi.geom, line_buffer.geom). If not, your query returns differences between each polygon and each line even if they do not intersect. In this case the difference between the polygon and nothing is the original polygon.
You might also take care when a polygon intersects different lines since your query will return as many differences as the number of intersections. One solution is to union intersected lines. Hugues Le 10 nov. 2014 12:58, Christopher Braune <[email protected]> a écrit : > > Dear all, > > I want to clip polygons like this: > > > I tried the following SQL-sentences: > > CREATE TABLE Dear all, I want to clip polygons like this: I tried the following SQL-sentences: CREATE TABLE aoi_blocks AS SELECT *, ST_Difference(aoi.geom, lines.buffer_geom) FROM aoi, lines; I get polygons, but not only the difference polygons! Thanks for all replies! Christopher _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
