Boolean Operations

Rasters can be produced that indicate “truth values” or Boolean3 values, in cells. A “1” stands for TRUE. A “0” stands for FALSE. Suppose you were interested in knowing which cells in Basic_Raster were greater than or equal to 25.

____ 17. Calculate Basic_Raster >= 25. “Basic_Raster >= 25” is a statement that is either true or false, correct? The result, name it True_or_False, will have a 1 (for TRUE) in those cells that were 25 or more. A zero will appear in the other cells, as you can see from the T/C, the Identify tool, and the attribute table. (The CellTool may indicate ND for NoData; ignore it.)

The Boolean operators are as follows:

- AND (shown in the expression as &),
- OR (the inclusive OR, shown in the expression as |),
- XOR (the exclusive OR, shown in the expression as ^), and
- NOT (shown in the expression as ~).

The Comparison operators are as follows:

- Greater than (shown in the expression as >),
- Less than (shown in the expression as <),
- Greater than or equal to (shown in the expression as >=),
- Less than or equal to (shown in the expression as <=),
- Equal to (shown in the expression as ==),
- Not equal (shown in the expression as !=),

The Boolean operators may be used in general expressions as well. Zero values are assumed to be FALSE. Nonzero values are considered TRUE.

____ 18. Subtract 25 from Basic_Raster to make the raster Bas_Ras_minus_25. Look at the attribute table of the result. From the attribute table, how many values of zero are there? ...

Start Free Trial

No credit card required