Skip to main content

ST_LINEFROMTEXT

Description

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

Alias

  • ST_LINESTRINGFROMTEXT

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) |
+---------------------------------------------------------+