I'm really stumped with the problem. I have a polygon layer with no intersects or holes and I need to remove some 'islands', as defined by attributes of a certain size within the layer.

It's a hard thing to explain, so refer to the picture below. The different colors represent different attributes within my layer. What I need to do is remove the orange islands of certain size (less than 5000m²) that do not share border with an Orange, Green or Neon polygon.

Polygon Island Issue

I cannot simply select all of the orange polygons under a certain size because that would remove some polygons that make up large areas of polygons.

I can't dissolve the orange than remove polygons under a certain size because I will lose the individual polygon shapes which are extremely important.

I am really stumped here guys, I'll take a simple solution or any advice. I am pretty handy with python so if you think a programming solution is best let me know.

  • Have you resolved this issue? if not, let me know. – user15553 Feb 26 '13 at 14:20
  • 1
    Yes I have, please look at answer 3 – Cody Brown Feb 26 '13 at 15:19

It sounds like you have two criteria for removal:

  1. Feature must have area < 5000 m²
  2. Feature must not be touching an orange, green, or neon polygon.

The way I would do this:

  1. Make a copy of the layer.
  2. In the copy, apply a definition query using attributes to only include the orange, green, and neon polygons.
  3. Use Select Layer by Location on the original layer with the copy as the Select Feature and the BOUNDARY_TOUCHES parameter. The resulting selection will include only polygons that touch at least one orange, green, or neon polygon.
  4. Invert the selection. The resulting selection will include only polygons that do not touch any orange, green, or neon polygons.
  5. Use Select Layer by Attributes to query polygons with area < 5000 m², with the SUBSET_SELECTION parameter. The resulting selection will include only polygons that are less than 5000 m² and do not touch any orange, green, or neon polygons.
|improve this answer|||||
  • Thanks for the great awnser. I knew it wouldn't be a complex solution, but for some reason I just couldn't connect the dots. Testing your plan out now. – Cody Brown Nov 15 '12 at 17:41
  • It's a solid idea, but the Select by Location is an issue. There is the same orange shape in both the original and the copy, so it will always touch the boundary. – Cody Brown Nov 15 '12 at 18:30
  • 1
    @CodyBrown Ah, that's true. Nice job in your answer figuring out a workaround for the issue. I'm glad I could help. – dmahr Nov 15 '12 at 20:06

Props to @dmahr for getting my head moving on this problem. It turns out it was an super easy fix.

  1. Create a copy of the layer
  2. Select all the features will less than 5000m² of area in the copy
  3. Select all the features will greater than 5000m² of area in the original
  4. Use select by location to remove from the selection of copy any features that intersect between the copy and the original.

And that does it.

|improve this answer|||||

Take a look at the Aggregate Polygons tool. It has useful options to set: the minimum area for an aggregated polygon and the minimum hole size to be retained.

|improve this answer|||||
  • 1
    oops, too late :-) – nadya Nov 15 '12 at 20:00
  • Seems like this would have definitely solved my issue as well! – Cody Brown Nov 15 '12 at 20:11
  • I really like this suggestion, I feel like it would do a better job. BUT, aggregate polygons also expands the polygons correct? How would I get past that as I want to keep the shapes the same as they are now, but removing any islands under 5000 m²? – Cody Brown Nov 16 '12 at 14:13
  • As I remember, it keeps shapes. I think that setting minimum area > 5000 should help. – nadya Nov 17 '12 at 19:48

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.