All Products
Search
Document Center

PolarDB:ST_XMax

Last Updated:Mar 28, 2026

Returns the maximum X-coordinate value of a raster object.

Syntax

float8 ST_XMax(raster raster_obj)

Parameters

ParameterDescription
raster_objThe name of the raster object.

Description

ST_XMax returns the maximum X-coordinate value of the raster object.

If the raster object has not been georeferenced, ST_XMax returns -1.

Examples

Georeferenced raster — returns the maximum X-coordinate:

SELECT ST_XMax(rast)
FROM raster_table;

Result:

 st_xmax
----------
      121

See also

  • ST_XMin — Returns the minimum X-coordinate value of a raster object.

  • ST_YMax — Returns the maximum Y-coordinate value of a raster object.

  • ST_YMin — Returns the minimum Y-coordinate value of a raster object.