Name

ST_YSize — Returns the Y size of a 2D or 3D bounding box or a geometry.

Synopsis

float ST_YSize(box3d aGeomorBox2DorBox3D);

Description

Returns the Y size of a 2D or 3D bounding box or a geometry, computed as ST_YMax(aGeomorBox2DorBox3D) - ST_YMin(aGeomorBox2DorBox3D).

[Note]

Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting. However it will not accept a geometry or box2d text representation, since those do not auto-cast.

This function supports 3d and will not drop the z-index.

This method supports Circular Strings and Curves.

Availability: 3.7.0

Examples

Code
SELECT ST_YSize('BOX3D(1 2 3,4 5 6)');
Output
3
Code
SELECT ST_YSize('LINESTRING(1 3,5 6)'::geometry);
Output
3
Figure
Geometry figure for visual-st-ysize-02