ST_ScaleX

更新时间:
复制 MD 格式

Returns the X component of the pixel width in units of the coordinate reference system (CRS) for a raster object.

Prerequisites

Before you begin, ensure that you have:

  • A raster object with a valid spatial reference system identifier (SRID)

Syntax

float8 ST_ScaleX(raster raster_obj)

Parameters

ParameterDescription
raster_objThe raster object to query.

Examples

Query the X and Y pixel scale of all rasters in a table:

SELECT st_scalex(rast), st_scaley(rast)
FROM raster_table;

Output:

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