Sdílet prostřednictvím


st_reverse

Důležité

Tato funkce je ve verzi Public Preview.

Obrátí pořadí vrcholů ve vstupní geografické nebo geometrické hodnotě .

Odpovídající funkci SQL Databricks vizte funkcest_reverse.

Syntaxe

from pyspark.databricks.sql import functions as dbf

dbf.st_reverse(col=<col>)

Parametry

Parameter Typ Description
col pyspark.sql.Column nebo str Hodnota Geografie nebo Geometrie.

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_reverse(dbf.st_geogfromtext('wkt'))).alias('result')).collect()
[Row(result='SRID=4326;LINESTRING(5 6,3 4,1 2)')]