Converts shapes of the GEOGRAPHY data type to the extended Well-Known Binary (EWKB) format using Spatial Reference Identifier (SRID) 4326, which corresponds to the WGS84 coordinate system.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|
<object> | The GEOGRAPHY object to convert to EWKB format. | GEOGRAPHY |
Return Type
ST_ASEWKB returns a value of type BYTEA.
Example
The following code example creates a GEOGRAPHY object from the WKT representation of a Point at specified longitude and latitude coordinates and converts it to EWKB format:
SELECT ST_ASEWKB(ST_GEOGFROMTEXT('POINT(-73.98551041593687 40.75793403395676)')) AS result;
| result bytea |
|---|
| \x0101000020e61000003d94479a127f52c0502f80fb03614440 |
Rows: 1Execution time: 5.85ms