Mean Center (Spatial Statistics)

Identifies the geographic center (or the center of concentration) for a set of features.

Learn about how Mean Center works


Mean Center illustration

Usage tips


MeanCenter_stats (Input_Feature_Class, Output_Feature_Class, Weight_Field, Case_Field, Dimension_Field)
Parameter Explanation Datatype
Input Feature Class (Required)

A feature class for which the mean center will be calculated.

Feature Layer
Output Feature Class (Required)

A point feature class that will contain the features representing the mean centers of the input feature class.

Feature Class
Weight Field (Optional)

The numeric field used to create a weighted mean center.

Case Field (Optional)

Field used to group features for separate mean center calculations. The case field can be of numeric, date, or string type.

Dimension Field (Optional)

A numeric field containing attribute values from which an average value will be calculated.

Data types for geoprocessing tool parameters

Script Example

# Measure geographic distribution characteristics of coffee house locations weighted by the number of employees

# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

# Local variables...
workspace = "C:/data"
input_FC = "coffee_shops.shp"
CF_output = "coffee_CF.shp"
MC_output = "coffee_MC.shp"
weight_field = "NUM_EMP"

    # Set the workspace to avoid having to type out full path names
    gp.workspace = workspace

    # Process: Central Feature...
    gp.CentralFeature_stats(input_FC, CF_output, "Euclidean Distance", weight_field, "#", "#")

    # Process: Mean Center...
    gp.MeanCenter_stats(input_FC, MC_output, weight_field, "#", "#")

    # If an error occurred when running the tool, print out the error message.
    print gp.GetMessages()

See Also

  • Central Feature (Spatial Statistics)
  • Directional Distribution (Standard Deviational Ellipse) (Spatial Statistics)
  • Standard Distance (Spatial Statistics)