PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized2_is_empty()

int gserialized2_is_empty ( const GSERIALIZED g)

Check if a GSERIALIZED is empty without deserializing first.

Only checks if the number of elements of the parent geometry is zero, will not catch collections of empty, eg: GEOMETRYCOLLECTION(POINT EMPTY)

Definition at line 251 of file gserialized2.c.

252 {
253  int isempty = 0;
254  uint8_t *p = gserialized2_get_geometry_p(g);
255  gserialized2_is_empty_recurse(p, &isempty);
256  return isempty;
257 }
static size_t gserialized2_is_empty_recurse(const uint8_t *p, int *isempty)
Definition: gserialized2.c:224
static uint8_t * gserialized2_get_geometry_p(const GSERIALIZED *g)
Definition: gserialized2.c:104

References gserialized2_get_geometry_p(), and gserialized2_is_empty_recurse().

Referenced by gserialized_is_empty(), and test_gserialized2_is_empty().

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