Raster-based data analysis has become one of the important aspects of spatial data analysis. It is widely used in site selection, planning, hydrology, and other fields. I have learned and summarized some articles by myself, and hope to share them with you to learn and make progress together.
In the first article, we will start with the algebraic arithmetic operation of raster data to give you a perceptual knowledge of raster data.
1. Data Preparation
To perform map algebra, we first create two constant raster data, and use ArcGIS create constant raster to create constant Raster with values of 2 and 3, respectively. The size of the grid unit is 25, 10 rows, and 10 columns.
The display effect is as follows:
2. Starting from the arithmetic operations of Map Algebra
From an early age, we began to get familiar with arithmetic operations. How is the arithmetic operation of raster data performed?
Let's take a look at raster calculator, the grid computing tool of ArcGIS.
Grid computing in ArcGIS is mainly carried out in this tool. The functions of the tool will be detailed later. Let's take a look at arithmetic operations (double-click to select a computing layer and click to select an operator ):
Add (+)
Calculation Result: the number of all raster values is 5.
Minus (-)
Calculation Result: All grid values are 1.
Multiplication (*)
Calculation Result: the number of all grids is 6.
Except (/)
Calculation Result: because it is an integer raster, the result is calculated according to the integer in the same way as the division in the computer. If the division is performed, the raster data must be of the float type.
3. Implementation principle of Map Algebra and arithmetic operations
The map algebra operation is to perform addition, subtraction, multiplication, and Division operations on grids of the same geographical location and unit size. The following are two 3*3 raster sum operations.
3*3 Calculation of raster data
4. Differences between map algebra and Algebra
Map Algebra is the algebraic sum of values in cells at the corresponding spatial positions in two layers. in algebra, only the addition and subtraction of matrices are the algebraic sum of elements at the corresponding positions, multiplication, division, start, and power operations are not operations corresponding to positions. That is to say, Map Algebra must follow the one-to-one conversion rules for positions. The raster values can be modified accordingly, but the positions cannot be transposed or moved.
Note: The version of ArcGIS is 10.x.