Well-known binary representation

You can generate a geometry from the OGC well-known binary (WKB) representation. The WKB representation is a contiguous stream of bytes. It permits geometry to be exchanged between a client application and an SQL database in binary form.

ST_GeomFromWKB()
The function creates an ST_Geometry from a WKB representation of any geometry type.
ST_PointFromWKB()
The function creates an ST_Point from a point WKB representation.
ST_LineFromWKB()
The function creates an ST_LineString from a linestring WKB representation.
ST_PolyFromWKB()
The function creates an ST_Polygon from a polygon WKB representation.
ST_MPointFromWKB()
The function creates an ST_MultiPoint from a multipoint WKB representation.
ST_MLineFromWKB()
The function creates an ST_MultiLineString from a multilinestring WKB representation.
ST_MPolyFromWKB()
The function creates an ST_MultiPolygon from a multipolygon WKB representation.
ST_AsBinary()
The function converts an existing geometry value into well-known binary representation.