PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized1_from_lwcollection_size()

static size_t gserialized1_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 665 of file gserialized1.c.

666 {
667  size_t size = 4; /* Type number. */
668  uint32_t i = 0;
669 
670  assert(col);
671 
672  size += 4; /* Number of sub-geometries (zero => empty). */
673 
674  for ( i = 0; i < col->ngeoms; i++ )
675  {
676  size_t subsize = gserialized1_from_any_size(col->geoms[i]);
677  size += subsize;
678  LWDEBUGF(3, "lwcollection subgeom(%d) size = %d", i, subsize);
679  }
680 
681  LWDEBUGF(3, "lwcollection size = %d", size);
682 
683  return size;
684 }
static size_t gserialized1_from_any_size(const LWGEOM *geom)
Definition: gserialized1.c:686
#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, gserialized1_from_any_size(), LWDEBUGF, and LWCOLLECTION::ngeoms.

Referenced by gserialized1_from_any_size().

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