HowTo:  Export coordinates of polygon vertices to a TXT file

相关信息
Article ID: 45376
Software:
ArcGIS for Desktop Advanced 10.2, 10.1, 10.2.1, 10.3, 10.3.1, 10.2.2
Platforms: N/A

问题描述
ArcGIS provides 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.
已邀请:

EsriSupport

赞同来自:

解决方案
Two different methods are discussed here. Option A allows users to select which 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.


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



Option A 1. Open the Feature Vertices To Points tool by navigating to Data Management Tools > Features > Feature Vertices To Points. a. Select a layer containing the polygon feature class as the input feature. b. Specify the name of the output feature class and location. c. Select ALL for the Point Type parameter. d. 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. To add XY coordinates to the points, navigate to Data Management Tools > Features > Add XY Coordinates. a. Select the output from Step 1 as the input feature. b. 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 navigating to Spatial Statistics Tools > Utilities > Export Feature Attribute to ASCII. a. Select the output from Step 2 as the input feature class. b. Select the values to export to an ASCII text file. c. Select a delimiter to specify how feature coordinates and attribute values are separated in the output ASCII file. d. Specify the name of the output feature class and location. Add '.txt' at the end of the output file name. e. Click OK to run the tool. The coordinates of the polygon vertices are exported to a TXT file.
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. 2. Open the attribute table of the output from Step 1. 3. Click Table Options > 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.
The output file automatically includes all fields and uses a comma as the separator.



其它相关参考
  1. ArcGIS Help: Feature Vertices To Points
  2. ArcGIS Help: Export Feature Attribute To ASCII
  3. ArcGIS Help: Exporting tables


创建及修改时间
Created: 8/26/2015 Last Modified: 9/10/2015
原文链接
http://support.esri.com/en/kno ... 45376

要回复问题请先登录注册