PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum LWGEOM_isempty ( PG_FUNCTION_ARGS  )

Definition at line 1831 of file lwgeom_functions_basic.c.

References lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_is_empty().

1832 {
1833  GSERIALIZED *geom = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
1834  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
1835  bool empty = lwgeom_is_empty(lwgeom);
1836 
1837  lwgeom_free(lwgeom);
1838  PG_FREE_IF_COPY(geom, 0);
1839  PG_RETURN_BOOL(empty);
1840 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
LWGEOM * geom
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
Definition: lwgeom.c:1229

Here is the call graph for this function: