Skip to content

ST_XMin

Returns the minimum X coordinate (longitude for geography) of a geometry or geography’s bounding box.

Usage

double ST_XMin(geom: geometry)
double ST_XMin(geog: geography)

Arguments

  • geog (geography): Input geography
  • geom (geometry): Input geometry

Examples

SELECT ST_XMin(ST_GeomFromText('LINESTRING (0 0, 5 4)'));
┌─────────────────────────────────────────────────────────┐
│ st_xmin(st_geomfromtext(Utf8("LINESTRING (0 0, 5 4)"))) │
│                         float64                         │
╞═════════════════════════════════════════════════════════╡
│                                                     0.0 │
└─────────────────────────────────────────────────────────┘
SELECT ST_XMin(ST_GeogFromWKT('LINESTRING (0 0, 5 4)'));
┌────────────────────────────────────────────────────────┐
│ st_xmin(st_geogfromwkt(Utf8("LINESTRING (0 0, 5 4)"))) │
│                         float64                        │
╞════════════════════════════════════════════════════════╡
│                                                    0.0 │
└────────────────────────────────────────────────────────┘