I have vectorized the Corine Land class raster and want to select certain classes that are "inside" other classes.

Example: selecting polygons circled in blue

How can I select the polygons circled in blue?

All the select by location options do no work since there are no overlaps.

Explanations per the comments: What you see is the area around Barcelona, Spain. the red outlines urban polygons, consisting of several types of CLC classes that have been polygonized from the original Corine raster. The green polygons are "green" areas in and around the city. CLC, as a raster dataset, has only one class for every 100*100 meter pixel through the whole of Europe. What I'm trying to do is select "green" polygons that are completely surrounded by "urban" polygons, and then export them as a separate layer.

  • 1
    Is your data multi-part? If so you need to convert it to single-part before you can do any processing. What do you want to happen in the scenario of a land class within a land class within a land class... Finally its not clear if you want to find all internal land classes within a specific class or all internal classes within all classes?
    – Hornbydd
    Sep 3, 2013 at 14:22
  • 1
    Here is some VBA code that will drop interior rings from polygons, this should get you going.
    – Hornbydd
    Sep 3, 2013 at 14:49
  • 3
    @Hornbydd Duncan, these are raster data. HDunn: it is unclear what your map is showing. The circled regions don't look like anything is actually "inside" anything else, because there is (cartographically) only one kind of polygon visible, drawn in green. The rest looks like linework, having no "inside" or "outside." Could you please describe more clearly what you are trying to do, or at least explain your map so we can understand it as you intend?
    – whuber
    Sep 3, 2013 at 15:50
  • 1
    Have a look at this thread on the ESRI forum, seems very relevant.
    – Hornbydd
    Sep 4, 2013 at 16:05

1 Answer 1


This can be done in a few steps using "polygon neighbors":

  1. run polygon neighbour to compute the length of the surrounding polygons.
  2. summarize the resulting table base on the src_ID field to get the count of the neighbors and the total length of contact
  3. join this table to your polygons : if the count is one and the perimeter of your polygon equal the total length, then the polygon is surrounded.

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.