HOW TO

Export coordinates of polygon vertices to a TXT file

Last Published: March 30, 2021

Summary

ArcGIS provides the tools to convert the data of a shapefile to text file format, such as TXT. Data converted to a text file can be opened with a text editor.

The instructions provided describe how to export coordinates of polygon vertices to a TXT file.

Procedure

Two different methods are discussed here. Option A allows the selection of fields to be exported and how the data is separated in the output file. For Option B, the output file automatically includes all fields and uses a comma as the separator.

Note:
The Feature Vertices To Points tool requires an ArcGIS Desktop Advanced license.

Option A

  1. Open the Feature Vertices To Points tool by clicking the ArcToolbox ArcToolbox icon. icon, and in the ArcToolbox pane, click Data Management Tools > Features > Feature Vertices To Points.
    1. Select a layer containing the polygon feature class as the input feature.
    2. Specify the name of the output feature class and location.
    3. Select ALL for the Point Type parameter.
    4. Click OK to run the tool. This converts the vertices to points and creates a feature class containing points generated from specified vertices or locations of the polygon feature.
  2. Add XY coordinates to the points by clicking the ArcToolbox ArcToolbox icon. icon, and in the ArcToolbox pane, click Data Management Tools > Features > Add XY Coordinates.
    1. Select the output from Step 1 as the input feature.
    2. Click OK to run the tool. The XY coordinates of the feature are generated in the attribute table.
  3. Open the Export Feature Attribute To ASCII tool by clicking the ArcToolbox ArcToolbox icon. icon, and in the ArcToolbox pane, click Spatial Statistics Tools > Utilities > Export Feature Attribute to ASCII.
    1. Select the output from Step 2 as the input feature class.
    2. Select the values to export to an ASCII text file.
    3. Select a delimiter to specify how feature coordinates and attribute values are separated in the output ASCII file.
    4. Specify the name of the output feature class and location. Add '.txt' at the end of the output file name.
    5. Click OK to run the tool. The coordinates of the polygon vertices are exported to a TXT file.
Note:
Check the Add Field Names to Output check box to include the field names included in the output text file.

Option B

  1. Follow Step 1 and Step 2 from Option A above.
  2. Open the attribute table of the output from Step 1.
  3. In the attribute table, click Table Options Table Options icon., and click Export.
  4. Click the Browse button to specify the output file name and location.
  5. Select Text File as the type of the output file, and click Save.
  6. Click OK.
Note:
The output file automatically includes all fields and uses a comma as the separator.

Article ID: 000012604

Software:
  • ArcMap

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

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options