PostGIS
Synopsis
geometry +`*`+ST_DelaunayTriangles
*(`geometry `g1
, float
tolerance = 0.0
, int4 flags = 0`
)`;
Description
Computes the
Delaunay
triangulation of the vertices of the input geometry. The optional
tolerance
can be used to snap nearby input vertices together, which
improves robustness in some situations. The result geometry is bounded
by the convex hull of the input vertices. The result geometry
representation is determined by the flags
code:
-
0
- a GEOMETRYCOLLECTION of triangular POLYGONs (default) -
1
- a MULTILINESTRING of the edges of the triangulation -
2
- A TIN of the triangulation
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).
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 using vertices with Z values.
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)))
See Also
ST_VoronoiPolygons, ST_TriangulatePolygon, ST_ConstrainedDelaunayTriangles, ST_VoronoiLines, ST_ConvexHull
ST_ConvexHull |
ST_FilterByM |