59{
60 GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P_COPY(0);
61 double dist = PG_GETARG_FLOAT8(1);
65 bool preserve_collapsed = false;
67
68
70 PG_RETURN_POINTER(geom);
71
72
73 if ((PG_NARGS() > 2) && (!PG_ARGISNULL(2)))
74 preserve_collapsed = PG_GETARG_BOOL(2);
75
77
79 if (!modified)
80 PG_RETURN_POINTER(geom);
81
83 PG_RETURN_NULL();
84
85 result = geometry_serialize(in);
87}
char result[OUT_DOUBLE_BUFFER_SIZE]
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)