All Products
Search
Document Center

PolarDB:ST_UpperLeftX

Last Updated:Mar 28, 2026

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

Prerequisites

Before you begin, ensure that you have:

  • A raster object with 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 of all rasters in a table.

select st_upperleftx(rast), st_upperlefty(rast)
from raster_table;

Expected output:

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

What's next

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