ST_AsText — Returns the Well-known Text Representation of a geometric object
varchar ST_AsText(
bytea
Geometry)
;
Returns the Well-known Text Representation of a geometric object
ST_AsText is the reverse of ST_GeomFromText. |
2D | 3D | M |
---|---|---|
OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
---|---|---|---|
2.1.1.1 | 7.2.10.1 | 7.2.8.1 | 5.1.35 |
--The following example shows the use of the AsText function to extract the name and textual representation of Geometry of all countries whose names begin with the letter K. SELECT Name, AsText(Location) FROM Countries WHERE Name LIKE ‘K%’; SELECT ST_AsText('01010000A0E6640000000000000000F03F000000000000F03F000000000000F03F'); --Result POINT (1 1 1)