st_concavehull
Preview
This feature is in Public Preview.
Returns the concave hull of the input geometry as a geometry using the specified length ratio.
For the corresponding Databricks SQL function, see st_concavehull function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.st_concavehull(col1=<col1>, col2=<col2>, col3=<col3>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| A Geometry value. |
|
| A |
|
| An optional |
Examples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('MULTIPOINT(0 0,10 0,10 10,0 10,1 1,1 5,1 9,5 1,9 9,9 1,9 5,5 9)', 0.8)], ['wkt','ratio'])
df.select(dbf.st_astext(dbf.st_concavehull(dbf.st_geomfromtext('wkt'), 'ratio')).alias('result')).collect()
Output
[Row(result='POLYGON((0 0,1 5,0 10,5 9,10 10,9 5,10 0,5 1,0 0))')]