# Combining two raster layers with ArcGIS Raster Calculator?

So I am trying to join/merge two raster layers that have values of either 1 or 0. I am using the following command in in ArcGIS Raster Calculator:

``````Con(("urban" == 1) | ("mixed" == 1), 1, 0)
``````

The new raster layer is missing cells from the "urban" raster layer, I have no idea why this is happening.

I have also tried the following commands with the same result:

``````("urban" == 1) | ("mixed" == 1)
``````

or

removing all the cells equal to 0 in both layers and then:

``````"urban" + "mixed"
``````
• Did you try to use " & " instead of " | " for combining the conditions? Feb 27, 2017 at 12:29
• I have tried that, a get a raster layer with cells only equal to 0. The cells that are equal to 1 in both layers are not overlapping, so there are no cases where both conditions are true, hence I am using "|" Feb 27, 2017 at 12:47
• Have you tried simply adding the two rasters "urban" + "mixed" without removing the 0 cells? You'll end up with 0+1, 1+0 or 0+0. The result will be grid with 1s and 0s since urban and mixed are mutually exclusive. Removing 0s may be causing you trouble. Feb 27, 2017 at 16:26

``````Out_Raster = SetNull((Abs(IsNull("urban")-1)+Abs(IsNull("mixed")-1))<1,(Abs(IsNull("urban")-1)+Abs(IsNull("mixed")-1)))
• `IsNull("urban")` returns 0 for data values and 1 for nulls.
• `Abs(IsNull("urban")-1)` will make nulls into 0 and other cells into 1 by subtracting 1 and taking absolute value.
• `(Abs(IsNull("urban")-1)+Abs(IsNull("mixed")-1))` Compiles all 1 values from both datasets.
• I then feed this ugly expression `(UGLY_EXP)` into a `SetNull(UGLY_EXP<1,UGLY_EXP)` to set all the 0 values to null and other cells to 1.