ST_XMIN

Learn how to use the ST_XMIN geometry function in PlaidCloud Lakehouse. Returns the minimum longitude (X coordinate) of all points contained in the...

Returns the minimum longitude (X coordinate) of all points contained in the specified GEOMETRY object.

SQL Syntax

ST_XMIN(<geometry>)

Arguments

ArgumentsDescription
<geometry>The argument must be an expression of type GEOMETRY.

Return Type

Double.

SQL Examples

SELECT
  ST_XMIN(
    TO_GEOMETRY(
      'GEOMETRYCOLLECTION(POINT(180 10),LINESTRING(20 10,30 20,40 40),POINT EMPTY)'
    )
  ) AS pipeline_xmin;

┌───────────────┐
 pipeline_xmin 
├───────────────┤
            20 
└───────────────┘

SELECT
  ST_XMIN(
    TO_GEOMETRY(
      'GEOMETRYCOLLECTION(POINT(40 10),LINESTRING(20 10,30 20,10 40),POLYGON((40 40,20 45,45 30,40 40)))'
    )
  ) AS pipeline_xmin;

┌───────────────┐
 pipeline_xmin 
├───────────────┤
            10 
└───────────────┘