重要
此功能目前以公共预览版提供。
以二维多边形几何图形的形式返回与输入 geohash 值对应的 geohash 网格框。
有关相应的 Databricks SQL 函数,请参阅 st_geomfromgeohash 函数。
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_geomfromgeohash(col=<col>)
参数
| 参数 | 类型 | Description |
|---|---|---|
col |
pyspark.sql.Column 或 str |
表示 geohash 值的字符串值。 |
例子
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('9q8yyh',)], ['geohash'])
df.select(dbf.st_astext(dbf.st_geomfromgeohash('geohash')).alias('result')).collect()
[Row(result='POLYGON((-122.431640625 37.77099609375,-122.431640625 37.7764892578125,-122.420654296875 37.7764892578125,-122.420654296875 37.77099609375,-122.431640625 37.77099609375))')]