Hello! I am trying to resample a 10-meter raster to a 30-meter raster. I need to use the majority value that falls within those 30-meter grid cells. However, as I am QA'ing the outputs, it looks like it does not always pick the majority value. Now I am confused on how the majority function actually works... In my example below, there are 5 cells with a value of 110, however after I use majority resample, it picks the 174 value instead? Why is that?
Explanation on how it decides what value to use would be invaluable to me! Thanks.
Solved! Go to Solution.
Can you widen your window to encompass the nearest 16?
Majority—Calculates pixel value using the majority pixel value in the 16 nearest pixels. NoData pixels will remain unchanged in the output raster dataset.
Hi Michelle, rampling can become quite confusing. I believe the function you're using is focal, ie it calculates from a moving window across all of your cells.
I believe nlock statistics will suit your needs.
The nearest 16 would pick up the central block of 9, but I don't know the actual values of the purple cells and which ones it will pick up or what the cell weighting (if any) would be.
I will flag Steve Lynch to see if he has any commentary.