ST_As Binary

Determine the Well-Known Binary (WKB) representation of a geometry. Takes a geometry and returns its well-known binary representation. ST_AsBinary is the reverse of ST_WKBToSQL.

Syntax

ST_AsBinary(geo);
geo
The input geometry.

Type: ST_GEOMETRY(ANY)

Returns

A value of type ST_GEOMETRY(ANY) that is the WKB representation of the input geometry, without the SRID.

Examples

inza..ST_AsText(inza..ST_WKBToSQL(inza..ST_AsBinary(inza..ST_Point(1, 2))));

ST_ASTEXT
-----------
POINT (1 2)
(1 row)