1716{
1719 {
1720
1722 return modified;
1724 {
1725 if (preserve_collapsed)
1726 return modified;
1731 {
1734 }
1735 break;
1736 }
1738 {
1741 uint32_t in_npoints = pa->
npoints;
1743 modified = in_npoints != pa->
npoints;
1744
1746 {
1747
1748 if (preserve_collapsed)
1749 {
1752 }
1753
1754 else
1755 {
1757 }
1758 }
1759
1760 if (pa->
npoints == 2 && !preserve_collapsed)
1761 {
1764 }
1765 break;
1766 }
1768 {
1769 uint32_t i, j = 0;
1771 for (i = 0; i < g->
nrings; i++)
1772 {
1774
1775 int minpoints = (preserve_collapsed && i == 0) ? 4 : 0;
1776
1777 if(!pa)
1778 continue;
1779 uint32_t in_npoints = pa->
npoints;
1781 modified |= in_npoints != pa->
npoints;
1782
1784 {
1785 if (i == 0)
1786 {
1787
1788 for (i = 0; i < g->
nrings; i++)
1789 {
1792 }
1793 break;
1794 }
1795 else
1796 {
1797
1799 continue;
1800 }
1801 }
1803 }
1804
1806 break;
1807 }
1808
1814 {
1815 uint32_t i, j = 0;
1817 for (i = 0; i < col->
ngeoms; i++)
1818 {
1820 if (!g) continue;
1822
1824 {
1826 continue;
1827 }
1828 col->
geoms[j++] = g;
1829 }
1830
1832 break;
1833 }
1834 default:
1835 {
1837 break;
1838 }
1839 }
1840
1841 if (modified)
1842 {
1844 }
1845 return modified;
1846}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
void ptarray_free(POINTARRAY *pa)
#define LW_TRUE
Return types for functions with status returns.
void ptarray_simplify_in_place(POINTARRAY *pa, double tolerance, uint32_t minpts)
void ptarray_copy_point(POINTARRAY *pa, uint32_t from, uint32_t to)
int p2d_same(const POINT2D *p1, const POINT2D *p2)
void lwgeom_drop_bbox(LWGEOM *lwgeom)
Call this function to drop BBOX and SRID from LWGEOM.
LWTRIANGLE * lwgeom_as_lwtriangle(const LWGEOM *lwgeom)
void lwgeom_free(LWGEOM *lwgeom)
int lwgeom_simplify_in_place(LWGEOM *geom, double epsilon, int preserve_collapsed)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.