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.
Format
Field … | Specifies … |
---|---|
Byte Order | an 8-bit value that indicates the binary representation of 32-bit unsigned integer values and 64-bit 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 32-bit unsigned integer value that indicates the geometry represented by the byte stream. A value of:
|
X | a 64-bit, double-precision value that represents the X coordinate value of an ST_Point value. |
Y | a 64-bit, double-precision value that represents the Y coordinate value of an ST_Point value. |
Z | a 64-bit, double-precision value that represents the Z coordinate value of an ST_Point value. |
Num Points | a 32-bit, unsigned integer that specifies the number of points (X, Y coordinate pairs) that are to follow. |
X1 | a 64-bit, double precision value that represents the X coordinate value of the first point of a geometry. |
Y1 | a 64-bit, double precision value that represents the Y coordinate value of the first point of a geometry. |
Z1 | a 64-bit, double precision value that represents the Z coordinate value of the first point of a geometry. |
X n | a 64-bit, 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. |
Y n | a 64-bit, 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. |
Z n | a 64-bit, 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 32-bit, unsigned integer that specifies the number of linear rings (closed and simple linestrings) that are to follow. |
Num Linestrings | a 32-bit, unsigned integer that specifies the number of linestrings that are to follow. |
Num Polygons | a 32-bit, unsigned integer that specifies the number of polygons that are to follow. |
Num Elements | a 32-bit, 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 Geometry collection 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 32-bit integer value that specifies the difference, in milliseconds, between the initial timestamp and the timestamp of the second point in the geosequence. |
Delta n-1 | a 32-bit integer value that specifies the difference, in milliseconds, between the penultimate timestamp and the timestamp of the last point in the geosequence. |
LinkID1 | a 64-bit NUMERIC(18,0) value that specifies the link ID of the first point of the geosequence. Link IDs are reserved for a future release. |
LinkID n | a 64-bit 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 32-bit unsigned integer value that specifies the number of optional user fields of data for each point in the geosequence. |
UField1 P1 | a 64-bit 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 P n | a 64-bit 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. |
UField j P1 | a 64-bit 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. |
UField j P n | a 64-bit 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. |