PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gserialized_from_lwcollection_size()

static size_t gserialized_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 752 of file g_serialized.c.

753 {
754  size_t size = 4; /* Type number. */
755  uint32_t i = 0;
756 
757  assert(col);
758 
759  size += 4; /* Number of sub-geometries (zero => empty). */
760 
761  for ( i = 0; i < col->ngeoms; i++ )
762  {
763  size_t subsize = gserialized_from_any_size(col->geoms[i]);
764  size += subsize;
765  LWDEBUGF(3, "lwcollection subgeom(%d) size = %d", i, subsize);
766  }
767 
768  LWDEBUGF(3, "lwcollection size = %d", size);
769 
770  return size;
771 }
static size_t gserialized_from_any_size(const LWGEOM *geom)
Definition: g_serialized.c:773
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
uint32_t ngeoms
Definition: liblwgeom.h:510
LWGEOM ** geoms
Definition: liblwgeom.h:512
unsigned int uint32_t
Definition: uthash.h:78

References LWCOLLECTION::geoms, gserialized_from_any_size(), LWDEBUGF, and LWCOLLECTION::ngeoms.

Referenced by gserialized_from_any_size().

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