ST_GEOMETRYFROMWKB (Lakehouse v1)
Parses a WKB(well-known-binary) or EWKB(extended well-known-binary) input and returns a value of type GEOMETRY.
SQL Syntax
Section titled “SQL Syntax”ST_GEOMETRYFROMWKB(<string>, [<srid>])ST_GEOMETRYFROMWKB(<binary>, [<srid>])Aliases
Section titled “Aliases”Arguments
Section titled “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. |
<srid> | The integer value of the SRID to use. |
Return Type
Section titled “Return Type”Geometry.
SQL Examples
Section titled “SQL Examples”SELECT ST_GEOMETRYFROMWKB( '0101000020797f000066666666a9cb17411f85ebc19e325641' ) AS pipeline_geometry;
┌────────────────────────────────────────┐│ pipeline_geometry │├────────────────────────────────────────┤│ SRID=32633;POINT(389866.35 5819003.03) │└────────────────────────────────────────┘
SELECT ST_GEOMETRYFROMWKB( FROM_HEX('0101000020797f000066666666a9cb17411f85ebc19e325641'), 4326 ) AS pipeline_geometry;
┌───────────────────────────────────────┐│ pipeline_geometry │├───────────────────────────────────────┤│ SRID=4326;POINT(389866.35 5819003.03) │└───────────────────────────────────────┘