You are viewing documentation about an older version (1.8.0). View latest version

snowflake.snowpark.functions.st_ymin¶

snowflake.snowpark.functions.st_ymin(geography_or_geometry_expression)[source]¶

Returns the minimum Y coordinate (latitude) of all points in a GEOGRAPHY or GEOMETRY object.

Parameters:

geography_or_geometry_expression (ColumnOrName) – A GEOGRAPHY or GEOMETRY object.

Returns:

The minimum 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=["geometry"])
>>> df.select(st_ymin(to_geography(df["geometry"])).alias("ymin")).collect()
[Row(YMIN=0.0), Row(YMIN=0.0), Row(YMIN=29.999999999999943), Row(YMIN=-49.106605350869174)]
Copy