Map and Table Calculation

AND operator

Returns if both a and b are true, i.e. a AND b.

Syntax

a AND b

Input

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

Output

OR 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) AND (InMapB >= 70)

 

InMapA

InMapB

OutMap

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

 

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

 

Landuse

DEM

OutMap2

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

 

OutMap3 = (Landuse="Grass") AND (Geomorphology="OL")

 

Landuse

Geomorphology

OutMap3

Forest Forest Grass
Lake Lake Grass
? Grass Forest
GS GL OL
GV ? OL
AF AL HE
False False True
False False True
False False False

TabCalc examples:

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

 

InColA

InColB

OutCol

5

10

False

10

90

False

-10

70

False

20

5

False

0

50

False

30

75

True

?

35

False

40

80

True

45

?

?

 

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

OutCol3 = (Landuse="Grass") AND (Geom="OL")

 

Landuse

DEM

Geom

OutCol2

OutCol3

Forest

800

GS

False

False

Forest

900

GL

False

False

Grass

1000

OL

False

True

Lake

-900

GV

False

False

Lake

0

?

False

False

Grass

1200

OL

False

True

?

1100

AF

?

False

Grass

1300

AL

False

False

Forest

1600

HE

True

False

Example with an attribute table:

ResVal = (Parcel.Landuse = "Residential") AND (Parcel.Commval > 20)

Parcel

ResVal

1 2 3
4 5 6
7 8 9
False False False
True False False
True False True

 

Attribute table Parcel

Parcelnr

Landuse

CommVal

1

Residential

10

2

Commercial

35

3

Industrial

20

4

Residential

25

5

Industrial

35

6

Commercial

15

7

Residential

40

8

Industrial

30

9

Residential

35

The map ResVal is created from a map (presumably with parcels) which has an attribute table Parcel. This attribute table has a column Landuse and a column CommVal (commercial values). When a record in the table is Residential in column Landuse, and has a commercial value larger than 20000 in column CommVal, then the expression is true and True is assigned to the corresponding pixels in map ResVal.

See also: