PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwcollection_remove_repeated_points()

LWGEOM* lwcollection_remove_repeated_points ( LWCOLLECTION coll,
double  tolerance 

Definition at line 440 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().

441 {
442  uint32_t i;
443  LWGEOM **newgeoms;
445  newgeoms = lwalloc(sizeof(LWGEOM *)*coll->ngeoms);
446  for (i=0; i<coll->ngeoms; i++)
447  {
448  newgeoms[i] = lwgeom_remove_repeated_points(coll->geoms[i], tolerance);
449  }
451  return (LWGEOM*)lwcollection_construct(coll->type,
452  coll->srid, coll->bbox ? gbox_copy(coll->bbox) : NULL,
453  coll->ngeoms, newgeoms);
454 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: g_box.c:403
uint8_t type
Definition: liblwgeom.h:487
GBOX * bbox
Definition: liblwgeom.h:489
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:30
LWGEOM * lwgeom_remove_repeated_points(LWGEOM *in, double tolerance)
Remove repeated points!
Definition: lwgeom.c:1407
LWGEOM ** geoms
Definition: liblwgeom.h:493
int32_t srid
Definition: liblwgeom.h:490
void * lwalloc(size_t size)
Definition: lwutil.c:199
Here is the call graph for this function:
Here is the caller graph for this function: