A Better Way to Join Polylines

We’ve all been there.  It’s crunch time and you encounter hundreds or maybe thousands of individual line segments that should be continuous polylines.  Perhaps they are contours or tax lots, or maybe street center lines.  The end points are snapped together, but when you try to select them or perform some operation on them, you get thousands of individual lines, or hundreds of unconnected polylines.

Certainly, you would never create data like this, but we’ve all encountered it; DXF exports from other software, bad conversions from GIS, or inexperienced digitizing.  You can use the tedious method – the Polyline Edit > Join command, but that doesn’t always work, it can take a very long time to perform on many different polylines, and you have to manually select all of the objects to join, each time you use it.

There is a much better, but often overlooked way to do this in the Drawing Cleanup suite of tools.  These powerful tools are part of Map 3D, and therefore also part of Civil 3D.  You will find the Cleanup icon to launch the Drawing Cleanup Dialog Box on the ribbon; from eitherGeospatial Workspace it is on the Map Edit panel of the Tools tab.  You can also launch the Drawing Cleanup Diaolg Box by entering the command mapclean.

11

Once you’ve launched the dialog box, you only need complete a few simple “steps” to join all of the contiguous line (or polyline) segments into single polylines.

Step 1 – select which objects to perform the operation on.  You can select individual objects, select entire layer(s), or select by object class properties.  In this example, I’ve selected all objects on the layer “C-ROAD-CNTR”.

12

Step 2 – select which cleanup operation you wish to perform.  One reason this powerful feature is not more widely known is the cryptic name they’ve given it – Dissolve Pseudo Nodes.  A better name might have been “Join Objects Into Polylines”, because that’s what it does.  It takes individual line segments, polyline segments or arcs, or any combination, and connects them all together into a contiguous poyline (provided the endpoints of each individual piece share the same coordinates).

13

Notice that there are options to perform the cleanup operation either automatically, or interactively.  If you use the default setting of Automatic, you only have one more step.

Step 3 – select how you want the action performed.  You can modify the original objects, or you can create new objects on a new layer.  Whenever I modifiy someone else’s data, I try to keep an “audit trail” of orginal data, so this is a very useful and recommended feature.

14

Notice that you have other options here.  Suppose you had one type of object that you wish to convert into another type of object, such as Arcs into Polylines, or 3D Polylines into Polylines.  A few clicks and you’re done, even on thousands of entities!

Click the Finish button and all of the new, joined, contiguous polylines are a on a new layer called “NEW-ROAD-CNTR”, and all of the original objects are still on the layer “C-ROAD-CNTR”.

The next time you encounter a mess of individual bits and pieces that should be contiguous polylines, try this method.  It can save you hours!

There are a great many tools in the geospatial workspaces, (or under the old Map pull-down menu), that have tremendous utility to users beyond GIS and mapping professionals.  You can learn about many of them in our Digging Into Map 3D training books; editions are available for versions from 2011 all the way back to 2005.

Leave a Comment