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?
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
