ST_PointFromWKB

更新时间:
复制 MD 格式

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

Syntax

geometry ST_GeomFromWKB(bytea geom);
geometry ST_GeomFromWKB(bytea geom, integer srid);

Parameters

ParameterDescription
geomThe WKB string that you want to specify.
sridThe spatial reference identifier (SRID) to assign to the point geometry. Defaults to 0 if omitted.

Usage notes

  • If geom does not represent a point geometry, the function returns NULL.

  • Supports 3D geometries. The Z coordinate of the input is preserved in the returned geometry.

  • Supports circular strings and curves.

Examples

SELECT ST_AsEWKT(ST_GeomFromWKB(E'\\x01010000000000000000c05d400000000000004440'));

Output:

   st_asewkt
---------------
 POINT(119 40)
(1 row)