名前

ST_PixelHeight — 空間参照系の単位での地理的なピクセルの高さを返します。

概要

double precision ST_PixelHeight(raster rast);

説明

空間参照系の単位での地理的なピクセルの高さを返します。回転が無い一般的な状況では、ピクセル高は地理座標とラスタピクセルのスケール率です。

図示した関係についてはST_PixelWidthを参照して下さい。

例: 回転の無いラスタ

SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight,
 ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx,
        ST_SkewY(rast) As skewy
FROM dummy_rast;

 rastheight | pixheight | scalex | scaley | skewx | skewy
------------+-----------+--------+--------+-------+----------
         20 |         3 |      2 |      3 |     0 |        0
          5 |      0.05 |   0.05 |  -0.05 |     0 |        0
			

例: 回転が0でないラスタ

SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight,
 ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx,
        ST_SkewY(rast) As skewy
FROM (SELECT ST_SetSKew(rast,0.5,0.5) As rast
        FROM dummy_rast) As skewed;

rastheight |     pixheight     | scalex | scaley | skewx | skewy
-----------+-------------------+--------+--------+-------+----------
        20 |  3.04138126514911 |      2 |      3 |   0.5 |      0.5
         5 | 0.502493781056044 |   0.05 |  -0.05 |   0.5 |      0.5
			

関連情報

ST_PixelWidth, ST_ScaleX, ST_ScaleY, ST_SkewX, ST_SkewY