PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_DelaunayTriangles()

Datum ST_DelaunayTriangles ( PG_FUNCTION_ARGS  )

Definition at line 3089 of file postgis/lwgeom_geos.c.

3090 {
3091  GSERIALIZED *result;
3092  GSERIALIZED *geom;
3093  LWGEOM *lwgeom_in, *lwgeom_out;
3094  double tolerance = 0.0;
3095  int flags = 0;
3096 
3097  geom = PG_GETARG_GSERIALIZED_P(0);
3098  tolerance = PG_GETARG_FLOAT8(1);
3099  flags = PG_GETARG_INT32(2);
3100 
3101  lwgeom_in = lwgeom_from_gserialized(geom);
3102  lwgeom_out = lwgeom_delaunay_triangulation(lwgeom_in, tolerance, flags);
3103  lwgeom_free(lwgeom_in) ;
3104 
3105  if ( ! lwgeom_out )
3106  {
3107  PG_FREE_IF_COPY(geom, 0);
3108  PG_RETURN_NULL();
3109  }
3110 
3111  result = geometry_serialize(lwgeom_out) ;
3112  lwgeom_free(lwgeom_out) ;
3113 
3114  PG_FREE_IF_COPY(geom, 0);
3115  PG_RETURN_POINTER(result);
3116 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * lwgeom_delaunay_triangulation(const LWGEOM *geom, double tolerance, int32_t edgeOnly)
Take vertices of a geometry and build a delaunay triangulation on them.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

References geometry_serialize(), lwgeom_delaunay_triangulation(), lwgeom_free(), and lwgeom_from_gserialized().

Here is the call graph for this function: