Résumé
Performs an arithmetic operation between two rasters or between a raster and a scalar and returns a raster object with the operation applied.
Discussion
For more information about how this function works, see the Arithmetic raster function.
Syntaxe
Arithmetic (raster1, raster2, {operation_type}, {extent_type}, {cellsize_type})
Paramètre | Explication | Type de données |
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.
(La valeur par défaut est Plus) | String |
extent_type | The method to use to compute the extent of the output when the input rasters have different extents.
(La valeur par défaut est FirstOf) | String |
cellsize_type | The method to use to compute the cell size of the output when the input rasters have different cell sizes.
(La valeur par défaut est FirstOf) | String |
Type de données | Explication |
Raster | The output raster with the arithmetic operation applied. |
Exemple de code
Multiplies two rasters and uses the total extent of the inputs.
import arcpy
new_raster = arcpy.sa.Arithmetic("Raster1.tif","Raster2.tif", "Multiply", "UnionOf", "FirstOf")
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?