Returns the pixel height of a raster object in the spatial reference system.
Syntax
float8 ST_PixelHeight(raster raster_obj)Parameters
| Parameter | Description |
|---|---|
raster_obj | The raster object to query. |
Description
Pixel height is the vertical size of a single pixel measured in the units of the spatial reference system. The following figure illustrates pixel height (shown in red).

When the skew of the raster object is 0, the pixel height equals the Y scale.
Examples
Query the pixel width and pixel height of all raster objects in raster_table:
SELECT ST_PixelWidth(rast), ST_PixelHeight(rast)
FROM raster_table;Output:
st_pixelwidth | st_pixelheight
---------------+----------------
60 | 60