Select to view content in your preferred language

How to cut and merge many polygons at once

4976
24
01-24-2020 12:57 PM
by Anonymous User
Not applicable

I was wondering if there was a way to cut polygons using polygons from a different layer as boundaries. And then merging the cut polygons within those boundaries, while preserving attributes of whichever poly had the bigger area.

Basically the goal is to realign the blue and pink layer to the new boundaries(Green Lines)

24 Replies
MatthewDriscoll
MVP Alum

You will be able to do this with a python script.

0 Kudos
by Anonymous User
Not applicable

Any advice on what kind of script? My python skills are not the strongest

0 Kudos
DanPatterson_Retired
MVP Emeritus

A picture of your situation? 

Would a combination of tools work? Like some in the...

An overview of the Overlay toolset—Help | ArcGIS Desktop toolbox or

An overview of the Pairwise Overlay toolset—Help | ArcGIS Desktop 

and merge and dissolve-like functions

0 Kudos
by Anonymous User
Not applicable

I updated the post with a pic of the situation

0 Kudos
deleted-user-NvcfpBOWaKwr
Deactivated User

This is possible. However it could be rather labor intensive if you did it manually. Since you need to do analysis based on the area of each poly before the merge, it would be beneficial to write a python script for the process. I will go over the manual workflow on how I would accomplish this below. If this seems to be too much or your data set is too big, please let me know and I can give you a hand with a python script / tool that will get this done for you.

Step 1:

Create a field within the feature class that will contain the "Area" calculation for each polygon after they are clipped.

I'm sure you know how to do this however just I linked below on how to create, modify and delete fields in ArcGIS Pro.

Fields view—Geodatabases | ArcGIS Desktop 

Step2:

Use the clip tool to clip the polygons down based on a "Boundary" layer

This tool can be searched for in the Geoprocessing pane in ArcGIS Pro and I have also linked to the tool documentation.

Clip—Help | ArcGIS Desktop 

Step 3:

Do an area calculation on the "Area" field that was created in step one VIA "Calculate Geometry" by right clicking the field name in the attributes table. You can also access the "Calculate Geometry Attributes" tool by searching for it in the Geoprocessing pane.

Step4: 

Use the merge tool in the "Edit" ribbon within ArcGIS pro. Select the polygons that you want to merge and preserve the attributes from the polygon with the largest area. You physically have to choose which polygon to preserve the data from within the tool menu. FYI the Merge tool within the "Edit" ribbon in ArcGIS pro is not the same tool that can be found while searching for the merge tool in the Geoprocessing pane. The big difference is that the Merge within the "Edit" pane merges features while the Merge Geoprocessing tool merges datasets. 

Let me know if you would like to explore a python script option.

Hope This Helps

by Anonymous User
Not applicable

Thank you for the great response! I am very interested in exploring a python solution. The layer that needs to be adjusted has around 200,000 features so manually doing it would take quite some time

0 Kudos
by Anonymous User
Not applicable

Here is my thought process on steps so far with the goal of aligning Layer A to Layer B

  1. Cut layer A using layer B
  2. Merge the Layer A polys that are within the Layer B polys, preserving the attributes of the Layer A poly w/ the largest area
  3. If possible, expand the new Layer A polys to the boundaries of the Layer B polys ( For cases where there was no Layer A under Layer B, as in the below pic)

0 Kudos
deleted-user-NvcfpBOWaKwr
Deactivated User

Do features in each layer have information that would match, like a unique identifier, parcel number or something that can be used to match the old geometry to the new geometry? 

0 Kudos
by Anonymous User
Not applicable

Yes, the parcel number

0 Kudos