[postgis-users] Concave hull problem & delaunay triangulation - help needed please

2012-08-31 Thread pcreso
Hi,

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) results. 

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, from:
http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-package

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 as 
input?

Once I get the triangles as an output set I can use Postgis for the rest...

Thanks,

   Brent Wood


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Concave hull problem & delaunay triangulation -help needed please

2012-08-31 Thread Paragon Corporation
Brent,
 
Is your data 2D or 3D?  You might want to try out the new
ST_DelaunayTriangles in 2.1
 
http://www.postgis.org/documentation/manual-svn/ST_DelaunayTriangles.html
 
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,
Regina
http://www.postgis.us
 
 

  _  

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of
pcr...@pcreso.com
Sent: Friday, August 31, 2012 11:42 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Concave hull problem & delaunay triangulation -help
needed please


Hi,

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)
results. 

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,
from:
http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-tri
angulation-function-for-postgis-using-the-deldir-package

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
as input?

Once I get the triangles as an output set I can use Postgis for the rest...

Thanks,

   Brent Wood



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Concave hull problem & delaunay triangulation -help needed please

2012-08-31 Thread pcreso
Thanks,

All things come to those who wait :-)

My data is 2D at present...

If I can't get thr PL/R solution working I think I'm better off waiting for 
GEOS 3.4/Postgis 2.1

Cheers,

  Brent


--- On Sat, 9/1/12, Paragon Corporation  wrote:

From: Paragon Corporation 
Subject: Re: [postgis-users] Concave hull problem & delaunay triangulation 
-help needed please
To: "'PostGIS Users Discussion'" 
Date: Saturday, September 1, 2012, 4:48 PM



 
 

Brent,
 
Is your data 2D or 3D?  You might want to try out the new 
ST_DelaunayTriangles in 2.1
 
http://www.postgis.org/documentation/manual-svn/ST_DelaunayTriangles.html
 
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,
Regina
http://www.postgis.us
 
 



From: 
postgis-users-boun...@postgis.refractions.net 
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of 
pcr...@pcreso.com
Sent: Friday, August 31, 2012 11:42 
PM
To: PostGIS Users Discussion
Subject: [postgis-users] 
Concave hull problem & delaunay triangulation -help needed 
please




  
  
Hi,

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) results. 

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, from:
http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-package

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 
  as input?

Once I get the triangles as an output set I can use 
  Postgis for the rest...

Thanks,

   Brent 
  Wood




-Inline Attachment Follows-

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Concave hull problem & delaunay triangulation - help needed please

2012-09-01 Thread Simon Greener

Brent,I have Simon's code working fine, at least using his example invocation, from:http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-packageBut 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 as input?Try something like this:Once I get the triangles as an output set I can use Postgis for the rest...Thanks,   Brent Wood-- 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 ProfessionalOracle 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: si...@spatialdbadvisor.com  Voice: +61 362 396397Mobile: +61 418 396391Skype: sggreenerLongitude: 147.20515 (147° 12' 18" E)Latitude: -43.01530 (43° 00' 55" S)GeoHash: r22em9r98wgNAC:W80CK 7SWP3___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Concave hull problem & delaunay triangulation - help needed please

2012-09-01 Thread Simon Greener

Brent,I have Simon's code working fine, at least using his example invocation, from:http://www.spatialdbadvisor.com/postgis_tips_tricks/290/r-based-delaunay-triangulation-function-for-postgis-using-the-deldir-packageBut 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 as input?Just pass in a valid SQL statement that exposes your x y and z point values eg:SELECT ST_Delaunay_Triangles('select ST_X(p.geom) as x,ST_Y(p.geom) as y,ST_Z(p.geom) from sample_points_in_table p') as triangle;regardsSimon-- 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 ProfessionalOracle 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: si...@spatialdbadvisor.com  Voice: +61 362 396397Mobile: +61 418 396391Skype: sggreenerLongitude: 147.20515 (147° 12' 18" E)Latitude: -43.01530 (43° 00' 55" S)GeoHash: r22em9r98wgNAC:W80CK 7SWP3___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users