Opened 11 years ago

Closed 11 years ago

#2579 closed enhancement (duplicate)

Add ST_AsTIN to PostGIS

Reported by: smathermather Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.2
Component: postgis Version: 2.1.x
Keywords: TIN, ST_Delaunay, 3D Cc:

Description

Leverage ST_Delaunay to provide 2.5D TIN from geometries. I have attached a hackerish SQL function which simply does a replace() on the appropriate ST_AsText results. I will patch to handle coordinate systems if there is interest in including in PostGIS.

Attachments (1)

st_astin.sql (1.6 KB ) - added by smathermather 11 years ago.

Download all attachments as: .zip

Change History (7)

by smathermather, 11 years ago

Attachment: st_astin.sql added

comment:1 by mloskot, 11 years ago

I know you mentioned 2.5D, but why not make it OGC compatible form? Line 39 in the patch

GEOMETRYCOLLECTION Z', 'TIN'

should read

GEOMETRYCOLLECTION Z', 'TIN Z'

Plus, add support for TIN with and M and ZM dimensions.

(I know TIN in 2D or with M only makes little sense from usability point, but OGC specifies it, presumably for completeness)

comment:2 by strk, 11 years ago

I'd rather have ST_DelaunayTriangles support direct TIN output. For some reason I thought I had a ticket for that but can't find it anymore. The problem for a function like this is that it'd be extremely easy to create invalid TINs…

comment:3 by smathermather, 11 years ago

You are right, mloskot. It should be TIN Z.

Hey strk, do you want me to close this and open one (without a patch) for ST_DelaunayTriangles? I agree, I have some worries about invalidity here, since a string replace() isn't the proper approach.

comment:4 by strk, 11 years ago

smathermather: yes please. Note the invalidity issue is not about string replace but rather about input structure. You should check that all components are triangles and that they form a valid topology. I hope both characteristics can be assumed from DelaunayTriangles output, so even a string replace would do.

comment:5 by smathermather, 11 years ago

Type: defectenhancement

Ah, so just a question of API. I'll open a ticket with a patch then.

comment:6 by smathermather, 11 years ago

Resolution: duplicate
Status: newclosed

Ok, closing for this ticket: http://trac.osgeo.org/postgis/ticket/2581

Note: See TracTickets for help on using tickets.