Returns the X component of the pixel width in units of the coordinate reference system (CRS) for a raster object.
Prerequisites
Before you begin, ensure that you have:
A raster object with a valid spatial reference system identifier (SRID)
Syntax
float8 ST_ScaleX(raster raster_obj)Parameters
| Parameter | Description |
|---|---|
raster_obj | The raster object to query. |
Examples
Query the X and Y pixel scale of all rasters in a table:
SELECT st_scalex(rast), st_scaley(rast)
FROM raster_table;Output:
st_scalex | st_scaley
-----------+-----------
1.3 | 0.3该文章对您有帮助吗?