Mean Center (Spatial Statistics)

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

Learn about how Mean Center works


Illustration

Mean Center illustration

Usage tips

Syntax

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.

Field
Case Field (Optional)

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

Field
Dimension Field (Optional)

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

Field
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"

try:
    # 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, "#", "#")

except:
    # 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)