Returns the maximum y coordinate of the bounding box of a Box2D, Box3D, or geometry object.
Syntax
float ST_YMax(box3d aGeomorBox2DorBox3D);Parameters
| Parameter | Description |
|---|---|
| aGeomorBox2DorBox3D | The Box2D, Box3D, or geometry object. |
Usage notes
The parameter type is defined as
box3d, but the function supports auto-casting for Box2D and geometry objects. Auto-casting does not apply when Box2D or geometry objects are passed as strings.The function supports 3D geometries and preserves z coordinates.
The function supports circular strings and curves.
Examples
Get the maximum y coordinate of the bounding box of a LineString:
SELECT ST_YMax('LINESTRING(0 1,2 3)'::geometry);
st_ymax
---------
3
(1 row)该文章对您有帮助吗?