PostGIS  2.3.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 423 of file lwout_svg.c.

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

Referenced by assvg_collection().

424 {
425  int i = 0;
426  size_t size=0;
427  const LWGEOM *subgeom;
428 
429  for (i=0; i<col->ngeoms; i++)
430  {
431  subgeom = col->geoms[i];
432  size += assvg_geom_size(subgeom, relative, precision);
433  }
434 
435  if ( i ) /* We have some geometries, so add space for delimiters. */
436  size += sizeof(";") * --i;
437 
438  if (size == 0) size++; /* GEOMETRYCOLLECTION EMPTY, space for null terminator */
439 
440  return size;
441 }
LWGEOM ** geoms
Definition: liblwgeom.h:508
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:519
Here is the call graph for this function:
Here is the caller graph for this function: