PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ boundary()

Datum boundary ( PG_FUNCTION_ARGS  )

Definition at line 3420 of file lwgeom_functions_basic.c.

3421 {
3422  GSERIALIZED *geom1;
3424  LWGEOM *lwgeom, *lwresult;
3425 
3426  geom1 = PG_GETARG_GSERIALIZED_P(0);
3427 
3428  /* Empty.Boundary() == Empty, but of other dimension, so can't shortcut */
3429 
3430  lwgeom = lwgeom_from_gserialized(geom1);
3431  lwresult = lwgeom_boundary(lwgeom);
3432  if (!lwresult)
3433  {
3434  lwgeom_free(lwgeom);
3435  PG_RETURN_NULL();
3436  }
3437 
3438  result = geometry_serialize(lwresult);
3439 
3440  lwgeom_free(lwgeom);
3441  lwgeom_free(lwresult);
3442 
3443  PG_RETURN_POINTER(result);
3444 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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:2560

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

Referenced by ST_LargestEmptyCircle().

Here is the call graph for this function:
Here is the caller graph for this function: