PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwcollection_unstroke()

LWGEOM * lwcollection_unstroke ( const LWCOLLECTION c)

Definition at line 1231 of file lwstroke.c.

1232 {
1233  LWCOLLECTION *ret = lwalloc(sizeof(LWCOLLECTION));
1234  memcpy(ret, c, sizeof(LWCOLLECTION));
1235 
1236  if (c->ngeoms > 0)
1237  {
1238  uint32_t i;
1239  ret->geoms = lwalloc(sizeof(LWGEOM *)*c->ngeoms);
1240  for (i=0; i < c->ngeoms; i++)
1241  {
1242  ret->geoms[i] = lwgeom_unstroke(c->geoms[i]);
1243  }
1244  if (c->bbox)
1245  {
1246  ret->bbox = gbox_copy(c->bbox);
1247  }
1248  }
1249  else
1250  {
1251  ret->bbox = NULL;
1252  ret->geoms = NULL;
1253  }
1254  return (LWGEOM *)ret;
1255 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: gbox.c:426
void * lwalloc(size_t size)
Definition: lwutil.c:227
LWGEOM * lwgeom_unstroke(const LWGEOM *geom)
Definition: lwstroke.c:1259
uint32_t ngeoms
Definition: liblwgeom.h:566
GBOX * bbox
Definition: liblwgeom.h:560
LWGEOM ** geoms
Definition: liblwgeom.h:561

References LWCOLLECTION::bbox, gbox_copy(), LWCOLLECTION::geoms, lwalloc(), lwgeom_unstroke(), and LWCOLLECTION::ngeoms.

Referenced by lwgeom_unstroke().

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