ST_XMAX
Learn how to use the ST_XMAX geometry function in PlaidCloud Lakehouse. Returns the maximum longitude (X coordinate) of all points contained in the...
Returns the maximum longitude (X coordinate) of all points contained in the specified GEOMETRY object.
SQL Syntax
ST_XMAX(<geometry>)
Arguments
| Arguments | Description |
|---|---|
<geometry> | The argument must be an expression of type GEOMETRY. |
Return Type
Double.
SQL Examples
SELECT
ST_XMAX(
TO_GEOMETRY(
'GEOMETRYCOLLECTION(POINT(40 10),LINESTRING(10 10,20 20,10 40),POINT EMPTY)'
)
) AS pipeline_xmax;
┌───────────────┐
│ pipeline_xmax │
├───────────────┤
│ 40 │
└───────────────┘
SELECT
ST_XMAX(
TO_GEOMETRY(
'GEOMETRYCOLLECTION(POINT(40 10),LINESTRING(10 10,20 20,10 40),POLYGON((40 40,20 45,45 30,40 40)))'
)
) AS pipeline_xmax;
┌───────────────┐
│ pipeline_xmax │
├───────────────┤
│ 45 │
└───────────────┘