Skip to main content

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

ArgumentsDescription
<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)
└────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today