[postgis-users] R Based

Simon Greener simon at spatialdbadvisor.com
Sun Apr 22 17:37:55 PDT 2012


I had need of a Delaunay Trianguation function for use with PostGIS 2.0.

I found David Leahy's email post and Regine Obe's blog article on a vonoroi article using pl/R and Dr Rolf Turner's deldir package.

My initial function created the delaunay triangles but the triangles were 2D. I needed a function that maintained any Z attribute associated with the XY points passed in to the function.

I contacted Dr Rolf Turner. Rolf changed the base deldir function in the package to maintain any Z or associated value with the XY point set such that the returned triangles still have their Z values.

I have written a short blog article on this which includes the source code.

http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-package

Any comments, suggested improvements greatly welcomed.

NOTE: After my initial experience with deldir I installed Jaspa and used its ST_DelaunayTriangles function: it works beautifully and quickly.
But installing a whole replacement spatial type for Postgresql to get access to one function is overkill (and I don't have time to extract just
one function). In addition the solution is problematic due to pl/Java releases being behind PostgreSQL releases. And finally, the manual
nature of installation which while not a problem for me, it is for my less technical customers.

regards
Simon
-- 
Holder of "2011 Oracle Spatial Excellence Award for Education and Research."
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
Email: simon at spatialdbadvisor.com
Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120423/6bf71435/attachment.html>


More information about the postgis-users mailing list