GEOGRAPHY data type to the Well-Known Binary (WKB) format for geographic objects.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<object> | The GEOGRAPHY object to convert to WKB format. | GEOGRAPHY |
Return Type
ST_ASBINARY returns a value of type BYTEA.
Example
The following query usesST_GEOGFROMTEXT to create a GEOGRAPHY object from the WKT representation of a Point at specified longitude and latitude coordinates, and then uses ST_ASBINARY to convert it to WKB representation:
| result (BYTEA) |
|---|
| ‘\x01010000003d94479a127f52c0502f80fb03614440’ |