ST_AsEWKB — Returns the Extended Well-Known Binary (EWKB) representation of a Geometry object.
bytea ST_AsEWKB(
bytea
Geometry)
;
bytea ST_AsEWKB(
bytea
Geometry, text
XDR/NDR)
;
Returns the Extended Well-Known Binary (EWKB) representation of a Geometry object. The EWKB format is a Postgis format that adds the Spatial Reference ID (SRID) to the OGC Well-Known Binary representation (WKB).
The reverse function is ST_GeomFromEWKB |
2D | 3D | M |
---|---|---|
OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
---|---|---|---|
- | - | - | - |
SELECT ST_AsEWKB(ST_GeomFromText('POINT(1 1 1)',25830)); st_asewkb ------------------------------------------------------------------------------------- \001\001\000\000\240\346d\000\000\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?\000\000\000\000\000\000\360? (1 row)
SELECT ST_AsEWKB(ST_GeomFromText('POINT(1 1 1)',25830)); --Result 01010000a0e6640000000000000000f03f000000000000f03f000000000000f03f