3125 if (PG_NARGS() > 0 && !PG_ARGISNULL(0))
3127 geom_in = PG_GETARG_GSERIALIZED_P(0);
3134 if (PG_NARGS() > 1 && !PG_ARGISNULL(1))
3135 min = PG_GETARG_FLOAT8(1);
3140 if (PG_NARGS() > 2 && !PG_ARGISNULL(2))
3141 max = PG_GETARG_FLOAT8(2);
3146 if (PG_NARGS() > 3 && !PG_ARGISNULL(3) && PG_GETARG_BOOL(3))
3155 elog(ERROR,
"Min-value cannot be larger than Max value\n");
3165 elog(NOTICE,
"No M-value, No vertex removed\n");
3166 PG_RETURN_POINTER(geom_in);
3173 PG_RETURN_POINTER(geom_out);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_filter_m(LWGEOM *geom, double min, double max, int returnm)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)