Professional Documents
Culture Documents
1 Manual
267 / 315
Synopsis
float ST_YMax(box3d aGeomorBox2DorBox3D);
Description
Returns Y maxima of a bounding box 2d or 3d or a geometry.
Note
Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior
defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will
not auto-cast.
Examples
SELECT ST_YMax(BOX3D(1 2 3, 4 5 6));
st_ymax
------5
SELECT ST_YMax(ST_GeomFromText(LINESTRING(1 3 4, 5 6 7)));
st_ymax
------6
SELECT ST_YMax(CAST(BOX(-3 2, 3 4) As box2d));
st_ymax
------4
--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
SELECT ST_YMax(LINESTRING(1 3, 5 6));
--ERROR:
See Also
ST_XMin, ST_XMax, ST_YMin, ST_ZMax, ST_ZMin
7.12.14 ST_YMin
Name
ST_YMin Returns Y minima of a bounding box 2d or 3d or a geometry.
Synopsis
float ST_YMin(box3d aGeomorBox2DorBox3D);
Description
Returns Y minima of a bounding box 2d or 3d or a geometry.
Note
Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior
defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will
not auto-cast.
Examples
SELECT ST_YMin(BOX3D(1 2 3, 4 5 6));
st_ymin
------2
SELECT ST_YMin(ST_GeomFromText(LINESTRING(1 3 4, 5 6 7)));
st_ymin
------3
SELECT ST_YMin(CAST(BOX(-3 2, 3 4) As box2d));
st_ymin
------2
--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
SELECT ST_YMin(LINESTRING(1 3, 5 6));
--ERROR:
See Also
ST_GeomFromEWKT, ST_XMin, ST_XMax, ST_YMax, ST_ZMax, ST_ZMin
7.12.15 ST_ZMax
Name
ST_ZMax Returns Z minima of a bounding box 2d or 3d or a geometry.