ST_WKBToSQL
Create a geometry that corresponds to a Well-Known Binary (WKB) geometry.
Syntax
ST_WKBToSQL(wkbgeo[, srid[, computeMBR[, skiptest]]]);
- wkb
- The input geometry, in WKB representation.
Type: VARCHAR(ANY)
- srid
- The Spatial Reference System Identifier. Type:
Type: INT4
Default: 4326
- computeMBR
- Whether the MBR should be computed.
Type: BOOL
Default: TRUE
- skiptest
- Whether the simple geometry test should be skipped.
Type: BOOL
Default: FALSE
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)