Поделиться через


st_geogfromwkb function

Applies to: check marked yes Databricks Runtime 17.1 LTS and above

Important

This feature is in Public Preview.

Parses the WKB, description of a geography and returns the corresponding GEOGRAPHY value. The SRID value of the returned GEOGRAPHY value is 4326.

Syntax

st_geogfromwkb ( wkbExpr )

Arguments

  • wkbExpr: A BINARY value, representing a geography in WKB format.

Returns

A value of type GEOGRAPHY(4326), corresponding to the input WKB description.

The function returns NULL if the input is NULL.

Error conditions

Examples

-- The input WKB is in little-endian format.
> SELECT st_astext(st_geogfromtext(X'01D1070000000000000000244000000000000041400000000000003740'))
  POINT M (10 34 23)

-- The input WKB is in big-endian format.
> SELECT st_astext(st_geogfromtext(X'00000007D1402400000000000040410000000000004037000000000000'));
  POINT M (10 34 23)