ST_GeogFromWKB

更新时间:
复制 MD 格式

Constructs a geography instance from a Well-Known Binary (WKB) or Extended Well-Known Binary (EWKB) byte sequence.

Syntax

geography ST_GeogFromWKB(bytea wkb);

Parameters

ParameterDescription
wkbThe WKB or EWKB byte sequence to convert.

Usage notes

  • If the input does not include a spatial reference identifier (SRID), the default SRID 4326 is used.

  • This function supports circular strings and curves.

Examples

Convert a WKB byte sequence to a geography instance and return its well-known text (WKT) representation:

SELECT ST_AsText(ST_GeogFromWKB(E'\\x01010000000000000000005d400000000000004440'));

Output:

   st_astext
---------------
 POINT(116 40)
(1 row)