PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwgeom_simplify()

LWGEOM* lwgeom_simplify ( const LWGEOM igeom,
double  dist,
int  preserve_collapsed 

Definition at line 1857 of file lwgeom.c.

1858 {
1859  LWGEOM *lwgeom_out = lwgeom_clone_deep(igeom);
1860  lwgeom_simplify_in_place(lwgeom_out, dist, preserve_collapsed);
1861  if (lwgeom_is_empty(lwgeom_out))
1862  {
1863  lwgeom_free(lwgeom_out);
1864  return NULL;
1865  }
1866  return lwgeom_out;
1867 }
void lwgeom_simplify_in_place(LWGEOM *geom, double epsilon, int preserve_collapsed)
Definition: lwgeom.c:1750
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep-clone an LWGEOM object.
Definition: lwgeom.c:520
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:1393
void lwgeom_free(LWGEOM *lwgeom)
Definition: lwgeom.c:1144

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().

Here is the call graph for this function:
Here is the caller graph for this function: