ST_GEOGRAPHYFROMWKB
Introduced or updated: v1.2.395
Parses a WKB(well-known-binary) or EWKB(extended well-known-binary) input and returns a value of type GEOGRAPHY.
Syntax
ST_GEOGRAPHYFROMWKB(<string>)
ST_GEOGRAPHYFROMWKB(<binary>)
Aliases
Arguments
| Arguments | Description |
|---|---|
<string> | The argument must be a string expression in WKB or EWKB in hexadecimal format. |
<binary> | The argument must be a binary expression in WKB or EWKB format. |
note
Only SRID 4326 is supported for GEOGRAPHY inputs.
Return Type
Geography.
Examples
SELECT
ST_ASWKT(
ST_GEOGRAPHYFROMWKB(
'0101000020E6100000000000000000F03F0000000000000040'
)
) AS pipeline_geography;
┌────────────────────┐
│ pipeline_geography │
├────────────────────┤
│ POINT(1 2) │
└────────────────────┘
SELECT
ST_ASWKT(
ST_GEOGRAPHYFROMWKB(
FROM_HEX('0101000000000000000000F03F0000000000000040')
)
) AS pipeline_geography;
┌────────────────────┐
│ pipeline_geography │
├────────────────────┤
│ POINT(1 2) │
└────────────────────┘