All Products
Search
Document Center

PolarDB:ST_UpperLeftX

Last Updated:Mar 28, 2026

Returns the upper-left X coordinate of a raster object in the spatial reference system.

Prerequisites

Before you call this function, ensure that the raster object has a valid spatial reference system identifier (SRID).

Syntax

float8 ST_UpperLeftX(raster raster_obj)

Parameters

ParameterDescription
raster_objThe raster object to query.

Examples

Query the upper-left X and Y coordinates for all rasters in a table:

SELECT ST_UpperLeftX(rast) AS ulx, ST_UpperLeftY(rast) AS uly
FROM raster_table;

Output:

   ulx   |   uly
---------+---------
  440720 | 3751320

See also

  • ST_UpperLeftY — Returns the upper-left Y coordinate of a raster object.