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
- Add the polygon shapefile to the map.
- In ArcToolbox, navigate to Data Management Tools > Feature Class > Create Feature Class.
- Under the Feature Class Location field in the Create Feature Class box, specify the output geodatabase or folder for the polygon feature class.
- Set a name for Feature Class Name.
- Select POLYLINE for Geometry Type (optional).
- In Template Feature Class (optional), select the polygon shapefile.
- For the Has M and Has Z fields, select SAME_AS_TEMPLATE.
- For the Coordinate System, select the same coordinate system as the polygon shapefile, and click OK.
The new polyline shapefile is created and displayed in Table Of Contents.
- Start an editing session to edit the created polyline shapefile.
- Right-click the original polygon shapefile in Table Of Contents, and click Open Attribute Table.
- In the attribute table, click Table Options > Select All.
- In the Editor toolbar, select Edit Tool.
- On the map, right-click one of the selected polygon features, and click Copy.
- Right-click the selected features again, and click Paste.
- In the Paste dialog box, select the created polyline shapefile created from steps 2 through 8 as the Target and click OK.
- Save the edits and stop the editing session.
- The polygon shapefile is converted to a polyline shapefile, and all the attributes are maintained.
In ArcGIS Pro
- In the Analysis tab, click the Tools icon in the Geoprocessing group to activate the Geoprocessing pane.
- Navigate to Toolboxes > Data Management Tools > Feature Class > Create Feature Class.
- Under the Feature Class Location field in the Create Feature Class box, specify the output geodatabase or folder for the polygon feature class.
- Set a name for Feature Class Name.
- Select Polyline as the Geometry Type.
- In Template Dataset, select the polygon shapefile.
- For the Has M and Has Z fields, select Same as the template feature class.
- For the Coordinate System, select the polygon shapefile from the drop-down box, and click Run.
The new polyline shapefile is created and displayed in the Contents pane.
- Right-click the original polygon shapefile in the Contents tab, and click Attribute Table.
- 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.
- On the View tab, click Copy > Paste drop-down arrow > Paste Special.
- In the Paste Special dialog box, select Template, and select the created polyline shapefile from steps 2 through 8.
- Check the Keep source attribute values check box to transfer the source attribute from the polygon shapefile, and click OK.
- The polygon shapefile is converted to a polyline shapefile, and all the attributes are maintained.