1852{
1855 {
1856
1858 return modified;
1860 {
1861 if (preserve_collapsed)
1862 return modified;
1867 {
1870 }
1871 break;
1872 }
1874 {
1877 uint32_t in_npoints = pa->
npoints;
1879 modified = in_npoints != pa->
npoints;
1880
1882 {
1883
1884 if (preserve_collapsed)
1885 {
1888 }
1889
1890 else
1891 {
1893 }
1894 }
1895
1896 if (pa->
npoints == 2 && !preserve_collapsed)
1897 {
1900 }
1901 break;
1902 }
1904 {
1905 uint32_t i, j = 0;
1907 for (i = 0; i < g->
nrings; i++)
1908 {
1910
1911 int minpoints = (preserve_collapsed && i == 0) ? 4 : 0;
1912
1913 if(!pa)
1914 continue;
1915 uint32_t in_npoints = pa->
npoints;
1917 modified |= in_npoints != pa->
npoints;
1918
1920 {
1921 if (i == 0)
1922 {
1923
1924 for (i = 0; i < g->
nrings; i++)
1925 {
1928 }
1929 break;
1930 }
1931 else
1932 {
1933
1935 continue;
1936 }
1937 }
1939 }
1940
1942 break;
1943 }
1944
1950 {
1951 uint32_t i, j = 0;
1953 for (i = 0; i < col->
ngeoms; i++)
1954 {
1956 if (!g) continue;
1958
1960 {
1962 continue;
1963 }
1964 col->
geoms[j++] = g;
1965 }
1966
1968 break;
1969 }
1970 default:
1971 {
1973 break;
1974 }
1975 }
1976
1977 if (modified)
1978 {
1980 }
1981 return modified;
1982}
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.