Name

ST_XMax — Returns the maximum X of the geometry bounding box.

Synopsis

double ST_XMax(bytea Geometry);

Alias

XMax

Description

Returns the maximum X of the geometry bounding box.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
----

Examples

SELECT ST_AsText(Box2D(ST_GeomFromText('LINESTRING (1 1, 2 3, 3 2, 4 4)')));
--Result
POLYGON ((1 1, 1 4, 4 4, 4 1, 1 1))

SELECT ST_XMax(Box2D(ST_GeomFromText('LINESTRING (1 1, 2 3, 3 2, 4 4)')));
--Result
4.0

SELECT ST_XMax(ST_GeomFromText('LINESTRING (1 1, 2 3, 3 2, 4 4)'));
--Result
4.0

Related functions

ST_XMin,ST_YMax,ST_YMin,ST_ZMax,ST_ZMin