Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Spatial Statistics toolbox > Measuring Geographic Distributions toolset > Tools

Mean Center (Spatial Statistics)

Release 9.2
Last modified January 9, 2009
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

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

Command line syntax
An overview of the Command Line window
MeanCenter_stats <Input_Feature_Class> <Output_Feature_Class> {Weight_Field} {Case_Field} {Dimension_Field}

Parameter Explanation Data Type
<Input_Feature_Class>

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

Feature Layer
<Output_Feature_Class>

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

Feature Class
{Weight_Field}

The numeric field used to create a weighted mean center.

Field
{Case_Field}

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

Field
{Dimension_Field}

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

Field
Data types for geoprocessing tool parameters


Command line example

workspace e:\project93\data
MeanCenter schools.shp schoolcen.shp Teachers Group

Scripting syntax
About getting started with writing geoprocessing scripts
MeanCenter_stats (Input_Feature_Class, Output_Feature_Class, Weight_Field, Case_Field, Dimension_Field)

Parameter Explanation Data Type
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 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()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.