Runs a single expression built with the Map Algebra language.
Command line and Scripting
Only Map Algebra expressions that generate a raster as output are supported. Following are the functions that are not supported by SOMA, grouped functionally:
- Conversion: GRIDASCII, GRIDFLOAT
- Extraction: SAMPLE
- Multivariate: CLASSSIG, EDITSIG, ISOCLUSTER, SAMPLESIG, STACKSTATS
- Groundwater: PARTICLETRACK
- Hydrology: STREAMSHAPE
- Surface: CONTOUR, CONTOURLIST
- Zonal: ZONALGEOMETRY, ZONALSTATS
The Map Algebra expression does not support the "out_dataset = function (parameters)" syntax of traditional Map Algebra. Simply specify the function and its parameters. For example, type "slope (D:\data\surf_1, percentrise, 2)" instead of "out_slope = slope (D:\data\surf_1, percentrise, 2)".
Inputs with different spatial references can be used with Single Output Map Algebra (SOMA). The datasets will be projected on the fly to complete the analysis.
Spaces should be used between operators. For example, use "inras + 2" instead of "inras+2".
A hypen ("-") cannot be used in a dataset path or computer name. It will be interpreted as a subtract or negate operator. For example, having a machine named "serv2-ryan" would cause a problem with the following function:
int (\\serv2-ryan\data\ras1 - \\serv1\data\ras2)Similarly, a command with a hyphen in a raster name is also invalid:
int (ras-1 - ras2)
Click the Usage button to display the command line usage for all supported functions. In addition to the scroll bar, the list of functions can be scrolled with the Up and Down arrows or by typing the initial letter or letters of the command. If the function name has already been entered in the expression box, select it or place the cursor anywhere before the last character and click the Usage button to see it.
The first term in the usage display indicates the data type of the output. This includes:
- out_grid — An output float or integer raster
- out_int_grid — An output integer raster
- out_float_grid — An output float raster
Where "<grid>" is listed in the usage, any supported raster or layer can be used.
If the dataset is identified in the input raster or feature data list, it is not necessary to specify the path in the Map Algebra expression.
You can use the Browse tool to add a path to an input dataset instead of typing it out.
When building a Con or SetNull Map Algebra statement with the Single Output Map Algebra tool, use the "==" or "EQ" symbol for the equals condition. An example is:
CON (C:\data\in_ras1 == 5, 1)An SQL query used with the Con or SetNull tools will not work in the expression of the Single Output Map Algebra tool.
The results from Single Output Map Algebra are added to the table of contents for the active ArcMap session.
The maximum length of the expression is 4096 characters.