All Products
Search
Document Center

PolarDB:ST_GeomFromEWKB

Last Updated:Mar 28, 2026

Constructs a geometry object from an Extended Well-Known Binary (EWKB) representation.

Syntax

geometry ST_GeomFromEWKB(bytea eWKB);

Parameters

ParameterDescription
eWKBThe EWKB-encoded binary representation of the geometry.

Description

ST_GeomFromEWKB supports the following geometry types: circular strings, curves, polyhedral surfaces, triangles, triangulated irregular network (TIN) surfaces, and 3D objects.

Examples

The following examples parse the same EWKB value to retrieve the geometry in different formats.

Get the WKT representation:

SELECT ST_AsText(ST_GeomFromEWKB(E'\\x0101000020e61000000000000000005d400000000000004440'));
   st_astext
---------------
 POINT(116 40)
(1 row)

Get the spatial reference identifier (SRID):

SELECT ST_SRID(ST_GeomFromEWKB(E'\\x0101000020e61000000000000000005d400000000000004440'));
 st_srid
---------
    4326
(1 row)