65{
66 GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P_COPY(0);
67 double dist = PG_GETARG_FLOAT8(1);
71 bool preserve_collapsed = false;
73
74
76 PG_RETURN_POINTER(geom);
77
78
79 if ((PG_NARGS() > 2) && (!PG_ARGISNULL(2)))
80 preserve_collapsed = PG_GETARG_BOOL(2);
81
83
85 if (!modified)
86 PG_RETURN_POINTER(geom);
87
89 PG_RETURN_NULL();
90
92 PG_RETURN_POINTER(result);
93}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
int lwgeom_simplify_in_place(LWGEOM *igeom, double dist, int preserve_collapsed)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)