ST_AsText — Return the Well-Known Text (WKT) representation of the geometry without SRID metadata.
text ST_AsText(
geometry g1)
;
Returns the Well-Known Text representation of the geometry.
The WKT spec does not include the SRID. To get the SRID as part of the data, use the non-standard PostGIS ST_AsEWKT |
WKT format does not maintain precision so to prevent floating truncation, use ST_AsBinary or ST_AsEWKB format for transport.
ST_AsText is the reverse of ST_GeomFromText. Use ST_GeomFromText to convert to a postgis geometry from ST_AsText representation. |
This method implements the OpenGIS Simple Features Implementation Specification for SQL. OGC SPEC s2.1.1.1
This method implements the SQL/MM specification: SQL-MM 3: 5.1.25
This method supports Circular Strings and Curves
SELECT ST_AsText('01030000000100000005000000000000000000 000000000000000000000000000000000000000000000000 F03F000000000000F03F000000000000F03F000000000000F03 F000000000000000000000000000000000000000000000000'); st_astext -------------------------------- POLYGON((0 0,0 1,1 1,1 0,0 0)) (1 row)