All Products
Search
Document Center

PolarDB:ST_ScaleX

Last Updated:Mar 28, 2026

Returns the pixel width of a raster object along the X axis in its spatial reference system.

Prerequisites

The raster object must have a valid spatial reference system identifier (SRID).

Syntax

float8 ST_ScaleX(raster raster_obj)

Parameters

ParameterDescription
raster_objThe raster object.

Examples

The following query returns the pixel width on the X axis and the pixel height on the Y axis for each row in raster_table.

SELECT ST_ScaleX(rast), ST_ScaleY(rast)
FROM raster_table;

Output:

 st_scalex | st_scaley
-----------+-----------
       1.3 |       0.3