Geospatial functions
ST_ASEWKB
Reference material for ST_ASEWKB function
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:
Returns
result (BYTEA) |
---|
‘\x0101000020e61000003d94479a127f52c0502f80fb03614440’ |