Returns the minimum x coordinate of the bounding box of a Box2D, Box3D, or geometry object.
Syntax
float ST_XMin(box3d aGeomorBox2DorBox3D);Parameters
| Parameter | Description |
|---|---|
aGeomorBox2DorBox3D | The Box2D, Box3D, or geometry object. |
Usage notes
The parameter type is declared as
box3d, butST_XMinsupports auto-casting to process Box2D and geometry objects. Auto-casting does not apply when Box2D or geometry objects are passed as string expressions.ST_XMinsupports 3D objects and preserves z coordinates.ST_XMinsupports 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)该文章对您有帮助吗?