# Mean Center/Median Center tool providing points mathematically centered but physically appearing in the wrong location

4115
7
02-27-2015 01:22 PM
New Contributor II

To create population weights, I'm using the Mean and Median Center tool to find the center of our populations in census tracts. However, I've noticed that some of the points that are popping up are physically appearing in the census tract next to the census tract they should be in, resulting in two points in one tract when there should be just one. However, the attribute table does verify that they are belonging to a different census tract, just not physically displaying them in the different census tract. Has anyone run into this issue? Does anyone know how to fix it?

7 Replies
Esri Notable Contributor

Does the tract where the point falls outside have an non-rectangular shape? This may be the same problem as calculating the centroid--it's not guaranteed to fall within the polygon.

New Contributor II

Both tracts actually are not rectangular in what appears to be all of the cases. By calculating the centroid, could you elaborate?

MVP Honored Contributor

If you have a polygon shaped like the letter 'C', the centroid will be outside the lines of the polygon 'C', right in the middle (similar for many other complex shapes).

New Contributor II

Oh right, I remember this. So do you think this is the case?

New Contributor II

Actually, looking at all of the places where this occurred...this might be the case. Any suggestions on how to rectify it?

Esri Notable Contributor

If you really want the centroid but want the point to fall within the feature (aka not the true centroid any more), look at the Calculate Field tool. When I trace the centroid concept back to the arcpy geometry, it says that it returns the centroid if the point will fall in or on the edge of a feature. Otherwise, it returns a label point. That is, the returned point is constrained to fall within/on the edge of the feature. I thought there was a separate tool...

New Contributor II

Thanks Melita Kennedy​! I'll be sure to try that and see what I get and provide an update!