<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi James,<br></div><div><br data-mce-bogus="1"></div><div>perhaps you could split the data per multipolygon into the largest polygon and the rest. Then buffer the smaller polygons by a small amount and union them with the large polygon?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Regards,<br data-mce-bogus="1"></div><div>Birgit<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>Von: </b>"James Sewell" <james.sewell@lisasoft.com><br><b>An: </b>postgis-users@lists.osgeo.org<br><b>Gesendet: </b>Montag, 6. August 2018 09:24:42<br><b>Betreff: </b>[postgis-users] MultiPolygon -> Polygon<br></div><br><div data-marker="__QUOTED_TEXT__"><div dir="ltr">

Hi all,<br><div>I have a set of LineStrings which are being turned in Polygons (most of which are invalid).</div><br><div>I can clean these (makevalid or buffer), but then some of them result in MultiPolygons (which makes sense - mostly small bowties).</div><br><div>I'm looking for the easiest way to get a single Polygon from each of these MultiPolygons - I can tolerate a small amount of change in area (up to 5%).</div><br><div>I've tried small just keeping the largest poly, buffer(small_number) and concavehull but nothing seems quite right.</div><br><div>Any ideas?</div><br><div>Cheers,</div><div><br clear="all"><div><div class="gmail-m_3870180928983804835gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:small"><span style="color:rgb(50,59,98);font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:bold">James Sewell,</span><br></div><br class="gmail-Apple-interchange-newline">

</div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:14px;color:rgb(184,39,106);font-stretch:normal;font-family:Arial,Helvetica,sans-serif"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>

<br>
<hr style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14.5455px;line-height:normal"><span data-mce-style="line-height: normal; color: gray; font-family: Arial; font-size: xx-small;" style="line-height: normal; color: gray; font-family: Arial; font-size: xx-small;" size="1" face="Arial" color="Gray">The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.</span>
<br>
<p></p><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:14.545454025268555px;background-color:rgb(255,255,255)"><hr><span data-mce-style="color: gray; font-family: Arial; font-size: xx-small;" style="color: gray; font-family: Arial; font-size: xx-small;" size="1" face="Arial" color="Gray">The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.</span></div><p></p><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@lists.osgeo.org<br>https://lists.osgeo.org/mailman/listinfo/postgis-users<br></div></div></body></html>