ST_WKBToWKT

Create a Well-Known Text (WKT) geometry that corresponds to a Well-Known Binary (WKB) geometry.

This function does not return the SRID of the input geometry. ST_WKBToWKT does the reverse of ST_GeomFromText.

Syntax

ST_WKBToWKT(wkbgeo);
wkbgeo
The input geometry.

Type: VARCHAR(ANY)

Returns

A value of type VARCHAR(ANY) that contains the WKT representation of the input WKB geometry.

Examples

SELECT inza..ST_WKBToWKT(inza..ST_WKTToWKB('POLYGON((0 0, 1 2, 3 -1, 0 0))'));
 
ST_WKBTOWKT
-------------
POLYGON ((0 0, 1 2, 3 -1, 0 0))
(1 row)
SELECT inza..ST_WKBToWKT(inza..ST_WKTToWKB('POLYGON((0 0, 0 2, 1 4, 2 2, 2 0, 0 0))'));
 
ST_WKBTOWKT
-------------
POLYGON ((0 0, 0 2, 1 4, 2 2, 2 0, 0 0))
(1 row)