Map and Table Calculation

XOR operator

Returns if either a or b exclusive is true, i.e. a XOR b.

Syntax

(a) XOR (b)

Input

a is a boolean expression
Domain type: any Bool domain
b is a boolean expression
Domain type: any Bool domain

Output

XOR returns: a boolean value, i.e. True, False or undefined
Domain: system domain Bool

Notes:

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

MapCalc examples:

OutMap = (InMapA >= 20) XOR (InMapB >= 70)

 

InMapA

InMapB

OutMap

5 10 -10
20 0 30
? 40 45
10 90 70
5 50 75
35 80 ?
False True True
True False False
? False ?

 

OutMap2 = (Landuse="Forest") XOR (DEM > 1000)

 

Landuse

DEM

OutMap2

Forest Forest Grass
Lake Lake Grass
? Grass Forest
800 900 1000
-900 0 1200
1100 1300 1600
True True False
False False True
? True False

TabCalc examples:

OutCol = (InColA >= 20) XOR (InColB >= 70)

 

InColA

InColB

OutCol

5

10

False

10

90

True

-10

70

True

20

5

True

0

50

False

30

75

False

?

35

?

40

80

False

45

?

?

 

OutCol2 = (Landuse="Forest") XOR (DEM > 1000)

 

Landuse

DEM

OutCol2

Forest

800

True

Forest

900

True

Grass

1000

False

Lake

-900

False

Lake

0

False

Grass

1200

True

?

1100

?

Grass

1300

True

Forest

1600

False

See also: