Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
Important
This feature is in Public Preview.
Removes the n-th point from the input linestring Geography or Geometry.
For the corresponding Databricks SQL function, see st_removepoint function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_removepoint(col1=<col1>, col2=<col2>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col1 |
pyspark.sql.Column or str |
A Geography or Geometry value. |
col2 |
pyspark.sql.Column or int |
A 1-based position in the linestring indicating the point that should be removed. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('LINESTRING(1 2,3 4,5 6)',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.st_removepoint(dbf.st_geogfromtext('wkt'), 2)).alias('result')).collect()
[Row(result='SRID=4326;LINESTRING(1 2,5 6)')]