All Products
Search
Document Center

ApsaraDB RDS:ST_PixelWidth

Last Updated:Mar 28, 2026

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

Syntax

float8 ST_PixelWidth(raster raster_obj)

Parameters

ParameterDescription
raster_objThe name of the raster object.

Description

The red part in the following figure shows the pixel width of the raster object. When the skew of the raster object is 0, the pixel width equals the X scale.

ST_PixelWidth

Examples

Query the pixel width and pixel height of raster objects in raster_table:

select st_pixelwidth(rast), st_pixelheight(rast)
from raster_table;

Output:

 st_pixelwidth | st_pixelheight
---------------+----------------
            60 |             60