The output functions of the Lindorm streaming engine can convert a geometry object to an object in a specified format, such as a structure object or a binary object. This topic describes the ST_AsText function that is used to convert a specified geometry object to a Well-known Text (WKT) object.
ST_AsText
This function returns the information about a geometry object in Well-known Text (WKT) format. The Spatial Reference IDentifier (SRID) of the geometry object is not returned.
Syntax
string ST_AsText(geometry g)Parameters
Parameter | Description |
g | The geometry object whose information you want to output. |
You can specify a geometry object of the following types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection.
By default, the returned results support DOUBLE values with up to 16 decimal places.
Examples
SELECT ST_AsText(ST_GeomFromText('POINT(111.1111111 1.1111111)')) AS text;The following result is returned:
+-------------------------------+
| text |
+-------------------------------+
| POINT (111.1111111 1.1111111) |
+-------------------------------+