snowflake.snowpark.functions.st_ymax¶

snowflake.snowpark.functions.st_ymax(geography_or_geometry_expression: Union[snowflake.snowpark.column.Column, str]) → Column[source]¶

Returns the maximum Y coordinate of the input GEOGRAPHY or GEOMETRY object.

Parameters:

geography_or_geometry_expression (ColumnOrName) – A GEOGRAPHY or GEOMETRY object.

Returns:

The maximum Y coordinate value.

Return type:

Column

Examples::
>>> from snowflake.snowpark.functions import to_geography
>>> df = session.create_dataframe([
...     ["POINT(-180 0)"],
...     ["POINT(180 0)"],
...     ["LINESTRING(-60 30,60 30)"],
...     ["LINESTRING(-60 -30,60 -30)"]
... ], schema=["geog"])
>>> df.select(st_ymax(to_geography(df["geog"])).alias("ymax")).collect()
[Row(YMAX=0.0), Row(YMAX=0.0), Row(YMAX=49.106605350869174), Row(YMAX=-29.999999999999943)]
Copy