- Categories:
ST_ASWKB , ST_ASBINARY¶
Given a value of type GEOGRAPHY or GEOMETRY, return the binary representation of that value in WKB (well-known binary) format.
- See also:
Syntax¶
Use one of the following:
Arguments¶
geography_or_geometry_expressionThe argument must be an expression of type GEOGRAPHY or GEOMETRY.
Returns¶
A value of type BINARY.
Usage notes¶
ST_ASBINARY is an alias for ST_ASWKB.
To return the output in EWKB format, use ST_ASEWKB instead.
Examples¶
GEOGRAPHY examples¶
The following example demonstrates the ST_ASWKB function. For the WKB output, it is assumed that the BINARY_OUTPUT_FORMAT
parameter is set to HEX (the default value for the parameter).
GEOMETRY examples¶
The example below demonstrates how to use the ST_ASEWKB function. The example returns the EWKB representations of two geometries.