Title: Overview of EX5 AND Some Boolean Logic
1Overview of EX5ANDSome Boolean Logic
- OR
- Some hints on how to stay out of trouble
2Whats Boolean processing
- Its using Boolean Logic to solve problems
3Truth Tables
4MULTIPLE OPERATIONS
- If you AND multiple images you get only the areas
where 1 appears in ALL layers! - If you OR multiple images you get only the areas
where 1 appears in more than one image - If you XOR multiple images you get only the areas
where only 1 layer has 1s.
5Boolean Site Selection
- Make BOOLEAN images of acceptable areas
- AND them all together using CALCULATOR or in a
Model - Result is a BOOLEAN image of OK areas
- ADD them all together using CALCULATOR or in a
Model - What is result if, for example you have 4 such
images? - 0 where unacceptable, 1,2,3, or 4 where
acceptable - A side benefit - now you know how many factors
were in the acceptable areas -- 4 has got to be
good! - Sometimes one method is better than another!
6LOGIC
7AND Acceptable areas
8OR Acceptable areas
AOK OR SOK OR EOK OR WOK
9XOR Acceptable areas
AOK XOR SOK XOR EOK XOR WOK
10Order make a difference?
- Can! so use parenthesis to separate logic
statements
AOK XOR EOK XOR SOK
AOK XOR SOK XOR EOK
11Logical combinations
AOK AND ( SOK OR EOK)
(AOK AND SOK ) OR EOK
12An Example of trouble
- A is 1 where topsoil is clay loam,
- B is 1 where soil pH gt 7.0, and
- C is 1 where soil is poorly drained
- (A AND B) OR C is 1 where (topsoil is clay loam
AND pHgt7.0) OR the soil is poorly drained - A AND (B OR C) is 1 where topsoil is clay loam
AND (pHgt7 OR soil is poorly drained)
13 Using Boolean Logic is not the only way!
14What about ADDing booleans
- In what way is the addition of the 4 binary
levels better for decision making? - 1 means ONLY 1 of the constraints was good
- 4 means all for were (best choice?)
AOK SOK EOK WOK
15Another method
- Use binary values in the images
- 1, 2, 4, 16 ..
- Possible values are
- 14 5
- 124 7
- 2 16 18
- Max value is 12416 23
- The combinations are unique
16How is this better?
AOK EOK10SOK100
17How is this better?
- 111 area where all 3 criteria are good
- 101 AOK SOK criteria are good
- 11 AOK EOK are good
111
101
110
18How is this better?
- 111 area where all 3 criteria are good
- 101 AOK SOK criteria are good
- 11 AOK EOK are good
As long as you are using booleans this will work
because the only possible values for each binary
are 1 and 0. Thus the image can only have the
values 1, 10, 11, 100, 110, and 111 You can tell
at a glance what is good and what is not in one
image!
111
101
110
19Summary
- Applying Boolean logic is the most efficient way
to do site selection types of processing - But be careful that you do it correctly
- Estimate what the image should look like
- Check it
- Keep Boolean processing simple one step at a
time until you get better at it. - But remember that Boolean Logic is not the Only
way!
20OVERLAY
- With the addition of the CALCULATOR to IDRISI the
OVERLAY function becomes less important - But it is still a valuable tool.
- So what does it do?
21Overlay Dialog
22Cover
- It is essentially an UPDATE tool.
- An image with a window of zero value is placed
over another image. - The data under the window comes through and into
the resulting file WITH the stuff outside the
window
23Cover
1
0
Unacceptable areas in Black
over
When slope overlaid on perc rate get combined
unacceptable areas BECAUSE 1s in perc rate came
thru the window of 0s in slope image
get
24Cover
First covers second
25What is COVER used for!
- For finding areas acceptable or unacceptable
- For UPDATING an image.
- Something has changed and you need to edit part
of your image - make a binary mask (zero where new data goes)
- multiply times old data
- OVERLAY this image on top of new data
- This is basically the hard way to do it
262 Problem Solutions
- Finding the best place to grow coffee
- Finding the best place to grow corn
- Very different processes used
27Example 1
- Lands best suited for making Growing coffee
beans - Work from bottom up
- Notice that the units for each map work ( if they
dont you have a problem!)
28Example 1
29Example 2
- This one is really different
- Find the best place to grow corn
- Start from middle this time
- Note that this analysis is all based on CLASSED
data
30In the Modeler
- Boolean operators
- AND is AB
- OR is AB, relcass 2 to 1
- XOR is AB, reclass 1 to 0, 2 to 1
- NOT is reclass 1 to 0, 0 to 1
- How to make sub-modules
31Sub Models
- Make a Model that does something like do an XOR
of two Boolean images
32Sub Models
- Make a Model that does something like do an XOR
of two Boolean images
33Sub Model 2
- Save the model
- THEN save it as a sub-model
- You get this modal dialog
34Sub Model 2
- Save the model
- THEN save it as a sub-model
- You get this modal dialog
CLICK OK!
35Apply the Sub-Model
- Make a model and insert the sub-model
36A Demo works better!