Hello!
I have a feature class of almost 2,000 road lines that are split at every intersection and every bridge.
I need to merge the roads together by the name of the road and the proximity of each line.
For example, in the photo below, I would like to merge each of the 3 frontage road areas circled in red into 3 groups. In each group, there are currently multiple segments of frontage road (blue is selected, pink is unselected). I do not want to merge the feeder roads into the frontage road segment.
Here is the attribute table with all the frontage road segments selected:
And here are the selected frontage road segments:
I've been merging all the segments by hand using the Merge tool in the Edit features pane, however this is very time consuming.
Is there a way to build a script that uses the MSAG_Name field to merge together contiguous line segments with the same MSAG_name?
I was thinking of some sort of if, then statement, such as if MSAG_Name = MSAG_Name AND segments are within 10 ft of each other, then merge. But I am very unfamiliar with Python or other coding languages, so I do not know how to write that myself.
The Pairwise Dissolve tool does not totally solve my problem because then all the features with the same MSAG_Name dissolve into 1 feature, but I need to retain the contiguous segments.
Solved! Go to Solution.
@TrinityShuler02 Try Dissolve gp tool using MSAG_name as Dissolve Field. Pay special attention to the parameters:
Change the parameters to get your desired output.
REF: How Dissolve works
@TrinityShuler02 Try Dissolve gp tool using MSAG_name as Dissolve Field. Pay special attention to the parameters:
Change the parameters to get your desired output.
REF: How Dissolve works
This did not solve my issue, I need to be able to merge features together within a certain distance, not just features touching vertices.
The three blue lines are within about 10 ft from one another, I would want all four of those segments to be included with the pink line feature.
OK, you will likely end up with multi-part features if you don't fill in the gaps.
Try:
Also try, adding a flag field for the Buffer10FT. Repeat the dissolve with: MSAG_name and Buffer10FT as Dissolve Fields.
@TrinityShuler02 Curious if you got this to work? Please post the solution for others in the community.