Hello, For example, I have two grids (A and B). I would like to remove from GridA any cells that have a value in GridB. Grids A and B occupy the same space but measure different things. What is the best way to perform this operation? I was not having success googling the issue.
You could do this with Con or SetNull depending upon what you want. Both are documented in SA's help file.
Con ("Grid B" < 0, 0, "Grid A"): This means where Grid B is less than zero use zero, otherwise use Grid A. But this would require an additional step of making the values "null".
So, can I use two "InGrids" with SetNull? For example, SetNull("Grid B", "Grid A"). Would this equate as set null all values of Grid B and use only non-overlapping values of Grid A.
Just to point out there is no one answer to your question, and how Map Algebra is used is often a choice of style...
I prefer using the "not" operator.
You can also use the output of IsNull explicitly, as it returns 1/0 (true/false) values.
I'm a big fan of the Con tool because it is so flexible, especially when combined with IsNull. (In the expression below, if you leave off the third argument, any cell evaluating to False returns NoData in the output.)