PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized_is_empty()

int gserialized_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 152 of file gserialized.c.

153 {
154  if (GFLAGS_GET_VERSION(g->gflags))
155  return gserialized2_is_empty(g);
156  else
157  return gserialized1_is_empty(g);
158 }
int gserialized1_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: gserialized1.c:203
int gserialized2_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: gserialized2.c:251
#define GFLAGS_GET_VERSION(gflags)
Definition: gserialized.c:12
uint8_t gflags
Definition: liblwgeom.h:432