Napomena
Za pristup ovoj stranici potrebna je autorizacija. Možete se pokušati prijaviti ili promijeniti direktorije.
Za pristup ovoj stranici potrebna je autorizacija. Možete pokušati promijeniti direktorije.
Important
This feature is in Public Preview.
Returns the number of non-empty points in the input Geography or Geometry value.
For the corresponding Databricks SQL function, see st_npoints function.
This function is aliased by st_numpoints.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_npoints(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([('MULTIPOINT(10 34,44 57,EMPTY)',)], ['wkt'])
df.select(dbf.st_npoints(dbf.st_geomfromtext('wkt')).alias('result')).collect()
[Row(result=2)]