Skip to main content
Question

How can I avoid small holes inside areas

  • January 16, 2024
  • 3 replies
  • 20 views

limo
Supporter
Forum|alt.badge.img+8

Hi all,

 

after NDVI calculation I select pixel values within a certain range. Afterwards I use a clipper to obtain only the desired area. Based on pixel values I get the following result:

imageAfterwards I used "RasterExtentsCoercer" in combination with "Generalizer" to get smooth areas.

image 

It would be nice if the very small holes (yellow example) are combined to the detected area. Only larger holes should remain! How can I do this?

 

 

 Thanks in advance

 

3 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • January 16, 2024

When looking to filter holes in areas, I normally use this method:

  1. Use a DonutHoleExtractor to seperate the holes from the outer shell.
  2. Send the holes to an AreaCalculator to get the size.
  3. Use a Tester or TestFilter to filter out the holes you want to keep based on the size.
  4. Use a DonutBuilder to recreate the original areas without the small donuts.

geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • January 16, 2024

When looking to filter holes in areas, I normally use this method:

  1. Use a DonutHoleExtractor to seperate the holes from the outer shell.
  2. Send the holes to an AreaCalculator to get the size.
  3. Use a Tester or TestFilter to filter out the holes you want to keep based on the size.
  4. Use a DonutBuilder to recreate the original areas without the small donuts.

See also this question.


limo
Supporter
Forum|alt.badge.img+8
  • Author
  • Supporter
  • January 16, 2024

When looking to filter holes in areas, I normally use this method:

  1. Use a DonutHoleExtractor to seperate the holes from the outer shell.
  2. Send the holes to an AreaCalculator to get the size.
  3. Use a Tester or TestFilter to filter out the holes you want to keep based on the size.
  4. Use a DonutBuilder to recreate the original areas without the small donuts.

thanks @dustin this works for me fine :)

I can filter out smaller holes!