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)
Change History (7)
by , 11 years ago
Attachment: | st_astin.sql added |
---|
comment:1 by , 11 years ago
comment:2 by , 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 , 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 , 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 , 11 years ago
Type: | defect → enhancement |
---|
Ah, so just a question of API. I'll open a ticket with a patch then.
comment:6 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Ok, closing for this ticket: http://trac.osgeo.org/postgis/ticket/2581
I know you mentioned 2.5D, but why not make it OGC compatible form? Line 39 in the patch
should read
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)