Definition at line 1554 of file lwgeom.c.
1562 return geometry_modified;
1567 uint32_t npoints = pa->
npoints;
1569 geometry_modified = npoints != pa->
npoints;
1583 for (i = 0; i < g->
nrings; i++)
1587 uint32_t npoints = 0;
1593 geometry_modified |= npoints != pa->
npoints;
1609 static uint32_t out_stack_size = 32;
1610 double tolsq = tolerance*tolerance;
1611 uint32_t i, j, n = 0;
1614 LWPOINT *out_stack[out_stack_size];
1615 int use_heap = (mpt->
ngeoms > out_stack_size);
1619 return geometry_modified;
1630 for (i = 0; i < mpt->
ngeoms; i++)
1635 for (j = 0; j < n; j++)
1656 geometry_modified = mpt->
ngeoms != n;
1658 if (use_heap)
lwfree(out);
1664 return geometry_modified;
1680 for (i = 0; i < col->
ngeoms; i++)
1691 col->
geoms[j++] = g;
1704 if (geometry_modified)
1708 return geometry_modified;
void lwpoint_free(LWPOINT *pt)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void ptarray_free(POINTARRAY *pa)
void * lwalloc(size_t size)
#define LW_TRUE
Return types for functions with status returns.
void ptarray_remove_repeated_points_in_place(POINTARRAY *pa, double tolerance, uint32_t min_points)
void ptarray_copy_point(POINTARRAY *pa, uint32_t from, uint32_t to)
int lwgeom_remove_repeated_points_in_place(LWGEOM *geom, double tolerance)
void lwgeom_drop_bbox(LWGEOM *lwgeom)
Call this function to drop BBOX and SRID from LWGEOM.
void lwgeom_free(LWGEOM *lwgeom)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
static double distance2d_sqr_pt_pt(const POINT2D *p1, const POINT2D *p2)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, distance2d_sqr_pt_pt(), LWMPOINT::geoms, LWCOLLECTION::geoms, getPoint2d_cp(), LINETYPE, LW_FALSE, LW_TRUE, lwalloc(), lwerror(), lwfree(), lwgeom_drop_bbox(), lwgeom_free(), lwgeom_is_empty(), lwgeom_remove_repeated_points_in_place(), lwpoint_free(), lwtype_name(), POINTARRAY::maxpoints, MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, LWMPOINT::ngeoms, LWCOLLECTION::ngeoms, POINTARRAY::npoints, LWPOLY::nrings, LWPOINT::point, LWLINE::points, POINTTYPE, POLYGONTYPE, ptarray_copy_point(), ptarray_free(), ptarray_remove_repeated_points_in_place(), LWPOLY::rings, TINTYPE, TRIANGLETYPE, and LWGEOM::type.
Referenced by lwgeom_remove_repeated_points(), lwgeom_remove_repeated_points_in_place(), mvt_geom(), ST_RemoveRepeatedPoints(), and test_lwgeom_remove_repeated_points().