[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] simple polygon clip
From: Hugues François <hugues.francois () irstea ! fr>
Date: 2014-11-10 12:14:10
Message-ID: 10a001cffcdf$df90e67a$5568ddc3 () cemagref ! fr
[Download RAW message or body]
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 <chbraune@uni-potsdam.de> 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
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic