PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ gserialized2_from_lwcollection_size()

static size_t gserialized2_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 721 of file gserialized2.c.

722 {
723  size_t size = 4; /* Type number. */
724  uint32_t i = 0;
725 
726  assert(col);
727 
728  size += 4; /* Number of sub-geometries (zero => empty). */
729 
730  for (i = 0; i < col->ngeoms; i++)
731  {
732  size_t subsize = gserialized2_from_any_size(col->geoms[i]);
733  size += subsize;
734  LWDEBUGF(3, "lwcollection subgeom(%d) size = %zu", i, subsize);
735  }
736 
737  LWDEBUGF(3, "lwcollection size = %zu", size);
738 
739  return size;
740 }
static size_t gserialized2_from_any_size(const LWGEOM *geom)
Definition: gserialized2.c:742
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:106
uint32_t ngeoms
Definition: liblwgeom.h:580
LWGEOM ** geoms
Definition: liblwgeom.h:575

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

Referenced by gserialized2_from_any_size().

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