This topic describes the ST_GeomFromEWKB function. This function constructs a geometry object by using an Extended Well-Known Binary (EWKB) string.

Syntax

geometry  ST_GeomFromEWKB(bytea  eWKB);

Parameters

Parameter Description
eWKB The EWKB string that you want to specify.

Description

This function supports circular strings, curves, polyhedral surfaces, triangles, triangulated irregular network (TIN) surfaces, and 3D objects.

Examples

Construct a geometry object by using the default parameter settings and specify that the spatial reference identifier (SRID) must be returned.
SELECT ST_AsText(ST_GeomFromEWKB(E'\\x0101000020e61000000000000000005d400000000000004440'));
   st_astext
---------------
 POINT(116 40)
(1 row)

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