CG_3DConvexHull — Computes the 3D convex hull of a geometry.
geometry CG_3DConvexHull(
geometry geom1)
;
Availability: 3.5.0
Questo metodo richiede il backend SFCGAL.
Questa funzione supporta il 3d e non distrugge gli z-index.
Questa funzione supporta le Polyhedral Surface.
Questa funzione supporta i Triangoli e le Triangulated Irregular Network Surfaces (TIN).
SELECT ST_AsText(CG_3DConvexHull('LINESTRING Z(0 0 5, 1 5 3, 5 7 6, 9 5 3 , 5 7 5, 6 3 5)'::geometry));
POLYHEDRALSURFACE Z (((1 5 3,9 5 3,0 0 5,1 5 3)),((1 5 3,0 0 5,5 7 6,1 5 3)),((5 7 6,5 7 5,1 5 3,5 7 6)),((0 0 5,6 3 5,5 7 6,0 0 5)),((6 3 5,9 5 3,5 7 6,6 3 5)),((0 0 5,9 5 3,6 3 5,0 0 5)),((9 5 3,5 7 5,5 7 6,9 5 3)),((1 5 3,5 7 5,9 5 3,1 5 3)))
WITH f AS (SELECT i, CG_Extrude(geom, 0,0, i ) AS geom FROM ST_Subdivide(ST_Letters('CH'),5) WITH ORDINALITY AS sd(geom,i) ) SELECT CG_3DConvexHull(ST_Collect(f.geom) ) FROM f;