PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ gserialized_from_lwcollection_size()

static size_t gserialized_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 751 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

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