PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ gserialized_from_lwcollection_size()

static size_t gserialized_from_lwcollection_size ( const LWCOLLECTION col)
static

Definition at line 483 of file g_serialized.c.

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

Referenced by gserialized_from_any_size().

484 {
485  size_t size = 4; /* Type number. */
486  int i = 0;
487 
488  assert(col);
489 
490  size += 4; /* Number of sub-geometries (zero => empty). */
491 
492  for ( i = 0; i < col->ngeoms; i++ )
493  {
494  size_t subsize = gserialized_from_any_size(col->geoms[i]);
495  size += subsize;
496  LWDEBUGF(3, "lwcollection subgeom(%d) size = %d", i, subsize);
497  }
498 
499  LWDEBUGF(3, "lwcollection size = %d", size);
500 
501  return size;
502 }
LWGEOM ** geoms
Definition: liblwgeom.h:493
static size_t gserialized_from_any_size(const LWGEOM *geom)
Definition: g_serialized.c:504
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55
Here is the call graph for this function:
Here is the caller graph for this function: