2

In my job, I am currently getting excel files with multiple polygon features in point format. Converting this to points, and then to a line feature class works absolutely fine when using the ID as the joining field. However, some of the files in receiving contain hundreds of polygons in 1 deck. when converting the line feature class to a polygon it creates all the polygons I need, however, it also creates extra polygons for any overlapping features, and on larger decks, it makes it almost impossible to manually find these extra polygons to delete.

When keeping them as lines, it makes labeling all of the features a pain as it will not create a label in the center of the feature as it is only lines.

I was wondering if anybody knew a method to convert this data to polygons without the overlap and extra polygon creation happening. From the research I've done, it seems like I would need to create a script. I am just starting a Python course so it will be a while before I understand it all enough to create my own

this is a very basic example of the type of excel file I am sent just for reference, the grids have just been dragged down to populate the field.

enter image description here

This is an example of what happens when converting the line features to a polygon. Do not have access to ArcMap on my home computer so cannot show images of the problem on ArcMap enter image description here

1

1 Answer 1

3

INPUT:

enter image description here

Workflow: Copy your lines to in_memory workspace and add very-very long text field. Populate it using using:

!Shape!.JSON

enter image description here

Buffer lines into in_memory feature class and use:

!LONG_TEXT!.replace("paths","rings")

to recalculate this long field:

enter image description here

Compute Shape field of buffers using:

arcpy.AsShape( !LONG_TEXT! , True)

OUTPUT:

enter image description here

Hopefully this is what you want, unless you'd like to remove overlapping parts completely. If this the case Intersect polygons (just 1 item in dialog) and use output as erasers.

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.