ST_AsEWKB¶
Returns the EWKB representation of a geometry or geography.
Usage¶
binary ST_AsEWKB(geom: geometry)
Arguments¶
- geom (geometry): Input geometry
Description¶
EWKB extends WKB to include SRID information in the binary header and is useful for PostGIS compatibility. This function preserves item-level CRSes or will repeat a type-level CRS for all elements if present.
Examples¶
SELECT ST_AsEWKB(ST_Point(1.0, 2.0, 4326));
┌────────────────────────────────────────────────────────┐
│ st_asewkb(st_point(Float64(1),Float64(2),Int64(4326))) │
│ binary │
╞════════════════════════════════════════════════════════╡
│ 0101000020e6100000000000000000f03f0000000000000040 │
└────────────────────────────────────────────────────────┘