Select to view content in your preferred language

Resample raster using majority of pixels

1356
5
Jump to solution
08-19-2019 05:17 AM
KK2
by
New Contributor III

I would like to resample a raster dataset using a majority of my input pixels. There is a function called "Resample>Majority"; however, it does not do what I want. Lets say that I have a raster with 1 meter resolution and from this raster I would like to evaluate 10 meter raster, where the 10 meter pixels will represent the major value in the input dataset. So, my output 10 meter pixel should be evaluated from 100 pixels in my input 1 meter resolution data. So, if among of  these 100 pixels the major value is e.g. "7" then this value should be used in the 10 meter raster.

Is it possible to do this in ArcMap? Thank you in advance for some advise how to do this.

0 Kudos
1 Solution

Accepted Solutions
ChrisRingo
Occasional Contributor

If I understand your question correctly,, you should be able to use Block Statistics for that. Using your example, it will calculate the majority over unique 10m x 10m windows, rather than the majority over moving windows centered at each 1 meter pixel. I.e., each 10x10 block will have the same value, which you can then resample to 30m.

View solution in original post

5 Replies
DanPatterson_Retired
MVP Emeritus

Did you try a Focal Majority with a 10x10 window then the resample?

0 Kudos
KK2
by
New Contributor III

Yes, I have tried it, but it is not giving me the results I want. After applying the focal majority as an output I still have "single 1 meter resolution pixels" classified to different class than the neighbours, so when I convert it to 10 meter resolution I will not know who the value for the output 10 meter raster will be selected.

0 Kudos
ChrisRingo
Occasional Contributor

If I understand your question correctly,, you should be able to use Block Statistics for that. Using your example, it will calculate the majority over unique 10m x 10m windows, rather than the majority over moving windows centered at each 1 meter pixel. I.e., each 10x10 block will have the same value, which you can then resample to 30m.

KK2
by
New Contributor III

Thank you for you answer. Yes, it is exactly what I am looking for. The only issue I have found when applying this function is that it produces "null" values for some pixels.

0 Kudos
ChrisRingo
Occasional Contributor

Oh that's right, I forgot about that annoyance. The neighborhood and zonal tools just pick a value if there's a tie, this one gives you a null value. If you need to get rid of them, you can use IsNull and then SetNull to create a mask that identifies the null values, and then use that mask in Nibble to fill them with the neighboring values. Kind of a pain.

0 Kudos