All Products
Search
Document Center

PolarDB:ST_PixelHeight

Last Updated:Mar 28, 2026

Returns the pixel height of a raster object in the spatial reference system.

Syntax

float8 ST_PixelHeight(raster raster_obj)

Parameters

ParameterDescription
raster_objThe 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).

ST_PixelHeight

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