PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWGEOM* lwcollection_remove_repeated_points ( LWCOLLECTION coll)

Definition at line 430 of file lwcollection.c.

References LWCOLLECTION::bbox, gbox_copy(), LWCOLLECTION::geoms, lwalloc(), lwcollection_construct(), lwgeom_remove_repeated_points(), LWCOLLECTION::ngeoms, LWCOLLECTION::srid, and LWCOLLECTION::type.

Referenced by lwgeom_remove_repeated_points().

431 {
432  uint32_t i;
433  LWGEOM **newgeoms;
435  newgeoms = lwalloc(sizeof(LWGEOM *)*coll->ngeoms);
436  for (i=0; i<coll->ngeoms; i++)
437  {
438  newgeoms[i] = lwgeom_remove_repeated_points(coll->geoms[i]);
439  }
441  return (LWGEOM*)lwcollection_construct(coll->type,
442  coll->srid, coll->bbox ? gbox_copy(coll->bbox) : NULL,
443  coll->ngeoms, newgeoms);
444 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: g_box.c:362
uint8_t type
Definition: liblwgeom.h:459
GBOX * bbox
Definition: liblwgeom.h:461
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:30
LWGEOM ** geoms
Definition: liblwgeom.h:465
int32_t srid
Definition: liblwgeom.h:462
void * lwalloc(size_t size)
Definition: lwutil.c:175
LWGEOM * lwgeom_remove_repeated_points(LWGEOM *in)
Remove repeated points!
Definition: lwgeom.c:1339

Here is the call graph for this function:

Here is the caller graph for this function: