Calculate the centroid of a polygon in ArcMap 10.0

19308
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
ArthurCrawford
Esri Contributor
Hi Tom,

You could use the calculate centroids in the Calculate Geometry into a field, export the table to a dbf and use xy events to create a new point featureclass.   The only issue would be not being able to create a centroid inside the polygon.   In a test case, only 3% where outside the polygon for builtup areas (Belize).

Thanks,

Arthur
0 Kudos
SBBSBB
by
New Contributor
Dear all,

I tried to use this script for the calculation of the X and y of the centroid, but I constantly get following error:

ERROR 000539: Error running expression: float("-1357069,51744704 -253911,285439942".split()[0]) <type 'exceptions.ValueError'>: invalid literal for float(): -1357069,51744704
Failed to execute (CalculateField)

Does anyone have an idea what I can do about this?

Thank you very much

Sarah Crabbe
0 Kudos