Skip to main content
Converts a native spatial value or a legacy encoded shape to Well-Known Text (WKT). ST_AsWKT is an alias of ST_AsText.

Syntax

Native overloads

For native GEOMETRY and GEOGRAPHY, the function preserves all seven OGC geometry families, EMPTY, and empty children. A NULL input returns NULL. The serializer does not change the input CRS or coordinates.

Legacy overloads

These overloads accept encoded shapes from legacy constructors such as ST_Point.

Examples

Native examples

Legacy example

Text

keyword

ST_ASTEXT, ST_ASWKT, ST, ASTEXT, ASWKT GEOGRAPHY, GEOMETRY, VARCHAR