Skip to content

Parses a WKB(well-known-binary) or EWKB(extended well-known-binary) input and returns a value of type GEOMETRY.

ST_GEOMETRYFROMWKB(<string>, [<srid>])
ST_GEOMETRYFROMWKB(<binary>, [<srid>])
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.
<srid>The integer value of the SRID to use.

Geometry.

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