2

I have a polygon layer that has donuts and also exterior parts. Using python, I am able to get access to each part, but what I would like to know is using arcpy, once I have a part, how do I go about deleting all the vertices for that part. This is what I have enter image description here

and this is what I would like to end up with enter image description here

  • If you can safely assume the first multi-part ring is the largest, then you could rewrite the shape with the first ring. Unfortunately, that's one of those ass-u-me assumptions that tend to backfire. Anyway you do it, you'll be using a cursor to either update the current shape or (preferably) inserting a new row into a disimproved feature class with the trucated geometry. – Vince Jan 6 '16 at 22:43
  • You should have a look at this q&a. – Hornbydd Jan 7 '16 at 0:34
  • Even though it's not really an arcpy solution, the Eliminate Polygon Part tool does exactly what you want. It requires an Advanced license. – GISGe Jan 7 '16 at 7:38
1

You can delete entire geometry parts without having to delete each vertex. Refer to this page on python access to shapes and interior rings from ArcGIS Help There is also a GP tool that will remove the doughnut holes. It is on GitHub

As far as deleting parts of a multi-part feature, you will need a strategy for identifying the part you want to delete. Size (absolute or relative) or # of vertices are options, as is a spatial relationship to other features (intersect with FC to see if it overlaps anything). Provide more detail in the question and perhaps some ideas will pop up...

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.