0

I am working in ArcGIS and I have an urban center boundary, generated by a population-grid dataset. However, I want to fill in the gaps inside the urban center boundary (see the image below areas marked with red).

Any ideas to do this task?

enter image description here

AlexBar
  • 19
  • 3

1 Answers1

3

Create a copy of your features, apply following field calculator expression on field Shape, using Python parser:

def outRing(shp):
 part=shp.getPart(0)
 pgon=arcpy.Polygon(part)
 return pgon

------------------------

outRing( !Shape!)

When working on shapefile, no need to switch editing on.

FelixIP
  • 22,922
  • 3
  • 29
  • 61
  • Seems there's a similar question here : http://gis.stackexchange.com/questions/66049/removing-only-donut-holes-from-polygons-using-arcgis-desktop?rq=1 but it didn't find an answer like @FelixIP's. That seems a nice piece of coding :) – gisnside Oct 16 '16 at 19:17
  • Although @FelixIP's code didn't work (i used the code version with !shape!), I solved the problem by using the feature to polygon tool. – AlexBar Oct 17 '16 at 00:37
  • @FelixIP, I think it will patch the right hand side one but not the other. – fatih_dur Oct 17 '16 at 02:24
  • @AlexBartzokas, do you mind sharing how you did resolve this issue by using Feature to Polygon? – fatih_dur Oct 17 '16 at 02:25
  • 1
    @fatih_dur agree, because left hand polygon is very special case of "donut" that is not the donut in my opinion. Feature to polygon, yeah right – FelixIP Oct 17 '16 at 02:32
  • Hi! By using the Feature to polygon, the outcome was the following: – AlexBar Oct 17 '16 at 14:10
  • http://image.prntscr.com/image/12efe6198fe54068b4a7b0ad3cdbc5b8.png – AlexBar Oct 17 '16 at 14:11