snowflake.snowpark.functions.st_perimeter¶
- snowflake.snowpark.functions.st_perimeter(geography_or_geometry_expression: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Returns the perimeter of a GEOGRAPHY or GEOMETRY object.
- Parameters:
geography_or_geometry_expression (ColumnOrName) – A GEOGRAPHY or GEOMETRY objects
- Returns:
The perimeter of the input geography or geometry object
- Return type:
- Examples::
>>> from snowflake.snowpark.functions import to_geometry >>> df = session.create_dataframe([ ... "POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", ... "POINT(1 1)", ... "LINESTRING(0 0, 1 1)" ... ], schema=["geometry"]) >>> df.select(st_perimeter(to_geometry(df["geometry"])).alias("perimeter")).collect() [Row(PERIMETER=4.0), Row(PERIMETER=0.0), Row(PERIMETER=0.0)]