This topic describes the ST_GeomFromWKB function. This function constructs a geometry object by using a Well-Known Binary (WKB) string and optionally a spatial reference identifier (SRID).
Syntax
geometry ST_GeomFromWKB(bytea geom);
geometry ST_GeomFromWKB(bytea geom , integer srid);
Parameters
Parameter | Description |
---|---|
geom | The WKB string that you want to specify. |
srid | The spatial reference identifier (SRID) of the geometry object. |
Description
- If you do not specify an SRID, the default SRID 0 is used.
- This function supports circular strings and curves.
Examples
SELECT ST_AsText(ST_GeomFromWKB(E'\\x01010000000000000000005d400000000000004440'));
st_astext
---------------
POINT(116 40)
(1 row)