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.
Here is the orignal dataset with the lines split, a single line feature is highlighted
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.
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:
Created a very small buffer polygon around the lines (0.1 metres) to make sure there was crossover between the lines that were connected.
Use the dissolve tool with the Unsplit option checked. This created individual polygons for each of the connected line groups.
Create a unique ID for each polygon.
Use the spatial join tool to add the unique polygon ids to each line that intersects or is within the polygons.
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.
No comments:
Post a Comment