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
| Parameter | Description |
|---|---|
raster_obj | The 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 | 3751320What's next
ST_UpperLeftY — returns the upper-left Y coordinate of a raster object