Question:medium

A typical conditional function has the form:
Output = CON (test, out if true, out if false)

What will be the reclassified output if the following conditional reclassification function Output = CON (Layer P < 3, Layer Q, Layer R) is applied on the three input raster layers P, Q, and R?

Layer P
131
052
425
Layer Q
xxy
xxx
xxy
Layer R
bbb
abb
abb

Show Hint

Apply the CON rule cell by cell: if Layer P is less than 3 at a cell, take the Layer Q value there, otherwise take the Layer R value there.
Updated On: Jul 20, 2026
  • xby
    xbx
    axb
  • xby
    xxb
    axb
  • xby
    xxx
    xxy
  • xbx
    xbx
    axb
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Build a Boolean test mask from Layer P before touching Layer Q or Layer R.
The rule Output = CON(Layer P $<$ 3, Layer Q, Layer R) is really a two stage process: first make a True or False grid from the condition P $<$ 3, then use that mask to pick between Q, where True, and R, where False. Layer P is row1 = (1, 3, 1), row2 = (0, 5, 2), row3 = (4, 2, 5). Testing each value gives the mask row1 = (T, F, T), row2 = (T, F, T), row3 = (F, T, F).

Step 2: Overlay the mask on Layer Q and Layer R separately.
Layer Q = row1 (x,x,y), row2 (x,x,x), row3 (x,x,y). Keeping only the cells where the mask is True from Q: row1 gives x at position 1 and y at position 3; row2 gives x at position 1 and x at position 3; row3 gives x at position 2 only. Layer R = row1 (b,b,b), row2 (a,b,b), row3 (a,b,b). Keeping only the cells where the mask is False from R: row1 gives b at position 2; row2 gives b at position 2; row3 gives a at position 1 and b at position 3.

Step 3: Merge the two partial grids back together, position by position.
Row 1: position 1 from Q = x, position 2 from R = b, position 3 from Q = y, giving (x, b, y). Row 2: position 1 from Q = x, position 2 from R = b, position 3 from Q = x, giving (x, b, x). Row 3: position 1 from R = a, position 2 from Q = x, position 3 from R = b, giving (a, x, b).

Step 4: Compare the merged grid to the four options.
The merged grid, (x,b,y) / (x,b,x) / (a,x,b), is a cell for cell match with option (A) only. Options (B), (C) and (D) each break the mask in at least one cell, most commonly by using Q where the mask should have been False, or vice versa.

\[ \boxed{\text{Option (A) is correct}} \]
Was this answer helpful?
0