This topic describes the ST_DelaunayTriangles function. This function returns a Delaunay triangulation around the vertices of the input geometry object.

Syntax

geometry  ST_DelaunayTriangles(geometry  g1 , float  tolerance , int4  flags);

Parameters

Parameter Description
g1 The geometry object that you want to specify.
tolerance The tolerance of the vertices of the input geometry object.
flags The bitfield that you want to specify. Valid values:
  • 0: This value indicates that the function returns the collection of polygon objects. This is the default value.
  • 1: This value indicates that the function return a MultiLineString object.
  • 2: This value indicates that the function returns a triangulated irregular network (TIN) surface.

Description

This function supports triangles and triangulated irregular network (TIN) surfaces.

Examples

Results returned by using the default parameter settings:
select g,ST_DelaunayTriangles(g) from (select ST_GeneratePoints('POLYGON((0 0,1 0,1 1,0 1,0 0))'::geometry,30) as g) as t;
1