[postgis-users] polygon from multilinestrings

Rodrigo Martín LÓPEZ GREGORIO rodrigomartin at lopezgregorio.com.ar
Wed Jul 4 18:12:21 PDT 2007


Hi Craig. I try the next query and it works great for me:

select ConvexHull(Collect(the_geom)) from tablename;

(Actually I had to make Multi(ConvexHull(Collect(the_geom))) cause the
ConvexHull returns a 'POLYGON' and my geometry column was defined as
'MULTIPOLYGON' through constraint, so maybe you will need to do so).

I hope it will work for you.

Rodrigo.

On 7/4/07, Craig Feuerherdt <craigfeuerherdt at gmail.com> wrote:
>
> Michael,
>
> I did try that however the resultant table does not contain a polygon.
>
> I added a small rectangle to the layer using uDig (through geoserver) and
> attempted the query again. A polygon was generated.
> I checked the layer using isclosed(geom) and it returned false. How do I
> determine where the the line is broken and then rectify the error?
>
> Craig
>
>
>
> On Wed, Jul 04, 2007 at 11:31:37AM +1000, Craig Feuerherdt wrote:
> > > I have a table that has 275 individual multilinestrings. The
> > geometries have
> > > come from a variety of tables and represent a bounding area.
> > > I wish to create a single polygon from them.
> >
> > Have you tried something like this?
> >
> > select buildarea(geomunion(geom)) from tablename;
> >
> > --
> > Michael Fuhr
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070704/9ca6f54a/attachment.html>


More information about the postgis-users mailing list