Some 3rd party software cannot handle polygons with holes (donut polygons). To find them I always use ArcView 3 field calculator, because:

enter image description here

however when I try to do this in ArcMap, I get this:

enter image description here

How do I make it right in ArcMap?


2 Answers 2


Part count will not yield the correct answer. You could have a multi-part polygon with no holes. See image below for scenario.

Multi-part polygons

This would have been a simple query pre-ArcGIS 10 as you could have called ArcObjects to ask if the polygon had a hole but ESRI have removed much of this support in the VBScripting environment to the point its pretty useless now, bit of a shame really...

Anyway you can solve this question with some Python:

def hasHole(geom):
  parts = geom.partCount
  boundaries = geom.boundary().partCount
  if boundaries > parts:
    return 1
    return 0

In the expression box you would place the following:


If you are referring to the difference between the two expressions, it looks like the bottom one is using Python as the parser where as the one on top is using VB. To change this in the Field Calculator window in ArcGIS, just select VB instead of Python and the top expression should work.


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.