Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run the majority filter in ArcGIS Desktop with a window size of 4 or 5 i.e. greater than the default 3.

Is it possible, or is there some other command (or tool) which might help me achieve that?

share|improve this question
up vote 4 down vote accepted

A Focal Majority function does a very poor job at establishing a MMU. I would recommend using a sieve approach. This will provide an exact defined MMU.

I believe that GDAL has a sieve model and it is also available in our Gradient Metrics ArcGIS Toolbox. It is an easy procedure to implement. The ArcGIS steps for using sieve to establish a minimal mapping unit of 10 cells are, more or less, as follows:

MinCells = 10
tmp1 = RegionGroup(InRaster, "EIGHT", "WITHIN", "ADD_LINK", "") 
  query = "VALUE > " + minCells
tmp2 = ExtractByAttributes(tmp1, query)
outraster = Nibble(InRaster, tmp2)
share|improve this answer
Thanks Jeffrey, I will test out both approaches (Focal Vs Gradient Metrics toolkit) and check out the differences in my area. – user1186 Mar 7 '13 at 17:55
You were right, the sieve tool provides much better results! Thanks for the excellent toolkit. Just one query, the 'minimum cells in mapping unit' parameter in the sieve tool defines the height/width of a square window, right? – user1186 Mar 25 '13 at 7:31

Try using the Focal Statistics tool with a Majority rule. It allows you to set a variety of window shapes, sizes, etc.

share|improve this answer
Focal Statistics is quite universal - for example I needed the same as user1186 (larger kernel size than 3x3) and Focal Statistics with Mean rule was perfect. +1 – Pavel V. Mar 7 '13 at 14:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.