Create a polygon fromr a list of points in a table

4768
2
05-29-2012 06:19 AM
JoseSanchez
Occasional Contributor III
Hello everyone,

I need to create  a polygon from points listed in a table. The table has lat and long values, each value is going to be a vertex in the polygon.

I am going to user Model Builder

Please advise!
0 Kudos
2 Replies
NobbirAhmed
Esri Regular Contributor
If you are using ArcGIS 10.0, you can use Convert Coordinate Notation tool to use the table to get a point feature class. Make sure points belonging to a polygon have a common value (e.r., ORIG_FID).

In the next step, use the output points as input to Minimum Bounding Geometry tool. Use LIST Group Option and select ORIG_FID from Group Field(s).
0 Kudos
HardolphWasteneys
Occasional Contributor III
Jose,

This is easy enough to do without Model Builder using the CreateFeatureFromTextFile script in the ArcGIS 9.3 Toolbox Samples. http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Create_Features_from_Text_File_(Sample...

It can be devilishly tricky to get the formatting correct, but once you understand the key formatting parts it is straightforward and useful in many situations not only where you are starting with a text file of points, but also in converting between polyline, point and polygon shape formats in many cases simply by changing the header (e.g. "Polygon" to "Polyline").

For a polygon the key aspects of the text file are like those in the pasted in file below (and attached), including repeating the first point at the end of the cycle of coordinates in the table for the vertices to close the polygon. The example below is a Polygon with ZM coordinate set to 0.0 and with an "interior ring" created from the shapes shown in the polygon8 image using the WriteFeaturesToTextFile script; also in Samples.

If you are going straight from a spreadsheet writing the coordinates from just make sure you clone the general formatting shown (delete the interior ring and its vertices) including ensuring that you have no hanging spaces at the ends of lines.

[ATTACH=CONFIG]14712[/ATTACH]
Polygon
0 0
0 11.7058615641 5.47888198704 0.0 0.0
1 11.4280287533 5.20104917628 0.0 0.0
2 10.8723631318 5.23577827762 0.0 0.0
3 10.2430826009 5.16676875696 0.0 0.0
4 9.80468260089 6.12200515696 0.0 0.0
5 10.334062061 6.4512968247 0.0 0.0
6 10.1083229022 7.05905609824 0.0 0.0
7 10.3514266116 7.12851430094 0.0 0.0
8 10.7508112771 7.16324340228 0.0 0.0
9 11.1849250439 7.14587885161 0.0 0.0
10 11.9836943749 6.92013969286 0.0 0.0
11 12.0734890575 5.69610103077 0.0 0.0
12 11.7058615641 5.47888198704 0.0 0.0
InteriorRing
13 10.4035202636 5.70462114578 0.0 0.0
14 10.8897276825 5.63516294309 0.0 0.0
15 11.6711324627 5.89563120318 0.0 0.0
16 11.497486956 6.15609946327 0.0 0.0
17 11.2022895946 6.36447407134 0.0 0.0
18 10.4035202636 5.70462114578 0.0 0.0
END

Hardolph
0 Kudos