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
- Open the Feature Vertices To Points tool by clicking the ArcToolbox icon, and in the ArcToolbox pane, click Data Management Tools > Features > Feature Vertices To Points.
- Select a layer containing the polygon feature class as the input feature.
- Specify the name of the output feature class and location.
- Select ALL for the Point Type parameter.
- 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.
- Add XY coordinates to the points by clicking the ArcToolbox icon, and in the ArcToolbox pane, click Data Management Tools > Features > Add XY Coordinates.
- Select the output from Step 1 as the input feature.
- Click OK to run the tool. The XY coordinates of the feature are generated in the attribute table.
- Open the Export Feature Attribute To ASCII tool by clicking the ArcToolbox icon, and in the ArcToolbox pane, click Spatial Statistics Tools > Utilities > Export Feature Attribute to ASCII.
- Select the output from Step 2 as the input feature class.
- Select the values to export to an ASCII text file.
- Select a delimiter to specify how feature coordinates and attribute values are separated in the output ASCII file.
- Specify the name of the output feature class and location. Add '.txt' at the end of the output file name.
- 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
- Follow Step 1 and Step 2 from Option A above.
- Open the attribute table of the output from Step 1.
- In the attribute table, click Table Options , and click Export.
- Click the Browse button to specify the output file name and location.
- Select Text File as the type of the output file, and click Save.
- Click OK.
Note:
The output file automatically includes all fields and uses a comma as the separator.