PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ LWGEOM_isempty()

Datum LWGEOM_isempty ( PG_FUNCTION_ARGS  )

Definition at line 1792 of file lwgeom_functions_basic.c.

References dumpnode::geom, lwgeom_free(), lwgeom_from_gserialized(), lwgeom_is_empty(), LWGEOM_segmentize2d(), and PG_FUNCTION_INFO_V1().

Referenced by LWGEOM_envelope().

1793 {
1794  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
1795  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
1796  bool empty = lwgeom_is_empty(lwgeom);
1797 
1798  lwgeom_free(lwgeom);
1799  PG_FREE_IF_COPY(geom, 0);
1800  PG_RETURN_BOOL(empty);
1801 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
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:1346
Here is the call graph for this function:
Here is the caller graph for this function: