方向分布(标准差椭圆) (空间统计)

摘要

创建标准差椭圆以汇总地理要素的空间特征:中心趋势、离散和方向趋势。

了解“方向分布”(标准差椭圆)的工作原理

插图

Directional Distribution (Standard Deviational Ellipse) graphic

用法

语法

DirectionalDistribution_stats (Input_Feature_Class, Output_Ellipse_Feature_Class, Ellipse_Size, {Weight_Field}, {Case_Field})
参数说明数据类型
Input_Feature_Class

要计算标准差椭圆的要素分布所在的要素类。

Feature Layer
Output_Ellipse_Feature_Class

包含输出椭圆要素的面要素类。

Feature Class
Ellipse_Size

输出椭圆的大小(按标准差数量计)。默认椭圆大小为 1;有效选项为 1、2 或 3 个标准差。

  • 1_STANDARD_DEVIATION
  • 2_STANDARD_DEVIATIONS
  • 3_STANDARD_DEVIATIONS
String
Weight_Field
(可选)

根据各位置的相对重要性对它们进行加权的数字字段。

Field
Case_Field
(可选)

对要素进行分组以分开计算方向分布的字段。案例分组字段可以是整型、日期或字符串类型。

Field

代码示例

DirectionalDistribution 示例(Python 窗口)

下面的 Python 窗口脚本演示了如何使用 DirectionalDistribution 工具。

import arcpy arcpy.env.workspace = r"C:\data" arcpy.DirectionalDistribution_stats("AutoTheft.shp", "auto_theft_SE.shp", "1_STANDARD_DEVIATION", "#", "#")
DirectionalDistribution 示例(独立 Python 脚本)

下面的独立 Python 脚本演示了如何使用 DirectionalDistribution 工具。

 # Measure the geographic distribution of auto thefts   # Import system modules import arcpy   # Local variables... workspace = "C:/data" locations = "AutoTheft.shp" links = "AutoTheft_links.shp" standardDistance = "auto_theft_SD.shp" stardardEllipse = "auto_theft_SE.shp" linearDirectMean = "auto_theft_LDM.shp"   try:     # Set the workspace (to avoid having to type in the full path to the data every time)     arcpy.env.workspace = workspace       # Process: Standard Distance of auto theft locations...     arcpy.StandardDistance_stats(locations, standardDistance, "1_STANDARD_DEVIATION", "#", "#")       # Process: Directional Distribution (Standard Deviational Ellipse) of auto theft locations...     arcpy.DirectionalDistribution_stats(locations, standardEllipse, "1_STANDARD_DEVIATION", "#", "#")       # Process: Linear Directional Mean of auto thefts...     arcpy.DirectionalMean_stats(links, linearDirectMean, "DIRECTION", "#")   except:     # If an error occurred while running a tool, print the messages      print arcpy.GetMessages()

环境

输出坐标系

进行分析之前,将要素几何投影到“输出坐标系”。所有数学计算都基于“输出坐标系”空间参考进行。

相关主题


7/10/2012