<div dir="ltr"><div><div><div><div>Hi!<br><br></div>I am using the ST_Difference to erase multipolygon feature by a mask. However, the query returns a dssolved multipolygon.<br><br></div>The query is the following:<br><br>
'''SELECT ST_AsGeoJSON(ST_Collect(geom))<div dir="ltr">::json <br>
   FROM (SELECT (<br>     ST_Dump ( <br>         ST_Difference(ST_GeomFromGeoJSON('%s'),ST_GeomFromGeoJSON('%s')))).geom) <br>             As f''' % (feature,mask)<br clear="all"><div><div><div>

<br></div><div>Please take a look at those images above to understand the problem:</div></div></div></div><br clear="all"></div>Input: <a href="http://i.stack.imgur.com/QO4MN.png">http://i.stack.imgur.com/QO4MN.png</a><br>
</div>Output: <a href="http://i.stack.imgur.com/Slw32.png">http://i.stack.imgur.com/Slw32.png</a><br><div><div><br></div><div>Thank you all,<br></div><div>-Max Demars<br></div><div>-- <br><div dir="ltr"><div><div><div>Stack Overflow: <a href="http://stackoverflow.com/users/1914034/burton449" target="_blank">http://stackoverflow.com/users/1914034/burton449</a><br>
</div></div>GIS Overflow: <a href="http://gis.stackexchange.com/users/14426/burton449" target="_blank">http://gis.stackexchange.com/users/14426/burton449</a><br></div>LastFm: <a href="http://www.lastfm.fr/user/burton449" target="_blank">http://www.lastfm.fr/user/burton449</a><br>
</div>
</div></div></div>