[GIS] Combine multiple binary rasters to a single raster

rasterraster-calculator

I have 5 different species richness maps which I am trying to join in order to show one cohesive map. Each species raster layer has values of 1 and 0; 1 if the species lives there and 0 if the species does not.

In other words, I want something like this:

if species 1==1,1
if species 2==1,2
if species 3==1,3

And so on until I reach 5. I want everything else to be classified as a 0.

I am very new to using raster calculator and am unsure how to set this up.


I just realized that this will not work since the species will overlap. I will need to figure something else out.

Best Answer

That's a simple add raster calculation. You just add them all together (r1+r2+r3+r4+r5) and the result is a raster where the value indicates how many species are present at each cell. You can't differentiate species, but that wasn't part of the original question.

If you want to do that, you need to use something like the Combine tool in ArcGIS (Spatial Analyst). This will create a new raster with a unique value for each unique combination of values in the inputs. That unique value, if properly keyed, will identify which species are present in combination based on the unique values.

Related Question