This topic describes the ST_XMax function. This function returns the maximum x coordinate on the bounding box of a Box2D object, Box3D object, or geometry object.
float ST_XMax(box3d aGeomorBox2DorBox3D);
|aGeomorBox2DorBox3D||The Box2D object, Box3D object, or geometry object that you want to specify.|
- The parameters of the ST_XMax function are defined to support only Box3D objects. However, the function supports auto-casting, which allows the function to process Box2D objects and geometry objects. However, if Box2D objects and geometry objects are represented by strings, the function does not support auto-casting and therefore cannot process Box2D objects or geometry objects.
- The ST_XMax function supports 3D objects and does not delete z coordinates.
- The ST_XMax function supports circular strings and curves.
SELECT ST_XMax('LINESTRING(0 1,2 3)'::geometry); st_xmax --------- 2 (1 row)