English

How To: Convert shapefile polygons to polylines

Summary

For a variety of mapping and analytical reasons, converting polygons to polylines (and vice-versa) is a useful workflow in ArcGIS. All shared boundaries become one line segments, and non-shared boundaries another segment. In this article, polygons are converted to polylines by copying and pasting them in a polyline shapefile.

Note:
Polygons can be converted to polylines using the Polygon To Line or Feature To Line tools. These tools are only available with the ArcGIS Desktop Advanced license.

Procedure

Below are the steps to convert polygons to polylines in ArcMap or ArcGIS Pro:

Note:
In ArcMap and ArcGIS Pro, the polygon and polyline shapefiles or feature classes must be stored in the same location to enable copying and pasting features.
In ArcMap:
  1. Add the polygon shapefile to the map.
  2. In ArcToolbox, navigate to Data Management Tools > Feature Class > Create Feature Class.
  3. Under the Feature Class Location field in the Create Feature Class box, specify the output geodatabase or folder for the polygon feature class.
  4. Set a name for Feature Class Name.
  5. Select Polyline as the Geometry Type.
  6. In Template Feature Class, select the polygon shapefile.
  7. For the Has M and Has Z fields, select SAME_AS_TEMPLATE.
  8. For the Coordinate System, select the same coordinate system as the polygon shapefile and click OK.

    Create Feature Class dialog box

    The new polyline shapefile is created and displayed in Table Of Contents.
  9. Start an editing session to edit the shapefiles.
  10. Right-click the polygon shapefile in Table Of Contents and click Open Attribute Table.
  11. In the attribute table, click Table Options > Select All.

    Select all features in the attribute table
     
  12. In the Editor toolbar, select the Edit Tool.

    The Edit Tool
     
  13. In the map frame, right-click one of the selected polygon features and click Copy.

    Copy all the features
     
  14. Right-click the selected features again and click Paste.
  15. In the Paste dialog box, select the polyline shapefile as the Target and click OK.

    Paste dialog box
     
  16. Save the edits and stop the editing session.
  17. The polygon shapefile is converted to a polyline shapefile, and all the attributes are maintained.

    Polyline shapefile is created

In ArcGIS Pro:
  1. In the Analysis tab, click the Tools icon in the Geoprocessing group to activate the Geoprocessing pane.
  2. Navigate to Toolboxes > Data Management Tools > Feature Class > Create Feature Class.
  3. Under the Feature Class Location field in the Create Feature Class box, specify the output geodatabase or folder for the polygon feature class.
  4. Set a name for Feature Class Name.
  5. Select Polyline as the Geometry Type.
  6. In Template Feature Class, select the polygon shapefile.
  7. For the Has M and Has Z fields, select Same as the template feature class.
  8. For the Coordinate System, select the polygon shapefile from the drop-down box and click Run.

    Create Feature Class toolbox
     
  9. The new polyline shapefile is created and displayed in the Contents pane.
  10. Right-click the polygon shapefile in the Contents tab and click the Attribute Table.
  11. From the attribute table's View tab in the Selection group, click All to select all the features in the map layer.

    In the View tab for the Table, in the Selection group, click All.
     
  12. Right-click one of the features and select Copy. A load window briefly displays.
  13. In the Edit tab, click Paste from the drop-down box in the Clipboard group and select Paste Special.

    Paste Special option
     
  14. In the Paste Special dialog box, choose Template, and select the polyline shapefile created.
  15. Check the Keep source attribute values box to transfer the source attribute from the polygon shapefile and click OK.

    Paste Special dialog box
     
  16. The polygon shapefile is converted to a polyline shapefile, and all the attributes are maintained.

    Polygon shapefile is converted to polyline shapefile

Related Information