Select to view content in your preferred language

multidimensional raster, multiply variable in all the raster

1023
2
Jump to solution
11-03-2022 08:59 AM
Labels (1)
PaoloGallo2
New Contributor

I need to multiply the variable of a multidimensional raster (file .crf) by a fixed value, for example 2, in all the rasters it contains (about 8000).

Raster calculator works only for the most recent raster.

How can I do?
Thank you very much.

Paolo

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

Times (Spatial Analyst)—ArcGIS Pro | Documentation

In ArcPy, if one of the inputs is a multidimensional raster and the other input is a constant, the tool will perform the operation for all slices for all variables using the constant value, and the output will be a multidimensional raster.

If this is what you describe, try the tool dialog first, if that doesn't work, then use arcpy with a call to the tool functionality


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Times (Spatial Analyst)—ArcGIS Pro | Documentation

In ArcPy, if one of the inputs is a multidimensional raster and the other input is a constant, the tool will perform the operation for all slices for all variables using the constant value, and the output will be a multidimensional raster.

If this is what you describe, try the tool dialog first, if that doesn't work, then use arcpy with a call to the tool functionality


... sort of retired...
0 Kudos
PaoloGallo2
New Contributor
II solved using ArcPy:

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/"
outTimes = Times("name.crf", 1.82)
outTimes.save("C:output.crf")

Thank you

0 Kudos