<div dir="ltr"><div><div><div><div><div><div>If you are saying that dump doesn't break your multi polygon into pieces,<br></div>either<br></div>_ dump has a bug (unlikely)<br></div>_ you don't have a multipolygon but a geometry collection (try ST_Dump(ST_CollectionExtract(geom,2)))<br>
</div>_you have an invalid simple polygon (try st_isvalid() )<br></div><div>_you have a simple polygon where interior rings should be stand alone polygon, use St_ringextract<br></div>Cheers,<br><br></div>Rémi-C<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-01-28 Hugues François <span dir="ltr"><<a href="mailto:hugues.francois@irstea.fr" target="_blank">hugues.francois@irstea.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What you say sounds very weird to me. I don't understand how postgis can consider a multipolygon as a polygon. Could you provide us a test sample of your data ?<br>
<span class="HOEnZb"><font color="#888888"><br>
Hugues.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a>] On Behalf Of Tom McCallum<br>

Sent: Tuesday, January 28, 2014 3:25 PM<br>
To: <a href="mailto:morten@sickel.net">morten@sickel.net</a>; PostGIS Users Discussion<br>
Subject: Re: [postgis-users] Removing tiny polygons<br>
<br>
Yes I just want the largest polygons.  The problem being that when I simplify the polygon it appears to need a lot more simplification due to these islands rather than if it just did did one mainland polygon ( asGeoJson comes in at 437 polygons rather than 1 polygon).  Not sure why GeoJson can split it into multiple polygons but Dump[] just hands me one.<br>

<br>
Was hoping to use ST_Area but currently cannot break down the single polygon.<br>
<br>
Interestingly QGIS can, if I do single to multipart it can break down into main landmass and islands.  What might be an equivalent postgis method for doing this?<br>
<br>
<br>
On Mon, 27 Jan 2014 19:15:18 -0000, Morten Sickel <<a href="mailto:morten@sickel.net">morten@sickel.net</a>><br>
wrote:<br>
<br>
> It depends on what you mean with "remove" - do you want to just have<br>
> the large polygons without the area that is covered by the small ones<br>
> or do you want to add the area of the small polygons onto one or more<br>
> of the larges? (e.g. how one typically wants to handle shiver<br>
> polygons)<br>
><br>
> In the first case it is as easy as a query like<br>
><br>
> select the_geom where ST_area(the_geom) > ...<br>
><br>
> Morten<br>
><br>
><br>
> Tom McCallum skrev:<br>
>> Hi all,<br>
>><br>
>> If I have a polygon geometry field which seems to be made up of a<br>
>> large number of tiny polygons and some larger ones, what is the best<br>
>> way to remove polygons below a certain size?  Would I need to<br>
>> preprocess this and save in a new table/record or can I dynamically<br>
>> do it?<br>
>><br>
>> Thanks<br>
>><br>
>> Tom<br>
>> _______________________________________________<br>
>> postgis-users mailing list<br>
>> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>