I am in the process of shifting my raster calculations over from manually entering them into Raster Calculator to executing them in a Python script. I am curious if I can execute equations such as the following in Map Algebra, which is Python friendly:

.00001 * Power("RasterLayer1",2) - 0.0145 * "RasterLayer1" + 79.16

For some background, there will always be one raster layer that I want to perform computations with in the script, as opposed to numerous.


See What is Map Algebra and Working with Raster Objects in addition to the link in Kirk's comment. For example:

from arcpy.sa import *
inraster = Raster("rasterlayer or path to raster")
outraster = .00001 * Power(inraster ,2) - 0.0145 * inraster  + 79.16
outraster.save("path to output raster")
  • Thank you very much, I had a suspicion it would lead somewhere along these lines! – E. Weglarz Aug 4 '16 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.