Select to view content in your preferred language

How to create a polygon from a list of X,Y values

2892
1
05-29-2012 07:48 AM
JoseSanchez
Frequent Contributor
Hi all

I have a table that has X.Y coordinates that represent project areas on the field.

The structure is:

Project Number, X,Y
1, X1,Y1
1, X2,Y2
1, X3,Y3
1, X4,Y4
2, X11,Y11
.....



Questions:
- How can I create a polygon in Python from that list
- how can I loop, to read all the points that belong to the same project
- how can I loop to read all the projects

Regards
Tags (2)
0 Kudos
1 Reply
MathewCoyle
Honored Contributor
The simple way would be to use the create features from text file.
http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=F25C5576-1422-2418-A060-04188...

Otherwise you can recreate that functionality using array polygon constructions. The code sample at the bottom should get you going in the right direction.
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Polygon/000v000000n1000000/
0 Kudos