Here is a screenshot to show the data I am working with:
These gaps are road right of ways that I would like to fill in. However since there are multiple polygons, I don't know of an easy way to fill in these holes and still keep the polygon boundary integrity in tact. Any help would be greatly appreciated!
I don't think this would be trivial. These are multipart polygons I guess? They're not really 'gaps' or holes in a polygon, as they appear to be separate intact features. How would you describe what rules would you put in place for a tool/script to decide where to join them?
The only real rule I have is that I would like it to follow the general outline of the feature. So for instance wherever a feature was split by a road, that would be closed by a line connecting the two nearest polygon parts. See the red lines in the image below:
Check if the following steps work for you.
If you have the Area of Interest layer (single polygon), then you may skip step 1 and 2. This will act as your bounding box.
1. Dissolve the Polygon Feature Class. Keep the "Dissolve Field" parameter blank. Keep "Create Multipart Features" option checked.
The output feature should be an identical feature class with single record.
2. Run Minimum Bounding Geometry, keeping the dissolved layer as input.
3. Run Union keeping the original layer and the bounding box (or AOI polygon) as inputs.
If you have used the Bounding Box Geometry tool, you may need to delete the excess part. For this, you need to split the road boundary polygons, wherever required. After the Splitting process is completed, select the outer excess boundary and delete.