Skip To Content

An overview of the Map Algebra Operators

Available with Spatial Analyst license.

To distinguish whether an input is a raster as opposed to a scalar variable, the input raster is cast using the Raster class: Raster("inRas").

In operators that accept two inputs, if both inputs are scalars, the Python operator will be used working on scalars. If one or both of the inputs are rasters (identified by casting with the Raster class), the Spatial Analyst operator is used and will work on each cell within the rasters. For those operators that accept a single input, if it is a scalar, then the Python operator is used; if a raster is input, the Spatial Analyst operator is used.

Map Algebra operatorDescriptionSpatial Analyst GP tool
Arithmetic

+ (link)

Addition

Plus

+ (link)

Unary Plus

N/A

- (link)

Subtraction

Minus

- (link)

Unary Minus

Negate

* (link)

Multiplication

Times

** (link)

Power

Power

/ (link)

Division

Divide

// (link)

Integer Division

N/A

% (link)

Modulo

Mod

Bitwise

<< (link)

Bitwise Left Shift

Bitwise Left Shift

>> (link)

Bitwise Right Shift

Bitwise Right Shift

Boolean

& (link)

Boolean And

Boolean And

~ (link)

Boolean Complement

Boolean Not

| (link)

Boolean Or

Boolean Or

^ (link)

Boolean Exclusive Or

Boolean XOr

Relational

== (link)

Equal To

Equal To

> (link)

Greater Than

Greater Than

>= (link)

Greater Than or Equal To

Greater Than Equal

< (link)

Less Than

Less Than

<= (link)

Less Than or Equal To

Less Than Equal

!= (link)

Not Equal To

Not Equal

Related topics