[postgis-users] ConvexHull Aggregate?

Curtis W. Ruck ruckc at yahoo.com
Thu Sep 21 18:26:37 PDT 2006


For instance.  Say i have a table with the schema of 

int rowID
varchar category
the_geom geometry (Point2D)
and other useful fields

And i want to get convex hulls of each category in one query.

SELECT convexhull(collect(the_geom)), category, count(*) FROM tblName GROUP BY category;

convexhull isn't an aggregate function so it can't work in this context.  

----- Original Message ----
From: Paul Ramsey <pramsey at refractions.net>
To: Curtis W. Ruck <ruckc at yahoo.com>; PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Sent: Thursday, September 21, 2006 12:59:45 PM
Subject: Re: [postgis-users] ConvexHull Aggregate?

perhaps:

  select convexhull(collect(the_geom) from thetable

depends on what semantic you mean when you say "if convexhull was an aggregate".


P

On 21-Sep-06, at 10:44 AM, Curtis W. Ruck wrote:

Anyone know how in a SQL select statement to get a Convex Hull polygon geometry as if ConvexHull was an aggregate function?
  
 Curtis

_______________________________________________
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/20060921/b0559e06/attachment.html>


More information about the postgis-users mailing list