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)
Solved! Go to Solution.
Hi Dan,
Thanks for your reply,
I used raster calculator with this statement and it worked.
Con("Raster_1" == "Raster_2","Raster_1",0)
Best regards,
Ame
An overview of the Conditional math toolset—Help | ArcGIS Desktop
provides several tools for condition checking. They can be used in combination if needed
You can use the
Set Null—Help | ArcGIS Desktop
Setting values to NoData with Set Null—Help | ArcGIS Desktop
The examples should help.
You might want to look at the
Hi Dan,
Thanks for your reply,
I used raster calculator with this statement and it worked.
Con("Raster_1" == "Raster_2","Raster_1",0)
Best regards,
Ame
Good... There are a lot of similar answers on geonet that can be found once the key terms are known.