ST_Evaluate
Name
ST_Evaluate — Evaluates a NURBS curve at a specific parameter value and returns the resulting point.
Synopsis
geometry
ST_Evaluate
(
geometry
nurbscurve
, float8
parameter
)
;
Description
Evaluates a NURBS curve at the specified parameter value and returns a POINT geometry representing the position on the curve. The parameter typically ranges from 0.0 (start of curve) to 1.0 (end of curve), though the actual range depends on the knot vector.
Raises an error if the input is not a NURBS curve or if evaluation fails. Returns NULL if either input is NULL.
Availability: 3.7.0
Examples
This example returns the midpoint of a NURBS curve.
SELECT ST_Evaluate('NURBSCURVE(2, (0 0, 5 10, 10 0))'::geometry, 0.5);
This example samples multiple points along a curve.
SELECT t, ST_Evaluate(curve, t) AS point
FROM (SELECT 'NURBSCURVE(2, (0 0, 5 10, 10 0))'::geometry AS curve) AS c,
generate_series(0, 1, 0.25) AS t;