ST_WKBToSQL

更新时间:
复制 MD 格式

Constructs a geometry object from a Well-Known Binary (WKB) representation.

Syntax

geometry ST_WKBToSQL(bytea WKB);

Parameters

ParameterTypeDescription
WKBbyteaThe 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.