Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

ST_AsText

Introduction: Return the Well-Known Text string representation of a geometry. It will support M coordinate if present since v1.5.0.

Format: ST_AsText (A: Geometry)

Return type: String

Since: v1.0.0

SQL Example

SELECT ST_AsText(ST_SetSRID(ST_Point(1.0,1.0), 3021))

Output:

POINT (1 1)

SQL Example

SELECT ST_AsText(ST_MakePointM(1.0, 1.0, 1.0))

Output:

POINT M(1 1 1)

SQL Example

SELECT ST_AsText(ST_MakePoint(1.0, 1.0, 1.0, 1.0))

Output:

POINT ZM(1 1 1 1)