Select to view content in your preferred language

Creating a polygon from numerous xy point columns

187
2
07-10-2025 08:30 AM
Labels (2)
NatalieToben
New Contributor

Hello everyone,

I am currently using ArcGIS Pro 2.9 and trying to create polygons from numerous xy coords. However, there are numerous problems with the layout of the data in the attribute table that I need help addressing. The data was originally exported from an outside source as an excel file. Below is a table I made that gives an idea of what my data looks like. Each row represents a polygon. Each column is a xy coordinate representing a vertex. 

 
Polygon 1vertex xyvertex xy 2vertex xy 3vertex xy 4vertex xy 5
Polygon 2vertex xyvertex xy 2vertex xy 3vertex xy 4vertex xy 5
Polygon 3vertex xyvertex xy 2vertex xy 3vertex xy 4vertex xy 5

 

1) the first issue is that the x and y coords are in the same column. I know how to separate them on Excel, however, each polygon has a different number of vertices, and it goes up to 85. If I separated the x,y coords into separate columns, I would be working with 170 columns. 

2) The second and main issue is that there are numerous xy coords in numerous columns. Many of the tools I looked at had one spot for an x field, and one for a y field. I don't even know where to start when I have 85/170 columns. 

I have looked through many forums for potential solutions for turning points into polygons. There are about 12,000 rows, representing 12,000 polygons. It would take me a lot of time and effort to manually group the vertices together. And many of the point to polygon tools I saw looked like they only went up to 4 vertices per polygon. 

Any suggestions at all would be greatly appreciated! Thank you!

 
 
0 Kudos
2 Replies
ThomasHoman
Frequent Contributor
0 Kudos
LizAbbey
Regular Contributor

Hi @NatalieToben 

I think you'll need a multi-step approach, starting with reformatting your excel table using macros or copilot if you have that available. Ultimately you'll want to wind up with a table like below, where you list out one row per vertex, which becomes your sort order 1, 2, 3, etc.:

Polygon IDSort Order (Vertex)xy
Polygon11X coordY coord
Polygon12X coordY coord
Polygon13X coordY coord
Polygon14X coordY coord
Polygon15X coordY coord
Polygon21X coordY coord
Polygon22X coordY coord
Polygon23X coordY coord
Polygon24X coordY coord

 

Once the table is formatted you can convert it to a point feature class using the XY Table To Point tool. Then run Points To Line tool where Polygon ID is the Line ID field, using your sort order field, and tick the box to "close the line" which creates the missing segment to create a closed polyline feature. Finally run the Feature To Polygon tool. 

The hardest part of this will be formatting the excel sheet. I'm happy to have a stab if you post your data here.

0 Kudos