PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ gserialized1_is_empty()

int gserialized1_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 204 of file gserialized1.c.

205{
206 uint8_t *p = (uint8_t*)g;
207 int isempty = 0;
208 assert(g);
209
210 p += 8; /* Skip varhdr and srid/flags */
212 p += gserialized1_box_size(g); /* Skip the box */
213
215 return isempty;
216}
int gserialized1_has_bbox(const GSERIALIZED *gser)
Check if a GSERIALIZED has a bounding box without deserializing first.
static size_t gserialized1_box_size(const GSERIALIZED *g)
static size_t gserialized1_is_empty_recurse(const uint8_t *p, int *isempty)

References gserialized1_box_size(), gserialized1_has_bbox(), and gserialized1_is_empty_recurse().

Referenced by gserialized_is_empty(), and test_gserialized1_is_empty().

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