How To: Find the centroid of polygons using Calculate Geometry
These instructions describe how to find the centroid of polygons using Calculate Geometry within the attribute table of a feature class. This workflow can be especially useful when an Advanced/ArcEditor license is not available and the Feature to Point tool is inaccessible.
- In the map document, open the attribute table for the polygon feature class by right-clicking the layer name.
- In the attribute table, navigate to Table Options > Add Field and add two new fields of type Double. Name one 'Longitude' and the other 'Latitude'.
- Right-click the Longitude field and select Calculate Geometry.
- In the Calculate Geometry dialog box, select X Coordinate of Centroid from the Property drop-down menu. Click OK.
- Right-click the Latitude field and select Calculate Geometry.
- In the Calculate Geometry dialog box, select Y Coordinate of Centroid from the Property drop-down menu. Click OK.
- Export to a table:
- In the attribute table, select Table Options > Export.
- Specify a name and location for the new table.
- Click OK and Yes to add the new table to the current map.
- Make an XY Event layer:
- Right-click the table that has been added to the Table of Contents and select Display XY Data.
- For the X Field, select the Longitude field.
- For the Y Field, select the Latitude field.
- Select the spatial reference or coordinate system.
- Click OK.
Note: The ability to create an XY Event layer from the Table of Contents became available with the release of version 10.0 of ArcGIS Desktop. When working with version 9.2, 9.3 or 9.3.1, an XY Event layer can be created through ArcToolbox rather than from the Table of Contents. The Make XY Event Layer tool can be found in the Data Management Toolset. For more details on this tool see: ArcGIS Desktop 9.3 Help: Make XY Event Layer (Data Management)
- (Optional) Export the event layer to a feature class; right-click the layer and navigate to Data > Export Data.
- Calculate XY coordinates using Python
- ArcMap Help: Add Field
- ArcMap Help: Calculating area, length, and other geometric properties
- Calculate the centroid of a polygon