Monday, 11 September 2017

ArcGIS: Create polygon using file containing point coordinates


I have a text file containing the projected coordinates of the points that define a single polygon. The X, Y coordinates are separated by Tab


Is there a tool in ArcGIS similar to "Add X,Y Data" in ArcMap, that can be used to automatically create polygons FC, not point FC?


I use ArcGIS 10.1 for Desktop.



Answer



There isn't any tool to do this in 1 single step, you should either:




  1. convert your text file to points

  2. convert points to lines with Points to Line

  3. convert lines to polygons with Feature to Polygon (Advanced licnese required)


Or:


Use arcpy :) - no specific license required.


See an example at the bottom of the page Writing geometries. The code converts a list of coordinates (a text file can be regarded as such a list) into polylines, you can easily modify it to create polygons.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...