PostGIS
Description
Return the Delaunay triangulation of the vertices of the input geometry. Output is a COLLECTION of polygons (for flags=0) or a MULTILINESTRING (for flags=1) or TIN (for flags=2). The tolerance, if any, is used to snap input vertices together.
Performed by the GEOS module.
Availability: 2.1.0
This function supports 3d and will not drop the z-index.
This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
2D Examples
Original polygons
|
ST_DelaunayTriangles of 2 polygons: delaunay triangle polygons each triangle themed in different color
|
— delaunay triangles as multilinestring
|
— delaunay triangles of 45 points as 55 triangle polygons
|
Example 1
-- 3D multipoint --
SELECT ST_AsText(ST_DelaunayTriangles(ST_GeomFromText(
'MULTIPOINT Z(14 14 10,
150 14 100,34 6 25, 20 10 150)'))) As wkt;
-----wkt----
GEOMETRYCOLLECTION Z (POLYGON Z ((14 14 10,20 10 150,34 6 25,14 14 10))
,POLYGON Z ((14 14 10,34 6 25,150 14 100,14 14 10)))
ST_ConvexHull |
ST_FilterByM |