PostGIS  2.3.7dev-r@@SVN_REVISION@@
LWGEOM* lwcollection_remove_repeated_points ( const LWCOLLECTION coll,
double  tolerance 
)

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

454 {
455  uint32_t i;
456  LWGEOM **newgeoms;
457 
458  newgeoms = lwalloc(sizeof(LWGEOM *)*coll->ngeoms);
459  for (i=0; i<coll->ngeoms; i++)
460  {
461  newgeoms[i] = lwgeom_remove_repeated_points(coll->geoms[i], tolerance);
462  }
463 
464  return (LWGEOM*)lwcollection_construct(coll->type,
465  coll->srid, coll->bbox ? gbox_copy(coll->bbox) : NULL,
466  coll->ngeoms, newgeoms);
467 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: g_box.c:438
uint8_t type
Definition: liblwgeom.h:502
GBOX * bbox
Definition: liblwgeom.h:504
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:43
LWGEOM ** geoms
Definition: liblwgeom.h:508
int32_t srid
Definition: liblwgeom.h:505
LWGEOM * lwgeom_remove_repeated_points(const LWGEOM *in, double tolerance)
Remove repeated points!
Definition: lwgeom.c:1420
void * lwalloc(size_t size)
Definition: lwutil.c:227

Here is the call graph for this function:

Here is the caller graph for this function: