ST_DelaunayTriangles will calculate a 3D TIN with the correct flag: geometry ST_DelaunayTriangles (geometry g1, float tolerance, int4 flags):
DROP TABLE IF EXISTS chp07.uas_tin; CREATE TABLE chp07.uas_tin AS WITH pts AS ( SELECT PC_Explode(pa) AS pt FROM chp07.uas_flights ) SELECT ST_DelaunayTriangles(ST_Union(pt::geometry), 0.0, 2) AS the_geom FROM pts;
Now, we have a full TIN of a digital surface model at our disposal: