Available with Spatial Analyst license.

Available with Image Analyst license.

Map Algebra supports a series of operators. The operators can be grouped into Arithmetic, Bitwise, Boolean, and Relational categories. The Map Algebra operators are available with the ArcGIS Spatial Analyst license and the ArcGIS Image Analyst license.

The operators are overloaded since they exist in the Spatial Analyst ArcPy module, the Image Analysis ArcPy module, and as standard operators in Python. 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"). The available operators and their categories are listed in the table below.

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 ArcPy 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, the Python operator is used; if a raster is input, the Spatial Analyst ArcPy operator is used.

Map Algebra operator | Description | Spatial Analyst geoprocessing tool | |
---|---|---|---|

Arithmetic | |||

+ (link) | Addition | ||

+ (link) | Unary Plus | N/A | |

- (link) | Subtraction | ||

- (link) | Unary Minus | ||

* (link) | Multiplication | ||

** (link) | Power | ||

/ (link) | Division | ||

// (link) | Integer Division | N/A | |

% (link) | Modulo | ||

Bitwise | |||

<< (link) | Bitwise Left Shift | ||

>> (link) | Bitwise Right Shift | ||

Boolean | |||

& (link) | Boolean And | ||

~ (link) | Boolean Complement | ||

| (link) | Boolean Or | ||

^ (link) | Boolean Exclusive Or | ||

Relational | |||

== (link) | Equal To | ||

> (link) | Greater Than | ||

>= (link) | Greater Than or Equal To | ||

< (link) | Less Than | ||

<= (link) | Less Than or Equal To | ||

!= (link) | Not Equal To |