PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized2_from_lwcollection_size()

static size_t gserialized2_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 718 of file gserialized2.c.

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

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: