Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Databricks Runtime 17.1 and above
Important
This feature is in Public Preview.
Returns the minimum X coordinate of the input GEOMETRY
, or NULL
if the geometry is empty.
Syntax
st_xmin ( geoExpr )
Arguments
geoExpr
: AGEOMETRY
value.
Returns
A value of type DOUBLE
, minimum X coordinate of the input GEOMETRY
.
The function returns NULL
if the input is NULL
or if the geometry is empty.
Examples
-- Returns the minimum X coordinate of a non-empty geometry.
> SELECT st_xmin(st_geomfromtext('LINESTRING(10 34,44 57,30 24)'))
10.0
-- Returns `NULL` for an empty geometry.
> SELECT st_xmin(st_geomfromtext('POLYGON EMPTY'))
NULL