# Directional Distribution (Standard Deviational Ellipse) (Spatial Statistics)

Measures whether a distribution of features exhibits a directional trend (whether features are farther from a specified point in one direction than in another direction).

Learn about how Directional Distribution: Standard Deviational Ellipse works

## Usage tips

• Calculations based on either Euclidean or Manhattan distance require projected data to accurately measure distances.

• The Standard Deviational Ellipse tool creates a new feature class containing elliptical polygons, one for each Case (Case Field parameter). The attribute values for these ellipse polygons include X and Y coordinates for the mean or median center (Use the Median parameter), two standard distances (long and short axes), and the orientation of the ellipse. The fieldnames are CenterX, CenterY, XStdDist, YStdDist and Rotation. When a case field is provided, this field is added to the output feature class as well.

• If the underlying spatial pattern of the features is concentrated in the center with fewer features toward periphery (spatial normal distribution), a one standard deviation ellipse polygon will cover approximately 68 percent of the features; a two standard deviation ellipse will contain approximately 95 percent of the features; and three standard deviations will cover approximately 99 percent of the features in the cluster.

• The value in the Rotation field represents the rotation of the long axis measured clockwise from noon.

• If a case field is specified, then the input features are grouped according to case field values. A mean or median center, and standard ellipse is computed separately for each case.

• For line and polygon features, feature true geometric centroids are used in the computations.

• Whenever using shapefiles keep in mind that they cannot store null values. Tools or other procedures that create shapefiles from non-shapefile inputs may store or interpret null values as zero. This can lead to unexpected results.

• Current map layers may be used to define the input feature class. When using layers, only the currently selected features are included in the analysis.

## Syntax

DirectionalDistribution_stats (Input_Feature_Class, Output_Ellipse_Feature_Class, Ellipse_Size, Weight_Field, Case_Field)
Parameter Explanation Datatype
Input Feature Class (Required)

A feature class containing a distribution of features for which the standard deviational ellipse will be calculated.

Feature Layer
Output Ellipse Feature Class (Required)

A polygon feature class that will contain the output ellipse feature.

Feature Class
Ellipse Size (Required)

The size of output ellipses in standard deviations. The default ellipse size is 1; valid choices are 1, 2, or 3 standard deviations.

String
Weight Field (Optional)

The numeric field used to weight locations according to their relative importance.

Field
Case Field (Optional)

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

Field
Data types for geoprocessing tool parameters

Script Example

```# Measure the geographic distribution of auto thefts

# Import system modules
import arcgisscripting

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

# Local variables...
workspace = "C:/chris/data/"
auto_theft_locations = "AutoTheft.shp"
auto_theft_sd = "auto_theft_SD.shp"
auto_theft_se = "auto_theft_SE.shp"
auto_theft_ldm = "auto_theft_LDM.shp"

try:
# Set the workspace (to avoid having to type in the full path to the data every time)
gp.Workspace = workspace

# Process: Standard Distance of auto theft locations...
gp.StandardDistance_stats(auto_theft_locations, auto_theft_sd, "1 Standard Deviation", "#", "#")

# Process: Directional Distribution (Standard Deviational Ellipse) of auto theft locations...
gp.DirectionalDistribution_stats(auto_theft_locations, auto_theft_se, "1 Standard Deviation", "#", "#")

# Process: Linear Directional Mean of auto thefts...
gp.DirectionalMean_stats(auto_theft_links, auto_theft_ldm, "false", "#")

except:
# If an error occurred while running a tool, print the messages
print gp.GetMessages()

```