PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ assvg_collection_size()

static size_t assvg_collection_size ( const LWCOLLECTION col,
int  relative,
int  precision 
)
static

Collection Geometry.

Definition at line 413 of file lwout_svg.c.

References assvg_geom_size(), LWCOLLECTION::geoms, and LWCOLLECTION::ngeoms.

Referenced by assvg_collection().

414 {
415  uint32_t i = 0;
416  size_t size=0;
417  const LWGEOM *subgeom;
418 
419  for (i=0; i<col->ngeoms; i++)
420  {
421  subgeom = col->geoms[i];
422  size += assvg_geom_size(subgeom, relative, precision);
423  }
424 
425  if ( i ) /* We have some geometries, so add space for delimiters. */
426  size += sizeof(";") * --i;
427 
428  if (size == 0) size++; /* GEOMETRYCOLLECTION EMPTY, space for null terminator */
429 
430  return size;
431 }
uint32_t ngeoms
Definition: liblwgeom.h:509
unsigned int uint32_t
Definition: uthash.h:78
LWGEOM ** geoms
Definition: liblwgeom.h:511
uint8_t precision
Definition: cu_in_twkb.c:25
static size_t assvg_geom_size(const LWGEOM *geom, int relative, int precision)
Definition: lwout_svg.c:509
Here is the call graph for this function:
Here is the caller graph for this function: