66 GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P_COPY(0);
67 double dist = PG_GETARG_FLOAT8(1);
71 bool preserve_collapsed =
false;
76 PG_RETURN_POINTER(geom);
79 if ((PG_NARGS() > 2) && (!PG_ARGISNULL(2)))
80 preserve_collapsed = PG_GETARG_BOOL(2);
86 PG_RETURN_POINTER(geom);
91 result = geometry_serialize(in);
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)