All Products
Search
Document Center

ApsaraDB RDS:ST_UpperLeftY

Last Updated:Mar 28, 2026

Returns the Y coordinate of the upper-left corner of a raster object in its spatial reference system.

Prerequisites

The raster object must have a spatial reference system identifier (SRID). To check whether an SRID is set, run:

SELECT ST_SRID(raster_obj) FROM raster_table;

If no SRID is set, call ST_SetSrid to assign one before calling this function.

Syntax

float8 ST_UpperLeftY(raster raster_obj)

Parameters

ParameterDescription
raster_objThe raster object to query.

Examples

Query both the upper-left X and Y coordinates of raster objects:

SELECT st_upperleftx(raster_obj), st_upperlefty(raster_obj)
FROM raster_table;

Output:

 st_upperleftx | st_upperlefty
---------------+---------------
        440720 |       3751320