ST_PixelWidth
更新时间:
复制 MD 格式
Returns the pixel width of a raster object in its spatial reference system.
Syntax
float8 ST_PixelWidth(raster raster_obj)Parameters
| Parameter | Description |
|---|---|
raster_obj | The name of the raster object. |
Description
The red region in the diagram below illustrates what the pixel width represents.

When the skew of the raster object is 0, the pixel width equals the X scale.
Examples
The following example queries the pixel width and pixel height of each raster object in raster_table.
SELECT st_pixelwidth(rast), st_pixelheight(rast)
FROM raster_table;Result:
st_pixelwidth | st_pixelheight
---------------+----------------
60 | 60该文章对您有帮助吗?