Salt & Pepper or Speckling in Raster

2590
2
Jump to solution
07-18-2012 03:43 PM
ChrisCarlson
New Contributor
So I am stumped on what seems to be a simple problem.  I have a raster that I have re-classed into 7 values of water depths.  Some of the values that were grouped in the reclassification were from a pretty wide range, so in the end I have a speckled or salt and pepper looking raster in some areas, which has been deemed unacceptable.  I'm working with a raster that is 16' in resolution, and the threshold that should be eliminated or changed to the majority neighbor value is 5000 sq.ft, which is about 19 pixels.  So if the area is smaller than 19 pixels I would like to change those values to that of their neighbor, or what they are surrounded by.  I have run a majority filter on it, with various setting with some success, but there are still outliers that need to be dealt with.  I want to maintain the resolution of the data while replacing these values with their neighbors.  I've been down the road of region grouping and have yet to understand quite where to take this in a con for example.  In the end this is going to be a shapefile, and working with a shapefile with 3 million records is not feasible.  Any ideas or suggestions would be GREATLY appreciated, the more detailed the better.  I've attached an image of the issue.
0 Kudos
1 Solution

Accepted Solutions
TadLarsen
New Contributor II
I think "Nibble" would probably work for you.

View solution in original post

0 Kudos
2 Replies
TadLarsen
New Contributor II
I think "Nibble" would probably work for you.
0 Kudos
ChrisCarlson
New Contributor
I think "Nibble" would probably work for you.


Thanks for the reply, the source of the issue was identified as some sort of projection shift in the underlying data provided for the calculations by an outside firm.  Lesson learned about trusting others data.  However, I did find a fairly good process to clean up this effect, even though in the end it was not necessary.

The process was basically as follows:

Reclassify - Reclassified in the specified depth ranges
Majority Filter -
Boundary Clean -
Region Group-
Extract or SetNull-
Nibble-
0 Kudos