הערה
גישה לעמוד זה דורשת אישור. אתה יכול לנסות להיכנס או לשנות תיקיות.
גישה לעמוד זה דורשת אישור. אתה יכול לנסות לשנות מדריכים.
Important
This feature is in Public Preview.
Returns the convex hull of the input geometry as a geometry.
For the corresponding Databricks SQL function, see st_convexhull function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_convexhull(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POLYGON((0 0,20 0,20 10,15 5,5 10,0 25,0 0))',)], ['wkt'])
df.select(dbf.st_astext(dbf.st_convexhull(dbf.st_geomfromtext('wkt'))).alias('result')).collect()
[Row(result='POLYGON((0 0,0 25,20 10,20 0,0 0))')]