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 representation to use as input.
sridThe spatial reference identifier (SRID) of the point.

Usage notes

  • If srid is not specified, the SRID defaults to 0.

  • Returns NULL if the WKB does not represent a point geometry.

  • Supports 3D geometries and preserves the Z value of the constructed geometry object.

  • Supports circular strings and curves.

Examples

SELECT ST_AsEWKT(ST_GeomFromWKB(E'\\x01010000000000000000c05d400000000000004440'));
   st_asewkt
---------------
 POINT(119 40)
(1 row)