Skip to content

ST_AsBinary

Converts a geometry to Well-Known Binary (WKB) format.

Usage

geometry ST_AsBinary(geom: geometry)

Arguments

  • geom (geometry): Input geometry

Description

ST_AsBinary() Returns the Well-Known Binary representation of a geometry or geography. This function also has the alias ST_AsWKB.

Examples

SELECT ST_AsBinary(ST_Point(1.0, 2.0));
┌──────────────────────────────────────────────┐
│ st_asbinary(st_point(Float64(1),Float64(2))) │
│                    binary                    │
╞══════════════════════════════════════════════╡
│ 0101000000000000000000f03f0000000000000040   │
└──────────────────────────────────────────────┘