Definition at line 1667 of file lwgeom.c.
1675 return geometry_modified;
1679 uint32_t npoints = pa->
npoints;
1681 geometry_modified = npoints != pa->
npoints;
1693 for (uint32_t i = 0; i < g->
nrings; i++)
1696 uint32_t npoints = pa->
npoints;
1698 geometry_modified |= npoints != pa->
npoints;
1713 double tolsq = tolerance * tolerance;
1716 for (uint8_t dim = 0; dim < 2; dim++)
1720 for (uint32_t i = 0; i < mpt->
ngeoms; i++)
1729 for (uint32_t j = i + 1; j < mpt->
ngeoms; j++)
1738 if ((dim ? ptj->
x - pti->
x : ptj->
y - pti->
y) > tolerance)
1745 mpt->
geoms[j] = NULL;
1752 for (uint32_t j = 0; j < mpt->
ngeoms; j++)
1757 mpt->
geoms[j] = NULL;
1764 for (uint32_t j = 0; j < mpt->
ngeoms; j++)
1775 return geometry_modified;
1790 for (i = 0; i < col->
ngeoms; i++)
1802 col->
geoms[j++] = g;
1814 if (geometry_modified)
1816 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)
#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)
int lwpoint_is_empty(const LWPOINT *point)
static int cmp_point_x(const void *pa, const void *pb)
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.
static int cmp_point_y(const void *pa, const void *pb)
void lwgeom_free(LWGEOM *lwgeom)
void void lwerror(const char *fmt,...) __attribute__((format(printf
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, cmp_point_x(), cmp_point_y(), COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, distance2d_sqr_pt_pt(), LWMPOINT::geoms, LWCOLLECTION::geoms, getPoint2d_cp(), LINETYPE, LW_FALSE, LW_TRUE, lwerror(), lwgeom_drop_bbox(), lwgeom_free(), lwgeom_is_empty(), lwgeom_remove_repeated_points_in_place(), lwpoint_free(), lwpoint_is_empty(), lwtype_name(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, LWMPOINT::ngeoms, LWCOLLECTION::ngeoms, POINTARRAY::npoints, LWPOLY::nrings, LWPOINT::point, LWLINE::points, POINTTYPE, POLYGONTYPE, ptarray_free(), ptarray_remove_repeated_points_in_place(), LWPOLY::rings, TINTYPE, TRIANGLETYPE, LWGEOM::type, POINT2D::x, and POINT2D::y.
Referenced by lwgeom_remove_repeated_points(), lwgeom_remove_repeated_points_in_place(), mvt_geom(), ST_RemoveRepeatedPoints(), and test_lwgeom_remove_repeated_points().