PostGIS  2.5.0dev-r@@SVN_REVISION@@
LWGEOM* lwgeom_simplify ( const LWGEOM igeom,
double  dist,
int  preserve_collapsed 

Definition at line 1835 of file lwgeom.c.

References lwgeom_clone_deep(), lwgeom_free(), lwgeom_is_empty(), and lwgeom_simplify_in_place().

Referenced by LWGEOM_simplify2d(), test_lwgeom_simplify(), and test_misc_simplify().

1836 {
1837  LWGEOM *lwgeom_out = lwgeom_clone_deep(igeom);
1838  lwgeom_simplify_in_place(lwgeom_out, dist, preserve_collapsed);
1839  if (lwgeom_is_empty(lwgeom_out))
1840  {
1841  lwgeom_free(lwgeom_out);
1842  return NULL;
1843  }
1844  return lwgeom_out;
1845 }
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep-clone an LWGEOM object.
Definition: lwgeom.c:513
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
Definition: lwgeom.c:1386
void lwgeom_simplify_in_place(LWGEOM *geom, double epsilon, int preserve_collapsed)
Definition: lwgeom.c:1741
void lwgeom_free(LWGEOM *lwgeom)
Definition: lwgeom.c:1137

Here is the call graph for this function:

Here is the caller graph for this function: