Description Usage Arguments Details Value Examples
Perform Raster Calculations with arcpy.sa.
1 |
expressions |
A named list of raster calculation expressions to be executed in sequence. The names must be valid python object names. |
inrasters |
A named list of file paths to rasters to be loaded
prior to performing the calculations listed in |
outrasters |
A named list of file paths to save rasters
resulting from the calculations in |
Note that this function exposes the arcpy.sa
namespace, rather than importing all functions from
arcpy.sa
into the global environment. Therefore,
calls to arcpy.sa
functions in the expressions
argument must include the namespace, e.g. arcpy.sa.Log10
rather than simply Log10
.
No return value; raster files listed in outrasters
will be saved.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
input.rasters = list(inras = "path/to/input/raster")
temp.rasters = list(
firstras = "inras > 5",
secondras = "arcpy.sa.Power(firstras, 2)",
thirdras = "arcpy.sa.Log10(secondras)"
)
output.rasters = list(thirdras = "path/to/output/raster")
sa_calc(temp.rasters, input.rasters, output.rasters)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.