Partilhar via


st_reverse

Importante

Este recurso está no Public Preview.

Inverte a ordem dos vértices no valor de entrada Geografia ou Geometria .

Para a função SQL do Databricks correspondente, veja st_reverse função.

Sintaxe

from pyspark.databricks.sql import functions as dbf

dbf.st_reverse(col=<col>)

Parâmetros

Parâmetro Tipo Description
col pyspark.sql.Column ou str Um valor de Geografia ou Geometria .

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