ST_XMin

更新时间:
复制 MD 格式

Returns the minimum x coordinate of the bounding box of a Box2D, Box3D, or geometry object.

Syntax

float ST_XMin(box3d aGeomorBox2DorBox3D);

Parameters

ParameterDescription
aGeomorBox2DorBox3DThe Box2D, Box3D, or geometry object.

Usage notes

  • The parameter type is declared as box3d, but ST_XMin supports auto-casting to process Box2D and geometry objects. Auto-casting does not apply when Box2D or geometry objects are passed as string expressions.

  • ST_XMin supports 3D objects and preserves z coordinates.

  • ST_XMin supports circular strings and curves.

Examples

Get the minimum x coordinate of the bounding box of a LineString object:

SELECT ST_XMin('LINESTRING(0 1,2 3)'::geometry);
 st_xmin
---------
       0
(1 row)