You are here: Home > Articles

How to determine and change the directions of complex (multipart) lines


All lines have a direction that is usually a function of the order in which vertices were entered (i.e. the direction in which the line was digitized). For most applications the direction of the line is not important, but there are times when it is necessary to check or change the direction of lines. This article is a step by step description of how to do this. Throughout this article I use the example of a river because rivers have inherent direction (they flow in one direction).

Checking line direction

It is very easy to determine the direction of lines. In ArcMap, all that is needed is to change the line symbol. Figure A shows a shapefile of a river segment - it is a single line and the attribute table shows only one record. To show the direction of the arc, we open the symbol editor and select the symbol called "Arrow at end" as shown here:

When that is applied to this example, we get Figure B. This needs a little explaining because it is not initially obvious why the arrow is placed in the middle of the line. In this example, the portion of the river to the left of the arrow appears to have been digitized from left to right, whereas the portion to the right of the arrow has been digitized from right to left. And the two halves were merged into a single line feature.

Our objective, then, is to modify this line so that all the parts are oriented in the same direction. This is a surprisingly simple procedure.

Step 1: Start Editing. We need the editor toolbar in ArcMap to be visible (right click on empty toolbar space at the top of ArcMap and select "Editor").

Make sure the Target field shows the river layer, the Task says Modify Feature, and the tool you have active is the Edit Tool (the small arrowhead shown above). Left click on the line, and it will be selected as shown in Figure C. (Don't worry if it does not look exactly like this: here the green squares are vertices and the red square is a node).

Step 2: Explode multipart feature. ArcMap has a built in tool to split multipart features into the constituent parts. It is on the Editor, More Editing Tools..., Advanced Editing toolbar.

On that toolbar press the button called "Explode Multi-part Feature":

The result of this is shown in Figure D - we see two arrowheads now because we have two lines. Now it is very clear that the two lines were digitized in opposite directions.

Step 3: Flip the orientation of one of the features. Using the same Edit Tool, we select one of the lines, as shown in Figure E. We right click on that feature, and select "Flip" from the drop-down menu that appears. The result of this is shown in Figure F.

Step 4: Save Edits. It is essential to save the edits at this point, otherwise the next step does not work. Go to Editor, then Save Edits.

Step 5: Merge the two lines again. Use the Edit Tool to select both (or all) the lines as shown in Figure G. Then go to Editor, Merge. You will see a new dialog box appear asking you which feature to merge - just press OK. The result of this is shown in Figure H: we see a single arrow at the end of the river.

Step 6: Save edits, stop editing. Go to Editor, Save Edits. Then Editor, Stop Editing. This completes the editing operation. The final result is shown in Figure I.

















Author: Hawthorne Beyer (

  Home   |   Hawth's Tools   |   Articles   |   Services