PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gserialized_from_lwcollection_size()

static size_t gserialized_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 754 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

755 {
756  size_t size = 4; /* Type number. */
757  int i = 0;
758 
759  assert(col);
760 
761  size += 4; /* Number of sub-geometries (zero => empty). */
762 
763  for ( i = 0; i < col->ngeoms; i++ )
764  {
765  size_t subsize = gserialized_from_any_size(col->geoms[i]);
766  size += subsize;
767  LWDEBUGF(3, "lwcollection subgeom(%d) size = %d", i, subsize);
768  }
769 
770  LWDEBUGF(3, "lwcollection size = %d", size);
771 
772  return size;
773 }
LWGEOM ** geoms
Definition: liblwgeom.h:509
static size_t gserialized_from_any_size(const LWGEOM *geom)
Definition: g_serialized.c:775
#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: