PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gserialized2_from_lwcollection_size()

static size_t gserialized2_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 720 of file gserialized2.c.

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