Skip to content
πŸŽ‰ Apache Sedona 1.9.1 is out now! πŸ—ΊοΈ Geography SQL functions, Box2D & Box3D types, raster Python UDFs & more. Read the release notes β†’

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.3.0

Example:

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

Output:

POINT (1 1)

Example:

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

Output:

POINT M(1 1 1)

Example:

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

Output:

POINT ZM(1 1 1 1)