I recently completed a project that involved slope, aspect, and solar radiation to find optimal rooftop locations for solar panel installations. For my final map I combined the rasters that showed the most promising rooftops based on my ranking. I get the result I want but I am also left with little single cell or a cluster of cells that I don't want. Is there a method of removing cells that don't have a neighbor or cells that are in small clusters? my goal is to clean up the rooftops and be left with the larger raster areas.

enter image description here

  • Use region group, table will have number of cells in each. You can use extract by value later
    – FelixIP
    Commented Mar 5, 2017 at 18:28

1 Answer 1


The Focal Statistics tool in ArcGIS will clean up your raster with a moving window filter.

By selecting the Majority statistic type, a pixel will only retain a value of 1 if a majority of the pixels around it also have a value of 1. (I'm assuming your raster is binary.) This will also help fill in small holes in areas that are optimal locations. You can experiment with different window sizes to see what gives you the best result.

  • Thanks for the suggestion. The Focal Stats tool worked for what I needed.
    – Krizzle
    Commented Mar 6, 2017 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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