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 maximum X coordinate of the input geometry, or None if the input geometry is empty.
For the corresponding Databricks SQL function, see st_xmax function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_xmax(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('LINESTRING Z (1 2 3,4 5 6,7 8 9)',)], ['wkt'])
df.select(dbf.st_xmax(dbf.st_geomfromtext('wkt')).alias('result')).collect()
[Row(result=7.0)]
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POLYGON Z ((2 0 1,1 2 0,-1 -1 2,0 -1 1, 2 0 1))',)], ['wkt'])
df.select(dbf.st_xmax(dbf.st_geomfromtext('wkt')).alias('result')).collect()
[Row(result=2.0)]