Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This feature is in Public Preview. You can confirm preview enrollment on the Previews page. See Manage Azure Databricks previews.
Returns the boundary of the input geometry as a geometry.
For the corresponding Databricks SQL function, see st_boundary function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_boundary(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,10 0,10 10,0 10,0 0),(2 2,8 2,8 8,2 8,2 2))',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.st_boundary(dbf.st_geomfromtext('wkt', 3857))).alias('result')).collect()
[Row(result='SRID=3857;MULTILINESTRING((0 0,10 0,10 10,0 10,0 0),(2 2,8 2,8 8,2 8,2 2))')]