<div dir="ltr">You could use convex or concav envelop.<br>You can also union the geometries (eventually simplifying by neg buffer then pos buffer)<br>That's if you want precise boundary.<br>If you just need bbox ...<br>
Cheers,<br>Rémi-C<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-01-27 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">Hello,<br>
<br>
On my side, I often use st_buildarea(st_exteriorring((st_dump(geom)).geom)). And if I want to keep a single object for the original one, I union or collect them regarding their gid.<br>
<br>
HTH<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: Monday, January 27, 2014 1:51 PM<br>
To: PostGIS Users Discussion<br>
Subject: Re: [postgis-users] Getting boundary of set of polygons<br>
<br>
St_MakePolygon does not take a multilinestring.<br>
ST_BuildArea looked possible, but it gives me back lots of little areas and not a single boundary for the whole set.<br>
<br>
It looks as though ST_Dump with ST_MakePolygon may be useful but am still trying to get the right form something like<br>
<br>
ST_MakePolygon( ST_DUMP( ST_BOUNDARY( ST_COLLECT( wkb_boundary ) ) .geom )<br>
<br>
But it does not like the .geom bit.<br>
<br>
Any suggestions?<br>
<br>
On Mon, 27 Jan 2014 12:35:51 -0000, Nicolas Ribot <<a href="mailto:nicolas.ribot@gmail.com">nicolas.ribot@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> You should try st_makePolygon, or st_buildArea depending on the result<br>
> you want (keeping holes or removing them).<br>
><br>
> Nicolas<br>
><br>
><br>
><br>
> On 27 January 2014 13:32, Tom McCallum <<a href="mailto:termcc@googlemail.com">termcc@googlemail.com</a>> wrote:<br>
><br>
>> Hello all,<br>
>><br>
>> I am trying to get the boundary of a geometry(polygon) field in<br>
>> postgis (multiple polygons in this field).  I have this so far:<br>
>><br>
>> ST_BOUNDARY(ST_COLLECT(wkb_geometry))<br>
>><br>
>> which outputs MultilineString.  I need to convert this to a polygon.<br>
>> I have tried all sorts of things from ST_DUMP to converting to text<br>
>> and then trying ST_BdPolyFromText but got nothing to work so far.<br>
>> ST_Convexhull gives me a polygon but unfortunately its not what I<br>
>> want.<br>
>><br>
>> Could someone let me know what I should be calling.<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>
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>