snowflake.snowpark.functions.st_aswkb¶
- snowflake.snowpark.functions.st_aswkb(geography_or_geometry_expression: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns the Well-Known Binary (WKB) representation of a GEOGRAPHY or GEOMETRY object.
- Parameters:
geography_or_geometry_expression (ColumnOrName) – The GEOGRAPHY or GEOMETRY object.
- Returns:
The WKB representation as binary data.
- Return type:
- Examples::
>>> from snowflake.snowpark.functions import col, to_geography >>> df = session.create_dataframe([ ... 'POINT(-122.35 37.55)', ... 'LINESTRING(-124.20 42.00, -120.01 41.99)' ... ], schema=["g"]) >>> df.select(st_aswkb(to_geography(col("g")))).collect() [Row(ST_ASWKB(TO_GEOGRAPHY("G"))=bytearray(b'\x01\x01\x00\x00\x00fffff\x96^\xc0fffff\xc6B@')), Row(ST_ASWKB(TO_GEOGRAPHY("G"))=bytearray(b'\x01\x02\x00\x00\x00\x02\x00\x00\x00\xcd\xcc\xcc\xcc\xcc\x0c_\xc0\x00\x00\x00\x00\x00\x00E@q=\n\xd7\xa3\x00^\xc0\x1f\x85\xebQ\xb8\xfeD@'))]