ST_ToLineString() method

Converts the geometry to a linestring.

Syntax

geometry-expression.ST_ToLineString()

Returns

ST_LineString If the geometry-expression is of type ST_LineString, return the geometry-expression. If the geometry-expression is of type ST_CircularString or ST_CompoundCurve, return geometry-expression.ST_CurveToLine(). If the geometry-expression is a geometry collection with a single element of type ST_Curve, return that element cast as ST_LineString. If the geometry-expression is the empty set, return an empty set of type ST_LineString. Otherwise, raise an exception condition.

Examples

Standards

SQL/MM (ISO/IEC 13249-3: 2006) 5.1.33