ArcGIS Desktop – How to Unsplit/Dissolve Multiple Touching Lines in Stream Network

arcgis-10.0arcgis-desktopdissolveline

I am trying to dissolve multiple lines for stream networks into individual features. The dataset contains many stream networks so a complete dissolve of the whole dataset wont do as I would like to only dissolve streams that are in the same network (illustrated in the pictures below).

I've tried using the Unsplit Line tool and the Dissolve tool in ArcGIS 10. The tool will only join two lines together, i.e. lines that share a common end point. This is illustrated in the screenshots below.

enter image description here

Here is the orignal dataset with the lines split, a single line feature is highlighted

enter image description here

This is the same feature highlighted after using the unsplit/dissolve tool. As you can see it has only joined two lines together rather than all of the lines that are touching.

The features in the same network do not have a common attribute either.

Best Answer

I've devised a way of doing it with little bits from all of the other answers.

The scripts that @GeoJohn and @FelixIP have created may well work (if you have access to ArcGIS 10.1 and the database access functions), so if someone else had this problem please check those options out as well.

I did the following in the end:

  1. Created a very small buffer polygon around the lines (0.1 metres) to make sure there was crossover between the lines that were connected.

  2. Use the dissolve tool with the Unsplit option checked. This created individual polygons for each of the connected line groups.

  3. Create a unique ID for each polygon.

  4. Use the spatial join tool to add the unique polygon ids to each line that intersects or is within the polygons.

  5. Use the dissolve tool again to dissolve the lines based on the unique ID.

That has worked for me but like I said the scripting methods may be preferable for other people.

enter image description here

Related Question