snowflake.snowpark.functions.st_aswkt¶
- snowflake.snowpark.functions.st_aswkt(geography_or_geometry_expression: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns the WKT (well-known text) representation of a GEOGRAPHY or GEOMETRY object.
- Parameters:
geography_or_geometry_expression (ColumnOrName) – A GEOGRAPHY or GEOMETRY objects to convert to WKT format.
- Returns:
The WKT representation of the input geography or geometry objects.
- 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_aswkt(to_geography(col("g"))).alias("RESULT")).collect() [Row(RESULT='POINT(-122.35 37.55)'), Row(RESULT='LINESTRING(-124.2 42,-120.01 41.99)')]