Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to extract data from a shapefile using ArcGIS for Desktop 10.2.

The data needed is all the vertices (x,y coordinates in geographic WGS 1984) that construct the polygon below.

I need to get all these vertices as an Excel spreadsheet.

enter image description here

share|improve this question
Exporting a Table to Excel became easy at ArcGIS 10.2 for Desktop when the Excel Tools were added, but from your question it is unclear what Latitude and Longitude values you want to write: centroid?, extent?, vertices? Can you edit your Question to provide more precise details of the workflow you are wanting to perform, please? – PolyGeo Mar 26 '14 at 5:52
i need to extract all the vertices. – user3423232 Mar 26 '14 at 8:34
Please edit the question to clearly state what you need. – Vince Mar 26 '14 at 9:17
Please use the edit button beneath your Question to revise it with this and additional details like the format you are wanting to see in the exported Excel worksheet i.e. one row per vertex or ? Are you planning to do this on one selected polygon or ? – PolyGeo Mar 26 '14 at 9:18
up vote 5 down vote accepted

One way would be to convert the polygon into series of points (using feature vertices to points) and save it as a new shapefile.In the attribute table you can 'add' a new lat and long 'field' and populate it with the lat/long values using 'calculate geometry' option. The attribute table information is available in the .dbf file associated with the shapefile. You can open it in excel and save it in your favorite format. Or you can directly export it to excel using Table to excel as you have ArcGIS 10.2.

share|improve this answer
i make all you say ..but i need to extract all points (coordinates )not only one . – user3423232 Mar 26 '14 at 8:33
+1 @Arihant You may want to include some links and/or graphics to explain this in slightly more detail. To me it would seem to provide a solution to what I am starting to understand of the requirements in this Question – PolyGeo Mar 26 '14 at 10:20
i plot a red line for the vertices i needed ..i need to extract these x,y coordinates to excel sheet .. – user3423232 Mar 26 '14 at 10:45
@Arihant has a great solution. Keep in mind that the tool he suggests requires an Advanced license: Feature Vertices To Points (Data Management). If you are able to run this tool, Calculate Geometry on your new feature class for two new fields (in your case, custom X & Y fields). Then export the attribute table as required. – amarinel Mar 26 '14 at 13:14
Thanks to all for help me. – user3423232 Mar 26 '14 at 14:23

This might help you out:

fc = "C:/myfc.shp"
csv = open("C:/Vertices.csv", "w")

with arcpy.da.SearchCursor(fc, ("SHAPE@")) as cursor:
    for row in cursor:
        for part in row[0]:
            for pnt in part:
                csv.write("{0},{1}\n".format(pnt.X, pnt.Y))


If you have more than one polygon you would want to include the ObjectID field in the cursor to distinguish what is what.

share|improve this answer
thank you very much ..I get the solution . – user3423232 Mar 26 '14 at 14:23
What did you end up doing? – ianbroad Mar 26 '14 at 14:24
these data that i get it ..i will include it when i generating heat maps in order to control the drowing only inside borders of iraq not outside. – user3423232 Mar 26 '14 at 14:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.