What I want to do is to get rid of 'dark' objects which are on the green areas.

My input looks like this:

enter image description here

And I want my result to look like here:

enter image description here

Raster value of green is 1, the rest has 0 value. As You can see - I have the result, but i don't know wich tool in ArcMap I should use for this?


You can use the Majority Filter to remove cells that are surrounded by your green cells. This would also influence the boundary of your dominant green area as this tool works a local level.

In your sample image which I guess you have spoofed up you have dropped a wide range of hole sizes, how were you deciding which would stay and which would go? I can even see an example of green surround by black surrounded by green...

You give no indication of the size of the is problem, is it the whole of Brazil or an area in a small Icelandic national park? You should always state that sort of thing in your question as it will dictate any answer.

Having said that I can think of one approach, I'm sure there are others. Convert you binary raster to a polygon dataset, go into edit mode, select the polygon with the holes and then delete out the interior rings via the sketch properties window.

| improve this answer | |
  • Thanks! The tool You mentioned (Majority Filter) was very helpful here. – icelandico Jan 27 '17 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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