Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

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)

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)