An overview of the map algebra operators

Mit der Spatial Analyst-Lizenz verfügbar.

Mit der Image Analyst-Lizenz verfügbar.

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 Analyst 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 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 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 ArcPy operator is used.

Operators by category

The available operators are listed by category in the following table.

Map algebra operatorDescriptionImage Analyst geoprocessing 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

Verwandte Themen


In diesem Thema
  1. Operators by category