[postgis-users] ST_Difference query returns a dissolved result

Max Demars burton449geo at gmail.com
Thu Sep 4 12:20:32 PDT 2014


Hi!

I am using the ST_Difference to erase multipolygon feature by a mask.
However, the query returns a dssolved multipolygon.

The query is the following:

'''SELECT ST_AsGeoJSON(ST_Collect(geom))
::json
   FROM (SELECT (
     ST_Dump (

ST_Difference(ST_GeomFromGeoJSON('%s'),ST_GeomFromGeoJSON('%s')))).geom)
             As f''' % (feature,mask)

Please take a look at those images above to understand the problem:

Input: http://i.stack.imgur.com/QO4MN.png
Output: http://i.stack.imgur.com/Slw32.png

Thank you all,
-Max Demars
-- 
Stack Overflow: http://stackoverflow.com/users/1914034/burton449
GIS Overflow: http://gis.stackexchange.com/users/14426/burton449
LastFm: http://www.lastfm.fr/user/burton449
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140904/4bbeb730/attachment.html>


More information about the postgis-users mailing list