Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 726 Bytes

File metadata and controls

30 lines (20 loc) · 726 Bytes

ST_LineFromText, ST_LineStringFromText

功能

将一个 WKT(Well Known Text)转化为一个 Line 形式的内存表现形式。

语法

ST_LineFromText(wkt)

参数说明

wkt: 待转化的 WKT,支持的数据类型为 VARCHAR。

返回值说明

返回值的数据类型为 GEOMETRY。

示例

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