PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwcollection_unstroke()

LWGEOM * lwcollection_unstroke ( const LWCOLLECTION c)

Definition at line 1140 of file lwstroke.c.

1141 {
1142  LWCOLLECTION *ret = lwalloc(sizeof(LWCOLLECTION));
1143  memcpy(ret, c, sizeof(LWCOLLECTION));
1144 
1145  if (c->ngeoms > 0)
1146  {
1147  uint32_t i;
1148  ret->geoms = lwalloc(sizeof(LWGEOM *)*c->ngeoms);
1149  for (i=0; i < c->ngeoms; i++)
1150  {
1151  ret->geoms[i] = lwgeom_unstroke(c->geoms[i]);
1152  }
1153  if (c->bbox)
1154  {
1155  ret->bbox = gbox_copy(c->bbox);
1156  }
1157  }
1158  else
1159  {
1160  ret->bbox = NULL;
1161  ret->geoms = NULL;
1162  }
1163  return (LWGEOM *)ret;
1164 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: g_box.c:433
void * lwalloc(size_t size)
Definition: lwutil.c:229
LWGEOM * lwgeom_unstroke(const LWGEOM *geom)
Definition: lwstroke.c:1168
uint32_t ngeoms
Definition: liblwgeom.h:510
GBOX * bbox
Definition: liblwgeom.h:508
LWGEOM ** geoms
Definition: liblwgeom.h:512
unsigned int uint32_t
Definition: uthash.h:78

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: