PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ lwcollection_unstroke()

LWGEOM * lwcollection_unstroke ( const LWCOLLECTION c)

Definition at line 1243 of file lwstroke.c.

1244 {
1245  LWCOLLECTION *ret = lwalloc(sizeof(LWCOLLECTION));
1246  memcpy(ret, c, sizeof(LWCOLLECTION));
1247 
1248  if (c->ngeoms > 0)
1249  {
1250  uint32_t i;
1251  ret->geoms = lwalloc(sizeof(LWGEOM *)*c->ngeoms);
1252  for (i=0; i < c->ngeoms; i++)
1253  {
1254  ret->geoms[i] = lwgeom_unstroke(c->geoms[i]);
1255  }
1256  if (c->bbox)
1257  {
1258  ret->bbox = gbox_copy(c->bbox);
1259  }
1260  }
1261  else
1262  {
1263  ret->bbox = NULL;
1264  ret->geoms = NULL;
1265  }
1266  return (LWGEOM *)ret;
1267 }
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)
Convert linearized type into arc type, de-linearizing the strokes where possible.
Definition: lwstroke.c:1271
uint32_t ngeoms
Definition: liblwgeom.h:580
GBOX * bbox
Definition: liblwgeom.h:574
LWGEOM ** geoms
Definition: liblwgeom.h:575

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: