113 double from = PG_GETARG_FLOAT8(1);
114 double to = PG_GETARG_FLOAT8(2);
115 double offset = PG_GETARG_FLOAT8(3);
118 static char ordinate =
'M';
122 elog(ERROR,
"This function only accepts geometries that have an M dimension.");
129 PG_RETURN_DATUM(DirectFunctionCall3(
ST_LocateAlong, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PG_GETARG_DATUM(3)));
135 PG_FREE_IF_COPY(geom_in, 0);
139 elog(ERROR,
"lwline_clip_to_ordinate_range returned null");
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_has_m(const GSERIALIZED *gser)
Check if a GSERIALIZED has an M ordinate.
void lwgeom_free(LWGEOM *geom)
Datum ST_LocateAlong(PG_FUNCTION_ARGS)
LWCOLLECTION * lwgeom_clip_to_ordinate_range(const LWGEOM *lwin, char ordinate, double from, double to, double offset)
Given a geometry clip based on the from/to range of one of its ordinates (x, y, z, m).
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)