PostGIS  3.4.0dev-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 252 of file gserialized2.c.

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

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: