ST_ControlPoints
Name
ST_ControlPoints — Returns the control points of a NURBS curve as a MULTIPOINT geometry.
Synopsis
geometry
ST_ControlPoints
(
geometry
nurbscurve
)
;
Description
Extracts the control points from a NURBS curve and returns them as a MULTIPOINT geometry. Control points define the control polygon that influences the shape of the NURBS curve.
The function raises an error if the input is not a NURBS curve. Returns NULL if the input is NULL.
Availability: 3.7.0
Examples
This example extracts control points from a NURBS curve.
Code
SELECT ST_ControlPoints('NURBSCURVE(2, (0 0, 5 10, 10 0))'::geometry);
Output
MULTIPOINT((0 0),(5 10),(10 0))
This example counts the control points.
Code
SELECT ST_NPoints(ST_ControlPoints('NURBSCURVE(2, (0 0, 5 10, 10 0))'::geometry));
Output
3