Returns the pixel width of a raster object along the X axis, in units of the coordinate reference system (CRS).
Prerequisites
The raster object must have 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
SELECT ST_ScaleX(rast) AS x_pixel_width,
ST_ScaleY(rast) AS y_pixel_width
FROM raster_table;Output:
x_pixel_width | y_pixel_width
---------------+---------------
1.3 | 0.3See also
ST_ScaleY: Returns the pixel height along the Y axis.