PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwcollection_remove_repeated_points()

LWGEOM* lwcollection_remove_repeated_points ( const LWCOLLECTION in,
double  tolerance 
)

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

461 {
462  uint32_t i;
463  LWGEOM **newgeoms;
464 
465  newgeoms = lwalloc(sizeof(LWGEOM *)*coll->ngeoms);
466  for (i=0; i<coll->ngeoms; i++)
467  {
468  newgeoms[i] = lwgeom_remove_repeated_points(coll->geoms[i], tolerance);
469  }
470 
471  return (LWGEOM*)lwcollection_construct(coll->type,
472  coll->srid, coll->bbox ? gbox_copy(coll->bbox) : NULL,
473  coll->ngeoms, newgeoms);
474 }
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
Definition: g_box.c:438
unsigned int uint32_t
Definition: uthash.h:78
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
Definition: lwcollection.c:43
LWGEOM * lwgeom_remove_repeated_points(const LWGEOM *in, double tolerance)
Remove repeated points!
Definition: lwgeom.c:1456
void * lwalloc(size_t size)
Definition: lwutil.c:229
Here is the call graph for this function:
Here is the caller graph for this function: