PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ assvg_collection()

static void assvg_collection ( stringbuffer_t sb,
const LWCOLLECTION col,
int  relative,
int  precision 
)
static

Note the j is to prevent adding a ; if the first geometry is empty, but subsequent aren't

Definition at line 472 of file lwout_svg.c.

473 {
474  uint32_t i; uint32_t j = 0;
475  const LWGEOM *subgeom;
476 
477  /* EMPTY GEOMETRYCOLLECTION */
478  if (col->ngeoms == 0) return;
479 
480  for (i = 0; i<col->ngeoms; i++)
481  {
482  subgeom = col->geoms[i];
483  if (!lwgeom_is_empty(subgeom) ){
487  if (j) stringbuffer_append(sb, ";");
488  j++;
489  assvg_geom(sb, subgeom, relative, precision);
490  }
491  }
492 
493 }
static uint8_t precision
Definition: cu_in_twkb.c:25
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwinline.h:203
static void assvg_geom(stringbuffer_t *sb, const LWGEOM *geom, int relative, int precision)
Definition: lwout_svg.c:498
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.h:105
uint32_t ngeoms
Definition: liblwgeom.h:580
LWGEOM ** geoms
Definition: liblwgeom.h:575

References assvg_geom(), LWCOLLECTION::geoms, lwgeom_is_empty(), LWCOLLECTION::ngeoms, precision, and stringbuffer_append().

Referenced by lwgeom_to_svg().

Here is the call graph for this function:
Here is the caller graph for this function: