[postgis-users] SymDifference result resembles UNION

Kolios N. n.kolios at gmail.com
Wed Jul 29 03:01:42 PDT 2009


Hi all,

I am using an ST_SymDifference query in order to visualise changes in
the shape of multipolygon shapefiles.



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);



When I run this query for two isolated polygons of my dataset the
result is the expected one. But when I use the full dataset the result
looks pretty much like a UNION, that is, it includes the entire
geometries of both input shapefiles rather than the portions that do
not intersect.

I have tried running this query both with and without the last line.
The result was the same but the execution time longer in the later
case.

I also tried the ST_Difference function but the result is the same.

Is this failure related with the fact that the input tables are
multipolygons rather than polygons? If so, how can I convert them to
polygons?

I ve tried the instructions found here:

http://www.postgis.org/pipermail/postgis-users/2007-March/015074.html
but something is not working well in steps 1 and 3. The new "polies"
table remains empty.


Thanks in advance
Nikos

PS: I am not sure if it will go through but I am attaching a
screenshot with the geometry of input and output tables.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example_difference.TIF
Type: image/tiff
Size: 207722 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090729/b17ed82b/attachment.tif>


More information about the postgis-users mailing list