All Products
Search
Document Center

Lindorm:Output functions

Last Updated:Oct 18, 2024

This topic describes the ST_AsText function.

Applicable engines and versions

The ST_AsText function is applicable only to all versions of LindormTable.

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.

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