Resumen
Performs an arithmetic operation between two rasters or between a raster and a scalar and returns a raster object with the operation applied.
Debate
For more information about how this function works, see the Arithmetic raster function.
Sintaxis
Arithmetic (raster1, raster2, {operation_type}, {extent_type}, {cellsize_type})
Parámetro | Explicación | Tipo de datos |
raster1 | The first input raster. This can be a scalar raster where all pixels have the same value. | Raster |
raster2 | The second input raster. This can be a scalar raster where all pixels have the same value. | Raster |
operation_type | The arithmetic operation to apply between the two input rasters.
(El valor predeterminado es Plus) | String |
extent_type | The method to use to compute the extent of the output when the input rasters have different extents.
(El valor predeterminado es FirstOf) | String |
cellsize_type | The method to use to compute the cell size of the output when the input rasters have different cell sizes.
(El valor predeterminado es FirstOf) | String |
Tipo de datos | Explicación |
Raster | The output raster with the arithmetic operation applied. |
Muestra de código
Multiplies two rasters and uses the total extent of the inputs.
import arcpy
new_raster = arcpy.ia.Arithmetic("Raster1.tif","Raster2.tif", "Multiply", "UnionOf", "FirstOf")