Central Feature (Spatial Statistics) |
|
Release 9.2
Last modified January 9, 2009 |
![]() ![]() ![]()
|
Identifies the most centrally located feature in a point, line, or polygon feature class.
Learn more about how Central Feature works
Illustration
Usage tips
The feature associated with the smallest accumulated distance to all other features is the most centrally located feature; this feature is selected and copied to the newly created output feature class (using Make Feature Layer and Save to Layer File).
For line and polygon features, feature centroids are used in the computations
Calculations are based on either Euclidean or Manhattan distance and require projected data to accurately measure distances.
Current map layers may be used to define the input feature class. When using layers, only the currently selected features are used in the Central Feature operation.
The following environment settings affect this tool: Extent, M Domain, Configuration Keyword, Coordinate System, Output has M Values, Output Spatial Grid, Output has Z Values, Default Z Value, Output XY Domain, and Output Z Domain.
Command line syntax
An overview of the Command Line window
CentralFeature_stats <Input_Feature_Class> <Output_Feature_Class> <Euclidean Distance | Manhattan Distance> {Weight_Field} {Self_Potential_Weight_Field}
Parameter | Explanation | Data Type |
<Input_Feature_Class> |
The feature class containing a distribution of features from which to identify the most centrally located feature. |
Feature Layer |
<Output_Feature_Class> |
The feature class that will contain the most centrally located feature in the input feature class. |
Feature Class |
<Euclidean Distance | Manhattan Distance> |
Specifies how distances are calculated when measuring concentrations.
|
String |
{Weight_Field} |
The numeric field used to weight distances in the origin-destination distance matrix. |
Field |
{Self_Potential_Weight_Field} |
The field representing self-potential — The distance or weight between a feature and itself. |
Field |
CentralFeature e:\project93\data\hospitals.shp e:\project93\output\hosp_cf.shp 'Manhattan Distance' POP #
Scripting syntax
About getting started with writing geoprocessing scripts
CentralFeature_stats (Input_Feature_Class, Output_Feature_Class, Distance_Method, Weight_Field, Self_Potential_Weight_Field)
Parameter | Explanation | Data Type |
Input_Feature_Class (Required) |
The feature class containing a distribution of features from which to identify the most centrally located feature. |
Feature Layer |
Output_Feature_Class (Required) |
The feature class that will contain the most centrally located feature in the input feature class. |
Feature Class |
Distance_Method (Required) |
Specifies how distances are calculated when measuring concentrations.
|
String |
Weight_Field (Optional) |
The numeric field used to weight distances in the origin-destination distance matrix. |
Field |
Self_Potential_Weight_Field (Optional) |
The field representing self-potential — The distance or weight between a feature and itself. |
Field |
# 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()