ST_Knots — Returns the knot vector of a NURBS curve.
float8[] ST_Knots(geometry nurbscurve);
Returns the knot vector of a NURBS curve as an array of double precision values. The knot vector defines the parameter space and controls where and how the control points affect the curve. It must be a non-decreasing sequence with length equal to (number of control points + degree + 1).
Returns NULL if the curve uses the default uniform clamped knot vector or if the input is NULL. Raises an error if the input is not a NURBS curve.
Availability: 3.7.0
This example returns knots from a NURBS curve with a custom knot vector.
SELECT ST_Knots(ST_MakeNurbsCurve(
2,
'LINESTRING(0 0, 5 10, 10 0)'::geometry,
ARRAY[1.0, 2.0, 1.0],
ARRAY[0,0,0,1,1,1]));
{0,0,0,1,1,1}
This example checks the knots of a curve using the default knot vector.
SELECT ST_Knots('NURBSCURVE(2, (0 0, 5 10, 10 0))'::geometry);
null