带渲染的聚类/异常值分析 (空间统计)
摘要
给定一组加权要素,利用 Anselin 提出的局部 Moran's I 统计量识别出热点、冷点和空间异常值。然后,将由冷到热的渲染方式应用于 z 得分结果。

由于 ArcGIS 新特性中允许脚本和模型工具的输出与默认渲染相关联,此工具将在 ArcGIS 10.1 之后的版本中弃用。
插图
![]() |
用法
语法
ClustersOutliersRendered_stats (Input_Feature_Class, Input_Field, Output_Layer_File, Output_Feature_Class)
参数 | 说明 | 数据类型 |
Input_Feature_Class |
要执行聚类分析的要素类。 | Feature Layer |
Input_Field |
要评估的字段。 | Field |
Output_Layer_File |
用于存储渲染信息的输出图层文件。 | Layer File |
Output_Feature_Class |
接收结果字段、z 得分、p 值和聚类类型标识的输出要素类。 | Feature Class |
代码实例
带渲染的聚类/异常值分析示例(Python 窗口)
以下 Python 窗口脚本演示了“带渲染的聚类/异常值分析”工具的使用方法。
import arcpy
arcpy.env.workspace = "c:/data/911calls"
arcpy.ClustersOutliersRendered_stats("911Count.shp", "ICOUNT","911ClusterOutlier_rendered.lyr", "911ClusterOutlier.shp")
带渲染的聚类/异常值分析示例(独立 Python 脚本)。
以下独立 Python 脚本演示了“带渲染的聚类/异常值分析”工具的使用方法。
# Analyze the spatial distribution of 911 calls in a metropolitan area
# using the Cluster-Outlier Analysis with Rendering Tool (Anselin's Local Moran's I)
# Import system modules
import arcpy
# Set geoprocessor object property to overwrite outputs if they already exist
arcpy.gp.OverwriteOutput = True
# Local variables...
workspace = r"C:\Data\911Calls"
try:
# Set the current workspace (to avoid having to specify the full path to the feature classes each time)
arcpy.env.workspace = workspace
# Copy the input feature class and integrate the points to snap
# together at 500 feet
# Process: Copy Features and Integrate
cf = arcpy.CopyFeatures_management("911Calls.shp", "911Copied.shp",
"#", 0, 0, 0)
integrate = arcpy.Integrate_management("911Copied.shp #", "500 Feet")
# Use Collect Events to count the number of calls at each location
# Process: Collect Events
ce = arcpy.CollectEvents_stats("911Copied.shp", "911Count.shp", "Count", "#")
# Cluster/Outlier Analysis of 911 Calls
# Process: Local Moran's I
clusters = arcpy.ClustersOutliersRendered_stats("911Count.shp", "ICOUNT",
"911ClusterOutlier_rendered.lyr", "911ClusterOutlier.shp")
except:
# If an error occurred when running the tool, print out the error message.
print arcpy.GetMessages()
环境
- 输出坐标系
在分析之前,会将要素几何投影到“输出坐标系”,这样,为距离范围或距离阈值参数输入的值会与“输出坐标系”中指定的值一致。所有数学计算都基于“输出坐标系”的空间参考进行。
相关主题
许可信息
ArcGIS for Desktop Basic: 是
ArcGIS for Desktop Standard: 是
ArcGIS for Desktop Advanced: 是
5/10/2014