Geospatial functions
ST_ASTEXT
Reference material for ST_ASTEXT function
Converts shapes of the GEOGRAPHY
data type to the Well-Known Text (WKT) format.
Syntax
Parameters
Parameter | Description | Supported input types |
---|---|---|
<object> | The GEOGRAPHY object to convert to WKT format. | GEOGRAPHY |
Return Type
ST_ASTEXT
returns a value of type TEXT
.
Example
The following code example creates a GEOGRAPHY
object from the WKT representation of a Point at specified longitude and latitude coordinates and converts it to WKT format:
Returns
result (TEXT) |
---|
‘POINT(-73.98551041593687 40.75793403395676)’ |