st_ndims
Preview
This feature is in Public Preview. You can confirm preview enrollment on the Previews page. See Manage Databricks previews.
Returns the coordinate dimension of the input Geography or Geometry value.
For the corresponding Databricks SQL function, see st_ndims function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.st_ndims(col=<col>)
Parameters
Examples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT ZM (10 34 48 -24)',)], ['wkt'])
df.select(dbf.st_ndims(dbf.st_geomfromtext('wkt')).alias('result')).collect()
Output
[Row(result=4)]