Freigeben über


st_convexhull

Von Bedeutung

Dieses Feature befindet sich in der Public Preview.

Gibt den konvexen Rumpf der Eingabegeometrie als Geometrie zurück.

Die entsprechende Databricks SQL-Funktion finden Sie unter st_convexhull Funktion.

Syntax

from pyspark.databricks.sql import functions as dbf

dbf.st_convexhull(col=<col>)

Die Parameter

Parameter Typ Description
col pyspark.sql.Column oder str Ein Geometriewert.

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))')]