Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Let me back up and say that from what I understand there are two common ways to calculate the centroid of a polygon in ArcGIS Desktop:

  1. Using Calculate Geometry on fields within the attribute table of the feature class.
  2. Using Data Management -> Features -> Feature to Point from the toolbox.

These both give the same result - the geometric centroid of the polygon. However, there is no guarantee that point lies inside the polygon.

The Feature to Point tool has an inside checkbox option, that according to the documentation:

Uses a location contained by an input feature as its output point location.

What I would like to know is how is this point calculated by ArcGIS Desktop and what is its "theoretical" meaning, if that makes sense.

share|improve this question
1  
Given the general vagueness of ESRI's documentation, you likely have to reverse-engineer the procedure by testing. When I did this with AV 3.x 15 years ago, the algorithm was (1) find the geometric centroid and then (2) move it horizontally to the nearest point inside the polygon. –  whuber Jun 17 '11 at 20:57
    
@whuber - in this case the inside point can be different even if the centroid itself is inside the polygon, so that makes me think its a completely different calculation –  mindless.panda Jun 17 '11 at 21:01
3  
This forum post on ESRI's site is interesting and does seem to indicate its a black box. –  mindless.panda Jun 17 '11 at 21:10
    
Using python in 9.3.1, I compared some possible ways to generate a 'centroid'. Can be seen here! in the ESRI forums. –  SaultDon Jun 17 '11 at 21:24
    
@mindless In the old algorithm, if the centroid was inside the polygon, of course it wasn't moved: it coincides with the nearest point inside the polygon. However, the forum post you found renders this issue moot: ESRI has changed the algorithm. I wouldn't infer it is "completely different," though. It might just be a refinement of the older one. It's not going to be easy to reverse-engineer, though. –  whuber Jun 17 '11 at 21:28

1 Answer 1

The algorithms are proprietary but there are two basic concepts here. The centroid uses a center of gravity algorithm (there are many different ways to calculate this). The "inside" check box calculates a centroid but then moves the point inside if it falls outside as this is desirable in some cases.

At the ArcObjects level these approaches are defined as the Centroid and the Label Point. See the Centroid link for example images.

share|improve this answer
    
While this doesn't tell us how the inside point is calculated it does tell us its synonymous with the label point. –  mindless.panda Jun 24 '11 at 12:15

Your Answer

 
discard

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.