# ラスタ計算機¶

The Raster Calculator in the Raster menu (see figure_raster_2) allows to perform calculations on basis of existing raster pixel values. The results are written to a new raster layer with a GDAL supported format.

Figure Raster 2:

ラスタ計算機

The Raster bands list contains all loaded raster layers that can be used. To add a raster to the raster calculator expression field, double click its name in the Fields list. You can then use the operators to construct calculation expressions or you can just type it into the box.

**結果レイヤ**セクションでは、出力レイヤを定義する必要があります。入力ラスタレイヤに基づいて、またはX、Y座標と出力レイヤの解像度を設定するための行と列に基づいて計算領域を定義することができます。入力レイヤが異なる解像度をもつ場合、値が最近傍アルゴリズムを用いてリサンプリングされます。

The Operators section contains all usable operators. To add an operator to the raster calculator expression box, click the appropriate button. Mathematical calculations (+, -, *, ... ) and trigonometric functions (sin, cos, tan, ... ) are available. Stay tuned for more operators to come!

With the Add result to project checkbox the result layer will automatically added to the legend area and can be visualized.

## 例¶

メートル単位の標高からフィート単位の標高を作成する, ここでメートルからフィートへの変換ファクタは3.28です.式は次のとおり:

`[email protected] * 3.28`

マスクの利用

If you want to mask out parts of a raster, because you are only interested in elevations above 0 meter, you can use following expression to create a mask and apply the result to a raster in one step.

`([email protected] >= 0) * [email protected]`

For every cell greater than or equal to 0, set its value to 1, otherwise set it to 0. This creates the mask on the fly.