ST_WKBToSQL

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

Syntax

ST_WKBToSQL(wkbgeo[, srid]);
wkb
The input geometry, in WKB representation.

Type: VARBINARY(ANY)

srid
The spatial reference identifier.

Type: INT4

Default: 4326

Returns

A value of type VARCHAR(ANY) that contains the output geometry.

Examples

SELECT inza..ST_AsText(inza..ST_WKBToSQL(inza..ST_AsBinary(inza..ST_WKT ToSQL('
         POLYGON ((0 0, 11 0, 11 11, 0 11, 0 0))'))));
 
ST_ASTEXT
---------
POLYGON ((0 0, 11 0, 11 11, 0 11, 0 0))
(1 row)

SELECT inza..ST_AsText(inza..ST_WKBToSQL(inza..ST_AsBinary(inza..ST_WKT ToSQL('
        LINESTRING(0 0, 3 4, -1 1)'))));
 
ST_ASTEXT
---------
LINESTRING (0 0, 3 4, -1 1)
(1 row)

SELECT inza..ST_AsText(inza..ST_WKBToSQL(inza..ST_AsBinary(inza..ST_Point(1, 5))));
 
ST_ASTEXT
-----------
POINT (1 5)
(1 row)