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
| Parameter | Description |
|---|---|
raster_obj | The raster whose maximum Y coordinate you want to obtain. |
pyramid | The 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