In this section, we will introduce two basic operations involving rasters: performing mathematical operations between overlapping rasters and reclassifying the values of a raster into new aggregated categories.
In many cases, when we have two or more overlapping rasters, we would like to apply a certain function on each pair, triplet, and so on of overlapping pixels in those rasters. As a result, we will get a new raster, where the value of each pixel is the result of the latter function on the respective pixels in the input rasters. Such operations are also referred to as raster algebra, usually when using straightforward arithmetic notation (such as r+s
, where r
and s
are rasters) or overlay operations.
There are numerous functions that can be used in raster algebra expressions, including arithmetic operators (such as +
, -
, *
, and /
), logical operators (such as >
, >=
, <
, <=
, ==
, and !
), and several simple...