All Products
Search
Document Center

PolarDB:ST_YMax

Last Updated:Mar 28, 2026

Returns the maximum Y coordinate of a raster object.

Syntax

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

Parameters

ParameterDescription
raster_objThe raster whose maximum Y coordinate you want to obtain.
pyramidThe pyramid level of the raster. Valid values start from 0.

Description

For a georeferenced raster, ST_YMax returns the maximum Y coordinate in the raster's spatial reference system. For a non-georeferenced raster, it returns the raster height minus 1.

Example

SELECT ST_YMax(rast)
FROM raster_table;

Output:

 st_ymax
----------
      31