📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ST_GEOGRAPHYFROMWKB



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.

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) │ └────────────────────┘

Was this page helpful?