ST_WKBtoWKT function

The WKBtoWKT function takes a well-known-binary (WKB) format of a geography and returns the corresponding geometry in a well-known-text (WKT) format.

If the specified WKB format is null, then null is returned.

The ST_WKTtoWKB function gives the same result as ST_AsBinary(ST_GeomFromText()).

Syntax

Read syntax diagramSkip visual syntax diagram ST_WKBtoWKT ( geometry ,srs_id )

Parameter

geometry
A value of type VARBINARY or BLOB(2G) that contains the WKB format of the geometry to be converted.
srs_id
A value of type INTEGER that uniquely identifies the spatial reference system. The default value for the srs_id is 4326.

Return type

Returns a type CLOB(2G) that contains the WKT format of a geometry object.