[postgis-tickets] [PostGIS] #1898: ST_DelaunayTriangles option to output as TIN

PostGIS trac at osgeo.org
Sat May 4 16:05:47 PDT 2013


#1898: ST_DelaunayTriangles option to output as TIN
-------------------------+--------------------------------------------------
 Reporter:  robe         |       Owner:  nw            
     Type:  enhancement  |      Status:  assigned      
 Priority:  high         |   Milestone:  PostGIS Future
Component:  postgis      |     Version:  trunk         
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by nw):

  * owner:  pramsey => nw
  * status:  new => assigned


Comment:

 I have looked at the code for this and what is returned
 is a geometrycollection, which is binary compatible with
 a TIN.  Unfortunately, what is returned is a collection
 of polygons, not a collection of triangles, which is what
 a TIN wants, and Polygon is not binary compatible with
 a Triangle.

 So in order to create a tin, we need to convert all the
 polygons to triangles.

 I have modified the st_delaunayTriangles to return a TIN
 (always) unless edgesonly is used, in which case, it returns
 a multilinestring (as it did before, I use the old code).
 Since a TIN is a collection, I think it should be acceptable
 to return one.  Code that is specifically wanting a generic
 collection rather than an actual TIN will break of course,
 so this isn't technically a backwards compatible change.
 We could add an additional argument to ask for a TIN if it's
 really needed.

 Personally, I think the flags argument to ST_DelaunayTriangles
 should be a boolean, since that's what it is.  Since this is
 a new function, presumably that would be acceptable, as there
 shouldn't be any existing code that would break.

 Patch attached.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1898#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list