PostGIS  2.2.8dev-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 409 of file lwout_svg.c.

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

Referenced by assvg_collection().

410 {
411  int i = 0;
412  size_t size=0;
413  const LWGEOM *subgeom;
414 
415  for (i=0; i<col->ngeoms; i++)
416  {
417  subgeom = col->geoms[i];
418  size += assvg_geom_size(subgeom, relative, precision);
419  }
420 
421  if ( i ) /* We have some geometries, so add space for delimiters. */
422  size += sizeof(";") * --i;
423 
424  if (size == 0) size++; /* GEOMETRYCOLLECTION EMPTY, space for null terminator */
425 
426  return size;
427 }
LWGEOM ** geoms
Definition: liblwgeom.h:493
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:505
Here is the call graph for this function:
Here is the caller graph for this function: