HOW TO

Convert shapefile polygons to polylines

Last Published: September 7, 2021

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 for Geometry Type (optional).
  6. In Template Feature Class (optional), 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.
The Create Feature Class window displaying the Feature Class Location, Feature Class Name, Geometry type, Template Feature Class, Has M, Has Z and Coordinate System parameters.

The new polyline shapefile is created and displayed in Table Of Contents.

  1. Start an editing session to edit the created polyline shapefile.
  2. Right-click the original polygon shapefile in Table Of Contents, and click Open Attribute Table.
  3. In the attribute table, click Table Options > Select All.
The Select All option is displayed when clicking Table Options in the attribute table.
  1. In the Editor toolbar, select Edit Tool.
The Editor toolbar displaying the Edit Tool option.
  1. On the map, right-click one of the selected polygon features, and click Copy.
The Copy option is displayed when right-clicking the selected features.
  1. Right-click the selected features again, and click Paste.
  2. In the Paste dialog box, select the created polyline shapefile created from steps 2 through 8 as the Target and click OK.
The Paste window displaying the selected polyline feature as the Target.
  1. Save the edits and stop the editing session.
  2. The polygon shapefile is converted to a polyline shapefile, and all the attributes are maintained.
Polygon shapefile is converted to polyline shapefile, and all the selected attributes are maintained in the attribute table.

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 Dataset, 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.
The Create Feature Class window displaying the Feature Class Location, Feature Class Name, Geometry type, Template Dataset, Has M, Has Z and Coordinate System parameters.

The new polyline shapefile is created and displayed in the Contents pane.

  1. Right-click the original polygon shapefile in the Contents tab, and click Attribute Table.
  2. On the top ribbon, under the Table section highlighted in green, click the attribute table's View tab in the Selection group, and click All to select all the features in the map layer.
In the View tab for the Table, in the Selection group, click All.
  1. On the View tab, click Copy > Paste drop-down arrow > Paste Special.
Paste Special option displayed on the View tab.
  1. In the Paste Special dialog box, select Template, and select the created polyline shapefile from steps 2 through 8.
  2. Check the Keep source attribute values check box to transfer the source attribute from the polygon shapefile, and click OK.
The Paste Special window displaying the Template section and selected polyline feature.
  1. The polygon shapefile is converted to a polyline shapefile, and all the attributes are maintained.
Polygon shapefile is converted to polyline shapefile, and all the selected attributes are maintained in the attribute table.

Article ID: 000018461

Software:
  • ArcMap
  • ArcGIS Pro

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options