[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.
On 7/4/07, Craig Feuerherdt <craigfeuerherdt at gmail.com> wrote:
> 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?
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users