snowflake.snowpark.functions.st_buffer¶
- snowflake.snowpark.functions.st_buffer(geometry_expression: Union[snowflake.snowpark.column.Column, str], distance: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Returns a geometry that represents all points whose distance from the input geometry is less than or equal to the specified distance.
- Parameters:
geometry_expression (ColumnOrName) – The input geometry.
distance (ColumnOrName) – The buffer distance.
- Returns:
The buffered geometry.
- Return type:
- Examples::
>>> from snowflake.snowpark.functions import col, to_geometry >>> df = session.create_dataframe([["POINT(0 0)", 1.0]], schema=["geometry", "distance"]) >>> df.select(st_buffer(to_geometry(col("geometry")), col("distance")).alias("BUFFERED")).collect() [Row(BUFFERED='{\n "coordinates": [\n [\n [\n [\n 1.000000000000000e+00,\n 0.000000000000000e... 1.000000000000000e+00,\n 0.000000000000000e+00\n ]\n ]\n ]\n ],\n "type": "MultiPolygon"\n}')]