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?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
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)
Try using the Focal Statistics tool with a Majority rule. It allows you to set a variety of window shapes, sizes, etc.