ST_PixelHeight

更新时间: 2026-03-28 18:21:12

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

Syntax

float8 ST_PixelHeight(raster raster_obj)

Parameters

ParameterDescription
raster_objThe raster object to query.

Description

Pixel height is the vertical size of a single pixel measured in the units of the spatial reference system. The following figure illustrates pixel height (shown in red).

ST_PixelHeight

When the skew of the raster object is 0, the pixel height equals the Y scale.

Examples

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

SELECT ST_PixelWidth(rast), ST_PixelHeight(rast)
FROM raster_table;

Output:

 st_pixelwidth | st_pixelheight
---------------+----------------
            60 |             60
上一篇: ST_PixelWidth 下一篇: ST_Georeference
阿里云首页 云原生数据库 PolarDB 相关技术圈