- Categories:
ST_ASEWKT¶
Given a value of type GEOGRAPHY or GEOMETRY, return the text (VARCHAR) representation of that value in EWKT (extended well-known text) format.
- See also:
Syntax¶
Arguments¶
geography_or_geometry_expressionThe argument must be an expression of type GEOGRAPHY or GEOMETRY.
Returns¶
A VARCHAR.
Usage notes¶
For GEOGRAPHY objects, the SRID in the return value is always 4326. See the note on EWKT handling.
To return the output in WKT format, use ST_ASWKT instead.
Examples¶
GEOGRAPHY examples¶
The following example demonstrates the ST_ASEWKT function:
GEOMETRY examples¶
The example below demonstrates how to use the ST_ASEWKT function. The example returns the EWKT representations of two geometries that have different SRIDs.