<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I'm trying to come up with an approach using Postgis to come up with a polygon representing the outer bounds of a set of points, ie: a polygon passing through all the outer points.<br><br>Much useful info (as usual - thanks guys!!) at spatialdbadvisor & bostongis but my limited understanding is stalling progress for now.<br><br>I came across the ST_Concavehull() function, which fails. Indeed, I was surprised to see this actually expands the polygon extent representing the point set, as shown at:<br><a href="http://www.bostongis.com/postgis_concavehull.snippet">http://www.bostongis.com/postgis_concavehull.snippet</a> as this buffers the points in some cases, and often gives quite unexpected (to me anyway) results. <br><br>Looking for something that fits better, using existing capabilities, I figured I could pretty easily use Delaunay triangulation
 to create the outer hull, then realised this bridges every second outer point (pretty much by definition). That's easy, just remove any triangles from the polygon where they share a line segment with the polygon. I like Postgis!!<br><br>I have Simon's code working fine, at least using his example invocation, from:<br><a href="http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-package">http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-package</a><br><br>But I can't figure out how to make it work with my point data. I don't know R or PL/R well enough to adapt it.<br><br>I have a set of sample points in a table:<br><br><font face="courier,monaco,monospace,sans-serif">  Column |      Type      
 |                                   <br> --------+-----------------+-----------------<br>  id     | integer         | not null default<br>  geom   | geometry(Point) | </font><br><br>Can anyone explain, ideally in words of one syllable or less, how Simon's function from the link above needs to be adapted to read my points dataset as input?<br><br>Once I get the triangles as an output set I can use Postgis for the rest...<br><br>Thanks,<br><br>   Brent Wood<br><br><br></td></tr></table>