AnsweredAssumed Answered

Raster Calculator in Arcmap Desktop Python Script

Question asked by Mudassaralii_2k5 on Dec 17, 2019
Latest reply on Jan 8, 2020 by Mudassaralii_2k5

Dear All

 

I have a model builder in ARCMap desktop 10.5 which is executing fine. I have converted it to python script to make a batch script. But at the last step, where I am using raster calculator in model builder, getting an error. The line is

 

arcpy.gp.RasterCalculator_sa(constant_raster * float(value), rastercalc)

(where value is a variable and constant_raster is a raster dataset)

 

From the link Raster Calculator—Help | ArcGIS for Desktop  I came to know that RasterCalculator only function in model builder.

Is it any other wayaround that I could implement the raster calculator in my script?

 

Your response will be highly appreciated.

 

Thanks

 

Outcomes