Hi All,
I am looking for a method to merge intersecting line segments over a large dataset. In figure 1, I used the method by first selecting individual line segments, followed by the tool merge (in the edit toolbar). This 'manual' approach is very time consuming and I guess a more automated approach would speed things up.
The first approach I was thinking about was using the dissolve tool. However, if I check 'Create multipart feature', all my segments are dissolved into one feature, see fig 2. And if I leave the 'Create multipart feature' unchecked, only the overlapping features are merged, but not the intersecting (tributary) lines. I also tried checking the 'Unsplit lines' box without success. Does anyone here have a recommendation?
fig 1, manual approach by selecting the polygons, then use merge in the editor toolbar.
fig 2 dissolve with 'Create multipart feature' checked
Solved! Go to Solution.
Here is a workaround that has worked for me.
1. Using the polyline layer, create a buffer (I created a 2 meter buffer with other parameters as default).
2. Dissolve the Buffer layer (Keep both "Create Multipart Features" and "Unsplit lines" unchecked).
3. Add a new field "ID" (Datetype:LONG) to the dissolved buffer layer, and transfer the "ObjectID" values to it.
4. Using Spatial Join, transfer the attributes of Dissolved Buffer polygons to the original Polyline Features.
5. Now, Dissolve the Polyline Feature (Joined) based on the "ID" field (Check "Create Multipart Features").
You lost me at "first selecting the polygons"...
There may be a way to spatially select the lines that intersect, but you'd need to start with a 'seed' line so you don't end up with what you've already done.
Hi Joe,
Thanks for pointing it out, I changed the text.
Anyways, here is the 'seed' line which I want to merge to the intersecting lines (but then of course for all clusters eventually) :
Here is what you can do.
1. Dissolve. This will create a single record consisting of all segments.
2. Then do a Multipart to singlepart. This will separate out all the disconnected segments.
Hei Jayanta,
Thank you for your reply. I did try that. The problem is it disintegrates the multipart feature (covering all the line segments) into single part features (splitting the line segments along the intersection points). This is not the result I was looking for as I am trying to merge the intersecting lines. This is what I get when I select one segment after 1. Dissolve and 2. Multipart to singlepart:
I think this gif shows what you want to do, right? It starts with a single selected segment and recursively spatially selects intersecting segments. The recursive part can be automated; you'd need to add some sort of counter to tell you when you've selected all the intersecting segments. To me, planting the 'seed' is the tough part.
Hi Joe , thanks for thinking along! This seems like a reasonable way to go. The problem here would be how to get the initial segment selected of a cluster and how the selected segments would merge in an automated approach. My intention was not to go through every cluster of intersecting segments individually as I am dealing with a large dateset.
Here is a workaround that has worked for me.
1. Using the polyline layer, create a buffer (I created a 2 meter buffer with other parameters as default).
2. Dissolve the Buffer layer (Keep both "Create Multipart Features" and "Unsplit lines" unchecked).
3. Add a new field "ID" (Datetype:LONG) to the dissolved buffer layer, and transfer the "ObjectID" values to it.
4. Using Spatial Join, transfer the attributes of Dissolved Buffer polygons to the original Polyline Features.
5. Now, Dissolve the Polyline Feature (Joined) based on the "ID" field (Check "Create Multipart Features").
Thank you Jayanta, this was indeed what I was looking for.
Thank you for this, I had similar situation, do you know by chance how to separate T-Interactions that branch off so its displayed as two separate lines?