import arcpy from arcpy.sa import * # settings (paths to input and output data) rasname1 = "Y:/Path/To/Input/Data.gdb/2010cl3" # edit this rasname2 = "Y:/Path/To/Input/Data.gdb/2013cl5" # edit this rasnameout = "Y:/case13/first/scrap_db.gdb/outputras" # grab a SA license if arcpy.CheckExtension("Spatial") == "Available": arcpy.CheckOutExtension("Spatial") else: exit("No SA license available...") # make Raster objects for easy processing ras1 = arcpy.Raster(rasname1) ras2 = arcpy.Raster(rasname2) # apply math rasout = (Int(ras1 / 10) * 10) + Int(ras2 / 10) # save the result to disk rasout.save(rasnameout)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.