Skip to main content

ST_LINEFROMTEXT,ST_LINESTRINGFROMTEXT

Description​

Converts a WKT (Well Known Text) to a memory representation in the form of a Line

Syntax​

ST_LineFromText( <wkt>)

Parameters​

ParametersInstructions
<wkt>A line segment consisting of two coordinates

Return Value​

The memory form of a line segment.

Examples​

SELECT ST_AsText(ST_LineFromText("LINESTRING (1 1, 2 2)"));
+---------------------------------------------------------+
| st_astext(st_geometryfromtext('LINESTRING (1 1, 2 2)')) |
+---------------------------------------------------------+
| LINESTRING (1 1, 2 2) |
+---------------------------------------------------------+