3015{
3016 GSERIALIZED *g_in = PG_GETARG_GSERIALIZED_P_COPY(0);
3019 LWGEOM *lwgeom_in = NULL;
3020 double tolerance = 0.0;
3022
3023
3025 PG_RETURN_POINTER(g_in);
3026
3027 if (PG_NARGS() > 1 && !PG_ARGISNULL(1))
3028 tolerance = PG_GETARG_FLOAT8(1);
3029
3032 if (!modified)
3033 {
3034
3035 PG_RETURN_POINTER(g_in);
3036 }
3037
3038 g_out = geometry_serialize(lwgeom_in);
3039
3040 pfree(g_in);
3041 PG_RETURN_POINTER(g_out);
3042}
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_remove_repeated_points_in_place(LWGEOM *in, double tolerance)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.