Condition Examples
Color Classification
With a simple condition we can compare cell values in different bands to classify colors. For example, we can find all green cells representing parks. Note that in this workspace we use only one band in the band interpretation list, but we still can use values from all bands:
RED8
if (A[1]-A[0]>5 && A[1]-A[2]>5, 200, 255)
This expression sets cell values to 200 where green is bigger than red and blue more than by 5. The rest of the cells are assigned a value of 255.
Input
Output

Note that if we simply compare green with red and blue as follows:
if (A[1]>A[0] && A[1]>A[2], 200, 255)
then we will select not only the green cells but also cells that are rather close to gray colors.
-
See attachment: GreenFilter.fmwt