All Products
Search
Document Center

ApsaraDB RDS:ST_XMax

Last Updated:Mar 28, 2026

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

Syntax

float8 ST_XMax(raster raster_obj)
float8 ST_XMax(raster raster_obj, integer pyramid)

Parameters

ParameterDescription
raster_objThe name of the raster object.
pyramidThe pyramid level. Values start at 0.

Description

If the raster object has been georeferenced, ST_XMax returns the maximum X-coordinate value of the raster object. Otherwise, ST_XMax returns -1.

Examples

SELECT ST_XMax(rast)
FROM raster_table;

Result:

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