Select to view content in your preferred language

Raster calculator

2193
11
Jump to solution
01-29-2018 06:22 AM
FelixSchwarz
Emerging Contributor

Hello,

is it possible to combine 2 rasters with the raster calculator defining the value of the rasters? It should look more or less like this but at the moment i'm getting an error for the expression.

Thanks for answers

0 Kudos
11 Replies
DanPatterson_Retired
MVP Emeritus

There are multiple conditions Felix, to handle them all it requires you break things down into steps.  separating mixed forest is one, With one species, that can be handled by a single Con statement.  It is the multiple conditions that necessitate the many steps.  

Hence Xander's last lines in his script looping through the species and doing the Con

XanderBakker
Esri Esteemed Contributor

In addition to what Dan Patterson mentioned, in case a "Mixed Forest" requires the existence of more than 1 species and a certain value (>20, is this % coverage?) a situation o 0% of one species and 30% of another will yield a value > 20, but does not mean that there are actually two or more species. 

Apart from validating "AlnusSpp" +  "BetulaSpp" and "AlnusSpp" +  "CarpinusSpp", the script will not validate "BetulaSpp" +  "CarpinusSpp" nor "AlnusSpp" +  "BetulaSpp" +  "CarpinusSpp", when this may also yield a value > 20 and could represent mixed forest.

It could be better to create for instance a binary raster per species that represents its existence and sum those rasters. Those pixels that have a value of 2 or higher will have more than 1 species. Use a sum of all original rasters to validate the condition > 20.