ENVISION includes a mathematical expression language that can be used to evaluate map-based mathematical expressions. This is used in a variety of “standard” plug-ins, and can be accessed using user-defined plug-ins. This language allows for expressions that can contain:

• Algebraic operators (e.g. add, subtract, etc.)
• Logical operators (e.g. logical AND, logical OR, etc. )
• A variety of mathematical functions (e.g. sin, cos, etc.)
• Field references for accessing IDU-level field information (e.g. AREA, IDU_INDEX, POPDENS)
• Expression precedence grouping using parentheses.

Available operators and functions are specified below.

OperatorDescriptionExample
* Subtraction and unary minus1-2
* Multiplication 1*2
/ Division 1/2
^ Power 2^2
% Modulo 2%1
& Logical AND MYFIELD & 2
| Logical OR MYFIELD | 2
! Logical NOT ! MYFIELD
>, >= Greater or equal to MYFIELD > 3
<, <= Less than or equal to MYFIELD <= 3
!= Not equal MYFIELD != 3
== Equal MYFIELD == 3
OperatorReturn ValueExample
abs(x) Absolute Value of xabs(-12) => 12
acos(x) Inverse Cosine of x (radians)
asin(x) Inverse Sine of x (radians)
atan(x) Inverse Tan of x (radians)
avg(x,y,z...) Average value of the argumentsavg(1,3) => 2
ceil(x) Value of x rounded up to nearest integerceil(2.3) => 3
cosh(x) Hyperbolic cosign of x (radians)
floor(x) Value of x rounded down to nearest integerfloor(2.3) => 3
if(cond,trueEx, falseEx)Conditional expression - if 'cond' is true, return value of 'trueEx', otherwise, return the value of 'falseEx'
log(x) Natural Log of x
log10(x) Log base 10 of x
max(x,y,z,…) Maximum value of the argument list
min(x,y,z,…) Minimum value of the argument list
rand(x) Uniform Random value between (0,1)
rand(min, max) Uniform Random value between (min,max)
round(x) Value of x rounded to the nearest integer