I have five input rasters and I'm using map algebra to find areas where all of them have a value over 75, areas where all of them are over 25, and areas where one or more are under 25. I can do this with:

Con((Raster("RISK-CH.tif") > 74.9) & (Raster("RISK-MI.tif") > 74.9) & (Raster("RISK-RE.tif") > 74.9) & (Raster("RISK-SE.tif") > 74.9) & (Raster("RISK-SO.tif") > 74.9), 100, Con((Raster("RISK-CH.tif") > 24.9) & (Raster("RISK-MI.tif") > 24.9) & (Raster("RISK-RE.tif") > 24.9) & (Raster("RISK-SE.tif") > 24.9) & (Raster("RISK-SO.tif") > 24.9), 50, 0))

The problem is that all of my rasters are slightly different shapes and sizes, and some have small holes, but I dont want to completely discount areas with no data. The output is the size and shape of the smallest input. I won't allow them to make the highest category, but if all the available datasets are above 25 I want the cell to still make my middle category.

I've tried using

((Raster("RISK-CH.tif") > 74.9) | IsNull(Raster("RISK-CH")))

but that gives me the exact same output, I've tried

((Raster("RISK-CH.tif") > 74.9) | (Raster("RISK-CH.tif") IS nodata))


((Raster("RISK-CH.tif") > 74.9) | (Raster("RISK-CH.tif") = NODATA))

but both of these throw errors.

Is the issue to do with my boolean logic, or can a raster calculator output not be larger than the smallest inputs?


You can change the environment settings for your processing tool.

For a "one shot", click oon the environment > processing extent > union of inputs (or specify your own extent)

If you want this choice to be remembered, go to the menu > geoprocessing > Environment settings.

In Python, you can set the environment using arcpy.env

  • Thanks @radouxju but that doesn't seem to change the result. I don't think its an extent issue because the holes in the small raster also appear in the output. Sep 18 '15 at 7:57
  • 1
    You mentioned that the output had the size of the smallest raster, so this at least should solve part of your problem. For the second problem, I usually try to avoid very long "con" string because its difficult to pick up errors. In your case, the workaround could be to reclassify zero/ones rasters using "IsNull()" ," > 75" and " < 25 " , then you sum the three sets of rasters and you can extract your classes in an easier way
    – radouxju
    Sep 18 '15 at 8:06

Mosaic to new raster using union of inputs. Set extent to this raster. Reclass all 5 into 0, 1, 2, 4, with zero replacing nodata. Use combine rasters to get unique combinations

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.