Select to view content in your preferred language

Trying to trim multiple features within one feature layer based on each feature's shape area

265
1
12-07-2025 06:48 AM
Labels (2)
AbdullahN
New Contributor

So what I'm essentially trying to do is trim road polygons that are overlapping depending on road areas (the larger roads trim the smaller ones).

The closest tool i found to do this is the Remove Overlap (multiple) using center lines, however, I don't understand how it decides which road gets trimmed as it seems random, sometimes a local road trims a high way (i tried sorting the features by shape area to a new layer but that didn't change anything). 

 

Any help would greatly be appreciated.

0 Kudos
1 Reply
JamesPoeschel
Frequent Contributor

If you wanted to avoid python you could try doing an area-ranked erase :

1. Create an area-ranked field

In the code block you can put something like this:

def priority(area):
    if area > 5000:
        return "Big"
    elif area > 1000:
        return "Medium"
    else:
        return "Small"

But change the area values to what works. 
  And above it, 
priority(!Shape_Area!)

2. Then split into separate fc by category. Roads_Big, Roads_Medium, Roads_Small. 
3. Then erase the medium sized fc by the largest. So you get trimmed medium roads as the output. Then merge that with the large roads fc. 
4. erase the smallested by the merged output (big fc + trimmed medium fc)

I dont think there are out of the box tools for what you need. But if you need to do this often you can make a model builder. Or in python you can make a script that compares overlapping polygons and erases the smaller one by the larger one. 

0 Kudos