ST_ScaleX

更新时间: 2026-08-31 11:25:31

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.

上一篇: ST_SetSrid 下一篇: ST_ScaleY