[postgis-users] Problem with ST_SymDifference function
Paragon Corporation
lr at pcorp.us
Mon Aug 3 16:16:18 PDT 2009
Nikos,
What kind of geometries are you talking about? In some cases the
ST_Symdifference will look the same as the original depending on the
dimensionality of the input geometries.
If you have two sets of polygons -- you'll see a difference but a line and
polygon you may or may not because if the line intersects the polygon -- the
symetric difference will look like pretty much the union of the polygon with
the line (if the line is completely contained by the polygon -- it will look
like just the polygon (the union of the 2)
Leo
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Kolios
N.
Sent: Monday, August 03, 2009 4:58 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Problem with ST_SymDifference function
Hi all,
I am using an ST_SymDifference query in order to visualize changes between
two polygon tables.
The result, however does not look correct. It includes the entire geometries
of both tables rather than the portions that do not intersect.
My query is the following:
CREATE TABLE bu_delta as
SELECT
ST_SymDifference(t.the_geom, b.the_geom) AS difference_geom FROM
bu_benchmark AS b, bu_test AS t WHERE ST_Intersects(t.the_geom, b.the_geom);
(and then add gid)
Has anyone ever done something similar?
Thanks in advance,
Nikos
PS1: The geometries of my tables are such that one feature from one layer
intersects with multiple features from the other layer.
PS2: When I run this query for one isolated polygon from each table the
result is OK.
PS3: I also tried the ST_Difference function with no success.
A picture might help:
http://www.nabble.com/attachment/24716126/0/example_difference.TIF
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list