[postgis-users] Create POLYGON from Several LINESTRINGs
Avery Penniston
apenniston at geo-comm.com
Tue Jun 22 11:37:39 PDT 2010
I'm trying to create 'pie wedge' shaped polygons by building them in a
Postgres function. I am able to create the 2 straight chords and the
arc as separate LINESTRINGs, and I have verified that each LINESTRING
shares its endpoints with the other two LINESTRINGs. However, I am
having trouble putting the individual parts together to form a POLYGON.
I tried to ST_UNION the 3 LINESTRINGs together, and the result is a
MULTILINESTRING. I then call ST_LINEMERGE to convert the
MULTILINESTRING to a single LINESTRING so I can pass it to the
ST_POLYGON function, but the result of the ST_LINEMERGE is a
MULTILINESTRING.
I tried using ST_COLLECT instead of ST_UNION, but then I got a
GEOMETRYCOLLECTION containing a MULTILINESTRING and a LINESTRING.
Does anybody have some advice for creating a POLYGON from 3 or more
separate LINESTRINGs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100622/5dd3073a/attachment.html>
More information about the postgis-users
mailing list