Constructs a geometry object from a Well-Known Binary (WKB) representation.
Syntax
geometry ST_WKBToSQL(bytea WKB);Parameters
| Parameter | Type | Description |
|---|---|---|
WKB | bytea | The WKB representation of the geometry to construct. |
Description
ST_WKBToSQL builds a geometry object from a WKB byte string. It is equivalent to ST_GeomFromWKB, except it does not accept a spatial reference identifier (SRID) parameter.
Examples
SELECT ST_AsText(ST_WKBToSQL(E'\\x01010000000000000000005d400000000000004440'));Output:
st_astext
---------------
POINT(116 40)
(1 row)What's next
ST_GeomFromWKB: Constructs a geometry from WKB with an optional SRID parameter.
ST_WKTToSQL: Constructs a geometry from a Well-Known Text (WKT) representation.
ST_GeomFromEWKB: Constructs a geometry from an Extended Well-Known Binary (EWKB) representation.
该文章对您有帮助吗?