Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Important
This feature is in Public Preview.
Returns the type of the input Geography or Geometry value as a string.
For the corresponding Databricks SQL function, see st_geometrytype function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_geometrytype(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geography or Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT(4 5)',)], ['wkt'])
df.select(dbf.st_geometrytype(dbf.st_geomfromtext('wkt')).alias('result')).collect()
[Row(result='ST_Point')]