[postgis-users] Concave hull problem & delaunay triangulation -help needed please
lr at pcorp.us
Fri Aug 31 21:48:06 PDT 2012
Is your data 2D or 3D? You might want to try out the new
ST_DelaunayTriangles in 2.1
Right now I beleive it's just 2D, but work is going on in GEOS land to make
it 3D.: http://trac.osgeo.org/geos/ticket/570
It does require upgrading your system to 2.1 development and Geos 3.4.0
dev so might not be an option for you yet.
We also have windows build bot builds for those on windows who want to try
which gets built whenever there is a change in the 2.1 code base
http://www.postgis.org/download/windows/experimental.php (for 9.2 both
32-bit/64-bit and for 9.0,9.1 just 64-bit windows)
Hope that helps,
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
pcreso at pcreso.com
Sent: Friday, August 31, 2012 11:42 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Concave hull problem & delaunay triangulation -help
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.
Much useful info (as usual - thanks guys!!) at spatialdbadvisor & bostongis
but my limited understanding is stalling progress for now.
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:
http://www.bostongis.com/postgis_concavehull.snippet as this buffers the
points in some cases, and often gives quite unexpected (to me anyway)
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!!
I have Simon's code working fine, at least using his example invocation,
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.
I have a set of sample points in a table:
Column | Type |
id | integer | not null default
geom | geometry(Point) |
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
Once I get the triangles as an output set I can use Postgis for the rest...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users