AnsweredAssumed Answered

Looking for a comparison tool, opposite to Diff

Question asked by Zelada on Jul 31, 2018
Latest reply on Jul 31, 2018 by Dan_Patterson

Hello, 

 

I have two rasters, and I'm looking to perform a pixel-by-pixel comparison.

If Raster A = Raster B, I want the output to be the value of Raster A (or B).

If they are different I want the output to be NaN, or 0.

 

Basically I need the opposite of Diff:

If the values on the two inputs are different  (EQUAL), the value on the first input is output. If the values on the two inputs are the same (DIFFERENT), the output is 0.

 

Any suggestions?

 

Thanks very much

 

EDIT:

 

I used raster calculator with this statement and it worked.

Con("Raster_1" == "Raster_2","Raster_1",0)

Outcomes