PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ boundary()

Datum boundary ( PG_FUNCTION_ARGS  )

Definition at line 3303 of file lwgeom_functions_basic.c.

3304 {
3305  GSERIALIZED *geom1;
3307  LWGEOM *lwgeom, *lwresult;
3308 
3309  geom1 = PG_GETARG_GSERIALIZED_P(0);
3310 
3311  /* Empty.Boundary() == Empty, but of other dimension, so can't shortcut */
3312 
3313  lwgeom = lwgeom_from_gserialized(geom1);
3314  lwresult = lwgeom_boundary(lwgeom);
3315  if (!lwresult)
3316  {
3317  lwgeom_free(lwgeom);
3318  PG_RETURN_NULL();
3319  }
3320 
3321  result = geometry_serialize(lwresult);
3322 
3323  lwgeom_free(lwgeom);
3324  lwgeom_free(lwresult);
3325 
3326  PG_RETURN_POINTER(result);
3327 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
LWGEOM * lwgeom_boundary(LWGEOM *lwgeom)
Definition: lwgeom.c:2586

References lwgeom_boundary(), lwgeom_free(), lwgeom_from_gserialized(), and result.

Here is the call graph for this function: