How to revalue incorrect rasters?

590
3
12-16-2019 06:36 AM
LarsHammer
New Contributor

I've attached an example raster image of sea ice concentrations that I am working with. In this case, only the blue and orange rasters are correct values. I'm curious if there is a way to do some sort of neighborhood analysis that will revalue rasters based on the values of their neighbors. For example if a black raster is in the center of a 3 x 3 grid and has 6 blue neighbors and 2 orange neighbors, I would like that middle raster to be blue. If black center raster has 5 orange neighbors and 3 blue, I would like it to be orange. For the purpose of getting an answer lets say 4 orange and 4 black neighbors would be orange. Any way of doing this? Thanks!

Sorry if this is in the wrong place, I'm new here and would take any suggestions for improvement

0 Kudos
3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Have you ruled out some of the 'focal' statistics that are available.  Perhaps a focal majority with an appropriate window size and shape

Focal Statistics—Help | ArcGIS Desktop 

0 Kudos
LarsHammer
New Contributor

Thanks for the reply. I think I may have figured it out. First used 'set null' function to show black, grey, and white rasters as no data. Then used 'nibble' to revalue. It looks like it's doing what I want!

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Yes nibble would probably be best given a chosen focal window may not apply to all areas.

For people that aren't familiar with how it works, it is described here

How Nibble works—Help | ArcGIS Desktop 

0 Kudos