1824{
1827 {
1828
1830 return modified;
1832 {
1833 if (preserve_collapsed)
1834 return modified;
1839 {
1842 }
1843 break;
1844 }
1846 {
1849 uint32_t in_npoints = pa->
npoints;
1851 modified = in_npoints != pa->
npoints;
1852
1854 {
1855
1856 if (preserve_collapsed)
1857 {
1860 }
1861
1862 else
1863 {
1865 }
1866 }
1867
1868 if (pa->
npoints == 2 && !preserve_collapsed)
1869 {
1872 }
1873 break;
1874 }
1876 {
1877 uint32_t i, j = 0;
1879 for (i = 0; i < g->
nrings; i++)
1880 {
1882
1883 int minpoints = (preserve_collapsed && i == 0) ? 4 : 0;
1884
1885 if(!pa)
1886 continue;
1887 uint32_t in_npoints = pa->
npoints;
1889 modified |= in_npoints != pa->
npoints;
1890
1892 {
1893 if (i == 0)
1894 {
1895
1896 for (i = 0; i < g->
nrings; i++)
1897 {
1900 }
1901 break;
1902 }
1903 else
1904 {
1905
1907 continue;
1908 }
1909 }
1911 }
1912
1914 break;
1915 }
1916
1922 {
1923 uint32_t i, j = 0;
1925 for (i = 0; i < col->
ngeoms; i++)
1926 {
1928 if (!g) continue;
1930
1932 {
1934 continue;
1935 }
1936 col->
geoms[j++] = g;
1937 }
1938
1940 break;
1941 }
1942 default:
1943 {
1945 break;
1946 }
1947 }
1948
1949 if (modified)
1950 {
1952 }
1953 return modified;
1954}
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 void lwerror(const char *fmt,...) __attribute__((format(printf
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.