Dissolve a polyline feature class so that touching features dissolve into a single feature

by Emil Brundage   Last Updated April 16, 2019 00:22 AM

I'm trying to dissolve a polyline feature class so that spatially intersecting features become a single feature. When I run the Dissolve tool, setting Create multipart features and Unsplit lines both to false, I get unexpected results. In the example below, two line features I'd hoped to dissolve into one became three line features:

enter image description here

Is there a way to dissolve a line feature class so that any touching features dissolve into one?



Answers 3


I think your problem is that you need to leave "Create Multipart Features" set to True. The line you're describing is a multi-part line. By setting "Create Multipart Features" to false, you're telling the GIS to split those lines into two features.

CStarbird
CStarbird
December 22, 2015 22:28 PM

All three or four way intersections or non-intersecting crossing lines that dissolve are by definition going to form multi-part lines, since single part lines by definition can only have two end vertices and only two segments maximum can meet at any connecting vertex.

The way to do this is as follows:

  1. Buffer the lines a very, very small amount and create a single feature (multi-part polygon).
  2. Explode the polygon buffer into its separate parts to form polygons that cover only the lines that touch within the very, very small buffer distance.
  3. Calculate a long field in the polygons to be equal to the ObjectID of each exploded polygon.
  4. Use the Spatial Join tool with the lines as the target and the polygons as the join features.
  5. Dissolve the lines created by the spatial join output using the long field from the polygon that has the ObjectID of the polygon as the Dissolve field (Case field). Make sure the Create Multipart feature option is checked and the line ends option is unchecked.

You will end up with what you are looking. Every lines that touches another line at any crossing or intersection of any kind will have merged into a single polyline feature. These polyline features will nonetheless be a multi-part line feature anytime a line crossing or 3-way or greater intersection exists.

Richard Fairhurst
Richard Fairhurst
December 23, 2015 00:59 AM

I think you will get what you want if you set both Create multipart features and Unsplit lines to TRUE (on). That unsplits contiguous lines but does not create discontiguous multipart features.

fionag11
fionag11
April 16, 2019 00:09 AM

Related Questions


Updated May 14, 2015 22:09 PM

Updated July 25, 2015 13:09 PM

Updated August 20, 2015 20:09 PM

Updated July 27, 2016 08:09 AM

Updated October 16, 2016 08:09 AM