Defines the format of geometry data when using a byte stream to construct new ST_Geometry instances or transfer ST_Geometry values to and from client applications.
Field … 
Specifies … 
Byte Order

an 8bit value that indicates the binary representation of 32bit unsigned integer values and 64bit double precision values in the byte stream. 0 indicates big endian. The first octet is the most significant octet. For double precision values, the sign bit is in the first octet. 1 indicates little endian. The last octet is the most significant octet. For double precision values, the sign bit is in the last octet. 
WKB Type 
a 32bit unsigned integer value that indicates the geometry represented by the byte stream. A value of: 1001 means a point (3D). 1002 means a linestring (3D). 1003 means a polygon (3D). 1004 means a multipoint (3D). 1005 means a multilinestring (3D). 1006 means a multipolygon (3D). 1007 means a geometry collection (3D).

X 
a 64bit, doubleprecision value that represents the X coordinate value of an ST_Point value. 
Y 
a 64bit, doubleprecision value that represents the Y coordinate value of an ST_Point value. 
Z 
a 64bit, doubleprecision value that represents the Z coordinate value of an ST_Point value. 
Num Points 
a 32bit, unsigned integer that specifies the number of points (X, Y coordinate pairs) that are to follow. 
X1 
a 64bit, double precision value that represents the X coordinate value of the first point of a geometry. 
Y1 
a 64bit, double precision value that represents the Y coordinate value of the first point of a geometry. 
Z1 
a 64bit, double precision value that represents the Z coordinate value of the first point of a geometry. 
Xn 
a 64bit, double precision value that represents the X coordinate value of the nth point of a geometry, where n is defined by the Num Points field that precedes the series of points. Note that if the preceding Num Points field specifies a value of 1, the series of points is defined by the X1, Y1, and Z1 fields only and does not require any more X or Y coordinates. 
Yn 
a 64bit, double precision value that represents the Y coordinate value of the nth point of a geometry, where n is defined by the Num Points field that precedes the series of points. Note that if the preceding Num Points field specifies a value of 1, the series of points is defined by the X1, Y1, and Z1 fields only and does not require any more X or Y coordinates. 
Zn 
a 64bit, double precision value that represents the Z coordinate value of the nth point of a geometry, where n is defined by the Num Points field that precedes the series of points. Note that if the preceding Num Points field specifies a value of 1, the series of points is defined by the X1, Y1, and Z1 fields only and does not require any more X or Y coordinates. 
Num Linear Rings 
a 32bit, unsigned integer that specifies the number of linear rings (closed and simple linestrings) that are to follow. 
Num Linestrings 
a 32bit, unsigned integer that specifies the number of linestrings that are to follow. 
Num Polygons 
a 32bit, unsigned integer that specifies the number of polygons that are to follow. 
Num Elements 
a 32bit, unsigned integer that specifies the number of geometries that are to follow. 
WKB Geometry 
the fields that represent the geometry specified by the value of the preceding WKB Type field. For example, suppose the value of the WKB Type field in the first geometry element of a GeometryCollection is 1, indicating that the first geometry is a point. The fields that follow must be X and Y. 
Init TS 
the initial timestamp associated with the first point of a geosequence, where the timestamp consists of the following fields: 
Delta1 
a 32bit integer value that specifies the difference, in milliseconds, between the initial timestamp and the timestamp of the second point in the geosequence. 
Deltan1 
a 32bit integer value that specifies the difference, in milliseconds, between the penultimate timestamp and the timestamp of the last point in the geosequence. 
LinkID1 
a 64bit NUMERIC(18,0) value that specifies the link ID of the first point of the geosequence. Link IDs are reserved for a future release. 
LinkIDn 
a 64bit NUMERIC(18,0) value that specifies the link ID of the nth point of the geosequence, where n is defined by the Num Points field. Link IDs are reserved for a future release. 
Num User Fields 
a 32bit unsigned integer value that specifies the number of optional user fields of data for each point in the geosequence. 
UField1 P1 
a 64bit double precision value that represents the first user field for the first point in the geosequence. Note that if the value of the Num User Fields field is zero, no user fields appear in the byte stream. 
UField1 Pn 
a 64bit double precision value that represents the first user field for the nth point in the geosequence, where n is defined by the Num Points field. Note that if the value of the Num User Fields field is zero, no user fields appear in the byte stream. 
UFieldj P1 
a 64bit double precision value that represents the jth user field for the first point in the geosequence, where j is defined by the Num User Fields field. Note that if the value of the Num User Fields field is zero, no user fields appear in the byte stream. 
UFieldj Pn 
a 64bit double precision value that represents the jth user field for the nth point in the geosequence, where j is defined by the Num User Fields field and n is defined by the Num Points field. Note that if the value of the Num User Fields field is zero, no user fields appear in the byte stream. 
To insert a value into an ST_Geometry column using the WKB format, an application must use one of the following:
To get the value of an ST_Geometry column as a BLOB type that uses the WKB format, use the ST_AsBinary method.