PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ boundary()

Datum boundary ( PG_FUNCTION_ARGS  )

Definition at line 3301 of file lwgeom_functions_basic.c.

3302 {
3303  GSERIALIZED *geom1;
3305  LWGEOM *lwgeom, *lwresult;
3306 
3307  geom1 = PG_GETARG_GSERIALIZED_P(0);
3308 
3309  /* Empty.Boundary() == Empty, but of other dimension, so can't shortcut */
3310 
3311  lwgeom = lwgeom_from_gserialized(geom1);
3312  lwresult = lwgeom_boundary(lwgeom);
3313  if (!lwresult)
3314  {
3315  lwgeom_free(lwgeom);
3316  PG_RETURN_NULL();
3317  }
3318 
3319  result = geometry_serialize(lwresult);
3320 
3321  lwgeom_free(lwgeom);
3322  lwgeom_free(lwresult);
3323 
3324  PG_RETURN_POINTER(result);
3325 }
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:1138
LWGEOM * lwgeom_boundary(LWGEOM *lwgeom)
Definition: lwgeom.c:2569

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

Here is the call graph for this function: