[postgis-users] Wondering about points3d into contours

Sandro Santilli strk at keybit.net
Mon Sep 26 07:48:10 PDT 2011


On Sat, Sep 24, 2011 at 11:32:24PM -0400, Stephen Woodbridge wrote:
> Hi all,
> 
> I wrote code years ago in C that would take a cloud of 3D points
> insert them into a Delaunay triangular surface, then slice the
> surface triangles with a plane(s) into intersecting edges and then
> composite rings from the edges. It seems like we are very close to
> being able to do this in PostGIS. I'm not sure if we have the
> Delaunay triangularization yet.
> 
> I'm thinking of something like:
> 
> select b.z, a.* from
>   st_buildarea(
>     st_collect(
>       intersection(
>         delaunay_triangles(
>           select the_geom from points),
>           st_translate(
>             st_expand(select extents(the_geom) from points, 0.1),
>             0.0, 0.0, b.z
>           )
>         )
>       )
>     )
>   ) as a,
>   (select 1.0 * generate_series(2, 10, 2) as z) as b
>  group by b.z;
> 
> So I'm thinking of something like this is the use case, where this
> would create contour rings for Z at 2, 4, 6, 8, and 10 based on the
> triangulated surface created from the points. My SQL is probably
> broken, but it is only to present the idea.
> 
> So any ideas on how to do this now?
> Or if Delaunay triangularization will get added to PostGIS or GEOS?

Delaunay triangularization is in JTS already.
Should be ported to GEOS first (3.4.0?) and then
PostGIS (2.1?) could use it.

There's been some interest for the first step but none of that ended
up turning into actual fundings. It'll surely be helpful to have use
cases like yours in the C-API interface design phase.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-users mailing list