+ Reply to Thread
Results 1 to 12 of 12

Thread: Calculate the centroid of a polygon in ArcMap 10.0

  1. #1
    Sophia Georgiadou
    Join Date
    Apr 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Calculate the centroid of a polygon in ArcMap 10.0

    Hi,

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

    http://resources.arcgis.com/content/...leShow&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

  2. #2
    Kim Ollivier
    Join Date
    Oct 2009
    Posts
    589
    Points
    130
    Answers Provided
    10


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    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.

  3. #3
    Jim Fulmer
    Join Date
    Jan 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    Quote Originally Posted by kimo View Post
    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

  4. #4
    laurie hogan
    Join Date
    May 2011
    Posts
    6
    Points
    0
    Answers Provided
    0


    0

    Smile Re: Calculate the centroid of a polygon in ArcMap 10.0

    Quote Originally Posted by kimo View Post
    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!

  5. #5
    Arthur Crawford
    Join Date
    Apr 2010
    Posts
    15
    Points
    19
    Answers Provided
    3


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    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

  6. #6
    Francisco Acosta Bazan
    Join Date
    Sep 2011
    Posts
    35
    Points
    3
    Answers Provided
    0


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    Enlace roto ..

  7. #7
    Arthur Crawford
    Join Date
    Apr 2010
    Posts
    15
    Points
    19
    Answers Provided
    3


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0


  8. #8

    Join Date
    Jan 2012
    Posts
    1
    Points
    0
    Answers Provided
    0


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    Quote Originally Posted by kimo View Post
    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?

  9. #9
    Arthur Crawford
    Join Date
    Apr 2010
    Posts
    15
    Points
    19
    Answers Provided
    3


    1

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    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.

  10. #10
    Tom Hoober
    Join Date
    Apr 2010
    Posts
    42
    Points
    0
    Answers Provided
    0


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    Feature to Point tool would be nice to use. Is there any sort of equivalent for Editor/View license level folks?
    Tom Hoober

  11. #11
    Arthur Crawford
    Join Date
    Apr 2010
    Posts
    15
    Points
    19
    Answers Provided
    3


    1

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    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

  12. #12
    Sarah Crabbe
    Join Date
    Jun 2011
    Posts
    2
    Points
    0
    Answers Provided
    0


    0

    Default Re: Calculate the centroid of a polygon in ArcMap 10.0

    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

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts