ST_YMax

更新时间:
复制 MD 格式

Returns the maximum y coordinate of the bounding box of a Box2D, Box3D, or geometry object.

Syntax

float ST_YMax(box3d aGeomorBox2DorBox3D);

Parameters

ParameterDescription
aGeomorBox2DorBox3DThe 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)