Name

ST_Degree — Returns the polynomial degree of a NURBS curve.

Übersicht

integer ST_Degree(geometry nurbscurve);

Beschreibung

Returns the polynomial degree of a NURBS curve as an integer. The degree determines the curve's smoothness and flexibility. Higher degrees produce smoother curves but require more control points.

The function raises an error if the input is not a NURBS curve. Returns NULL if the input is NULL.

Availability: 3.7.0

Beispiele

This example returns the degree of a NURBS curve.

Code
SELECT ST_Degree('NURBSCURVE(2, (0 0, 5 10, 10 0))'::geometry);
Ausgabe von Rastern
2
Figure
Geometry figure for visual-st-degree-01

This example checks whether a NURBS curve is cubic.

Code
SELECT ST_Degree('NURBSCURVE(3, (0 0, 2 5, 5 8, 10 0))'::geometry) = 3;
Ausgabe von Rastern
t
Figure
Geometry figure for visual-st-degree-02