<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">For instance.  Say i have a table with the schema of <br><br>int rowID<br>varchar category<br>the_geom geometry (Point2D)<br>and other useful fields<br><br>And i want to get convex hulls of each category in one query.<br><br>SELECT convexhull(collect(the_geom)), category, count(*) FROM tblName GROUP BY category;<br><br>convexhull isn't an aggregate function so it can't work in this context.  <br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Paul Ramsey <pramsey@refractions.net><br>To: Curtis W. Ruck <ruckc@yahoo.com>; PostGIS Users Discussion <postgis-users@postgis.refractions.net><br>Sent: Thursday, September 21, 2006 12:59:45 PM<br>Subject: Re:
 [postgis-users] ConvexHull Aggregate?<br><br>perhaps:<div><br class="khtml-block-placeholder"></div><div>  select convexhull(collect(the_geom) from thetable<div><br class="khtml-block-placeholder"></div><div>depends on what semantic you mean when you say "if convexhull was an aggregate".</div><div><br class="khtml-block-placeholder"></div><div>P</div><div><br><div><div>On 21-Sep-06, at 10:44 AM, Curtis W. Ruck wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div>Anyone know how in a SQL select statement to get a Convex Hull polygon geometry as if ConvexHull was an aggregate function?</div> <div> </div> <div>Curtis</div></div><div style="margin: 0px;">_______________________________________________</div><div style="margin: 0px;">postgis-users mailing list</div><div style="margin: 0px;"><a id="bodyLinks" rel="nofollow" target="_blank"
 href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a></div><div style="margin: 0px;"><a id="bodyLinks" rel="nofollow" target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a></div> </blockquote></div><br></div></div></div><br></div></div></body></html>