[postgis-devel] Is there a reason those GArray functions aren't documented?

Kevin Neufeld kneufeld at refractions.net
Tue Jul 1 08:51:22 PDT 2008

Obe, Regina wrote:
> I was assuming it is because we consider them internal like functions
> since they are used to form the aggregate functions and may be something
> that changes in the future.  

I think this is exactly why they were never documented.  I suppose we 
could add an "Internals" section to the documentation and catalog these 
as well as all the _ST* methods.

> I finally found a use for them somewhat directly and felt a little dirty
> using them.
> Case in point.  Someone asked me how to formulate a polygon if he has a
> known finite set of points he pulled out of a hat (well a hat that forms
> points forming a closed ring - not coming from an aggregate rollup)
> After looking thru the docs and the closest thing I could come up with
> using documented
> functions was
> ST_MakePolygon(ST_LineFromMultiPoint(multipoint))
> which would require me to get my points into a multipoint (using yet
> another undocumented GArray function or using a messy union all).

I think this, or the simliar approach 
ST_MakePolygon(ST_MakeLine(geometry set)), is how one would build up a 
Polygon - construct linestrings that define the exterior and interior 
rings, and use them to define the boundary of the polygon.


More information about the postgis-devel mailing list