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

arcgis-desktopcensuspopulationspatial statistics

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?There are no points in the top left census tract, but four points in the census tract directly adjacent to it. The red points are from the median center tool and the purple are from the mean center tool.

Best Answer

Census tracts assume/present a uniform population density. If you are using Mean/Median Center on each tract, you're essentially calculating the centroid or geographic center of the tract. That centroid may or may not actually fall within the shape, particularly in the case of non-rectangular bounded shapes, such as 'C' (like your example image) and 'L' shapes, or shapes with holes in them.

If you only seek to get a point within each tract and be sure that it falls within the tract, Feature to Point will allow you to do that but it requires an Advanced license. Without an Advanced license, you could add x and y attribute fields, calculate those geometry properties to those fields, then create an xy event layer out of those values to get points (but again these may or may not fall within the boundary). If you are comfortable using python you can use a script to create a 'label point' (or 'inside centroid') using arcpy geometry objects, as follows:

# create points list
points = []
# get spatial reference from polygon feature class
sr = arcpy.Describe("shapes").spatialReference
# loop through polygon feature class
with arcpy.da.SearchCursor("shapes","SHAPE@",spatial_reference=sr) as cursor:
    for row in cursor:
        # add centroids to points list
        points.append(arcpy.PointGeometry(row[0].centroid))
# write points to disk
arcpy.CopyFeatures_management(points,r'in_memory\centroids')

Proper use of the Mean/Median Center tools would be to select all or a group of census tracts and use the population value as a weight field. This would then produce a single point at the geographic population center for those selected tracts (not one point per tract). I'm unclear on what you mean by 'create population weights', so I don't fully understand what you are trying to accomplish.

Related Question