Calculate the centroid of a polygon in ArcMap 10.0

19265
11
04-29-2011 08:12 AM
SophiaGeorgiadou
New Contributor
Hi,

I am following this guide to Calculate the centroid of a polygon:

http://resources.arcgis.com/content/kbase?fa=articleShow&d=32482

but I get an error saying: "There was a failure during processing. Check the Geoprocessing results..."

Checking the results window i see ERROR 999999: error Executing function

Is the above guide valid for ArcMap 10? If not, how can i achieve what i want?

Thanks in advance
Tags (2)
0 Kudos
11 Replies
KimOllivier
Occasional Contributor III
There is now a right-click specific tool to calculate centroids in the Calculate Geometry... into a field.
You do not need to use the Field Calculator, but if you did, then you can use a Python expression instead of VBA which is now not supported.
0 Kudos
JimFulmer
New Contributor
There is now a right-click specific tool to calculate centroids in the Calculate Geometry... into a field.
You do not need to use the Field Calculator, but if you did, then you can use a Python expression instead of VBA which is now not supported.


Hi,

I'm not much of a coder.  Can you elaborate?  Is there some Python code that I cut and paste into the field Calculator?

Thanks
0 Kudos
lauriehogan
New Contributor
There is now a right-click specific tool to calculate centroids in the Calculate Geometry... into a field.
You do not need to use the Field Calculator, but if you did, then you can use a Python expression instead of VBA which is now not supported.



Hi.  I found this tip for the "calculate geometry" useful.  Is there a automated way to update a feature class, with multiple polygons, with the centroid calculations, eliminate the need for right clicking lat, long for all the polygons within the feature class?  Thanks in advance for any tips/methods!
0 Kudos
ArthurCrawford
Esri Contributor
There is a CalculateField_Centroids.py script as an example in the help. Here is the link:
http://help.arcgis.com/en/arcgisdesk...004m000000.htm
0 Kudos
FranciscoAcosta_Bazán
New Contributor III
Enlace roto ..
0 Kudos
ArthurCrawford
Esri Contributor
0 Kudos
maryammohammadi1
New Contributor
There is now a right-click specific tool to calculate centroids in the Calculate Geometry... into a field.
You do not need to use the Field Calculator, but if you did, then you can use a Python expression instead of VBA which is now not supported.


thank you for this nice guidance. I would like to know after create the X and Y of the centers, how I am able to represent them in the map?
0 Kudos
ArthurCrawford
Esri Contributor
The easiest way to do this is to use the Feature to Point tool and be sure to click on the Inside button.    You can find this tool under Data Management tools and then Features.   If you have multipart polygons, you might want to run Multipart to Singlepart tool first on the polygons or edit the features using the Explode multipart feature button on the Advanced Editing toolbar.
0 Kudos
TomHoober
New Contributor II
Feature to Point tool would be nice to use.  Is there any sort of equivalent for Editor/View license level folks?
0 Kudos