Well, you now got to know several tools for the analysis of map pairs (where I do not strictly want to stress this as a systematic nomenclature of spatial analysis functions!). Now I won't show you anything really new - disappointed?
No, wait! It is going to be a lean back case. Many of the analytical steps we took in the previous chapters can be performed with the help of a nice tool implemented since IfW 2 - the Image Calculator. Helps to compute expressions, that otherwise would require many single calls to several modules.
Designed as a regular calculator you may compute with your images using all the operators and functionality otherwise found in OVERLAY, TRANSFOR, SCALAR and RECLASS. No wonder, as the tool calls these modules in the background.
Following below a few examples of expressions, as you might be using them and to give you an idea of what and how thing can be input here.
A common error is to forget the brackets enclosing the image names and a mismatch in the number of opening vs. closing brackets.
Save expressions especially if they grow very long and complex. The files created have the extension *.EXP and can be modified or created with any plain-text editor.
The samples (the left-side name symbolizes the Output file name) reflect some of the capabilities using mathematical expressions (for the logical part see later on):
OUTPUT = MIN([IMAGE1], MIN([IMAGE2], MIN([IMAGE3], MIN([IMAGE4], MIN([IMAGE5], MIN([IMAGE6], [IMAGE7]))))))
Notice the nesting of the MIN function - computation starts from the innermost MIN pair.
OUTPUT = RAD(COS([IMAGE1]))*RAD(SIN([IMAGE2]))
OUTPUT = ((([IMAGE1]*1.34-[IMAGE2]*3.45) / ([IMAGE1]*5.34+[IMAGE2]*7.21)) * (([IMAGE3]*1.24-[IMAGE4]*6.5) / ([IMAGE3]*8.7+[IMAGE4]*2.5))) + 25.13
Pay attention to the parentheses, they determine the sequence of the calculations. As you realize, some functions accept the mixing of numbers and images as input.
SQR(4)+SQR(4)
returns? Exactly 32.00000
Now after
these mathematical expression examples have a look at the possibilities of the logical
expressions part of the Image Calculator.
They may deserve as substitute for the RECLASS function partially.
The expression as shown in the figure to the left outputs from the input DEM a boolean image, where all pixels with original heights equal to or above 800 meters receive a 1, whereas all the others become 0.
As before, again some examples should demonstrate how to use the logical part of the Image Calculator:
OUTPUT = ([GAISBERG]>=800) AND ([GAISBERG]<1000)
OUTPUT = [IMAGE1] >[ IMAGE2]
OUTPUT = ([IMAGE1]>[IMAGE2]) AND ([IMAGE3]>100) OR ([IMAGE2] >= [IMAGE3]) NOT ([IMAGE1] < 150)
last modified: | Comments to Eric J. LORUP