Select to view content in your preferred language

compare two raster and find which pixels were removed

1335
2
Jump to solution
06-08-2014 10:05 PM
Leo_KrisPalao
Emerging Contributor
Hi ArcGIS users,

Good Day!

I want to compare my two rasters: 1) a reference raster and 2) a raster that result from merging different rasters. What I did was to clip the reference raster with all the administrative boundaries (around 81 shapefiles) - so it produces 81 raster layers. Then when I compare the sum of the clipped rasters per province the number of pixel count were reduced (~200 pixels). So what I did was to merge again all the clipped raster so I can compare it with the reference raster. And as I initially suspect, there are discrepancy on the pixel count. I need to locate where are the pixels that were removed, but I cannot find an appropriate tool. can somebody help me on this?

Hope my query is clear!

Thanks,
-Leo
0 Kudos
1 Solution

Accepted Solutions
JimCousins
MVP Regular Contributor
Leo,
Use a con() statement in the raster calculator.
Using: Ref_Raster and Result_Raster
Con(IsNull(Result_Raster), Ref_Raster)
so, where the condition exists that the Result_Raster is null, return the cell value of the Ref_Raster. If the Ref_Raster is null also, you get nothing returned. If the Ref_Raster has a value at that cell, you will get the value returned, so, you end up with a raster that only shows values where the Result_Raster is null, and the Ref_Raster is not null.
Best Regards,
Jim

View solution in original post

0 Kudos
2 Replies
JimCousins
MVP Regular Contributor
Leo,
Use a con() statement in the raster calculator.
Using: Ref_Raster and Result_Raster
Con(IsNull(Result_Raster), Ref_Raster)
so, where the condition exists that the Result_Raster is null, return the cell value of the Ref_Raster. If the Ref_Raster is null also, you get nothing returned. If the Ref_Raster has a value at that cell, you will get the value returned, so, you end up with a raster that only shows values where the Result_Raster is null, and the Ref_Raster is not null.
Best Regards,
Jim
0 Kudos
Leo_KrisPalao
Emerging Contributor
Hi Jim,

It worked perfectly. Thanks

-Leo
0 Kudos