snowflake.snowpark.functions.st_makepoint¶
- snowflake.snowpark.functions.st_makepoint(longitude: Union[snowflake.snowpark.column.Column, str], latitude: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Creates a GEOGRAPHY object that represents a point with the specified longitude and latitude.
- Parameters:
longitude (ColumnOrName) – The longitude values.
latitude (ColumnOrName) – The latitude values.
- Returns:
A GEOGRAPHY objects representing points.
- Return type:
- Example::
>>> from snowflake.snowpark.functions import col >>> df = session.create_dataframe([[37.5, 45.5], [-122.35, 37.55]], schema=["longitude", "latitude"]) >>> df.select(st_makepoint(col("longitude"), col("latitude")).alias("point")).collect() [Row(POINT='{\n "coordinates": [\n 3.750000000000000e+01,\n 4.550000000000000e+01\n ],\n "type": "Point"\n}'), Row(POINT='{\n "coordinates": [\n -1.223500000000000e+02,\n 3.755000000000000e+01\n ],\n "type": "Point"\n}')]