All Products
Search
Document Center

ApsaraDB RDS:ST_ScaleX

Last Updated:Mar 28, 2026

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

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

See also

  • ST_ScaleY: Returns the pixel height along the Y axis.