raster_calculator
Perform map algebra by binding rasters to aliases and writing Python expressions to compute new rasters. Requires Spatial Analyst.
Instructions
Map algebra. Bind rasters to short names, then write a Python expression over them. Requires the Spatial Analyst extension.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rasters | Yes | Alias to layer name or path, e.g. {"dem": "elevation", "slp": "slope.tif"}. | |
| map_name | No | Map to act on; defaults to the active map. | |
| add_to_map | No | Add the result to the map. | |
| expression | Yes | Expression over the aliases, e.g. "(dem - 100) / slp". arcpy.sa functions such as Con, Abs and Log are available by name. | |
| output_path | Yes | Where to save the result raster. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |