带渲染的热点分析 (空间统计)
摘要
计算热点分析的 Getis-Ord Gi* 统计,然后对输出 Z 得分应用“冷色到暖色”的渲染类型。
![旧版本 旧版本](rsrc/legacy.png)
由于 ArcGIS 新特性中允许脚本和模型工具的输出与默认渲染相关联,此工具将在 ArcGIS 10.1 之后的版本中弃用。
插图
![]() |
用法
语法
HotSpotsRendered_stats (Input_Feature_Class, Input_Field, Output_Layer_File, Output_Feature_Class, {Distance_Band_or_Threshold_Distance})
参数 | 说明 | 数据类型 |
Input_Feature_Class |
将要执行热点分析的要素类。 | Feature Layer |
Input_Field |
要计算的数值字段(受害者人数、作业数和事件严重性等)。 | Field |
Output_Layer_File |
存储冷色到暖色渲染信息的图层文件。文件名中必须包含 .lyr 扩展名。 | Layer File |
Output_Feature_Class |
用于接收结果字段的输出要素类。 | Feature Class |
Distance_Band_or_Threshold_Distance (可选) |
指定一个距离中断值。热点分析会忽略指定的“距离范围或距离阈值”之外的要素。此参数值应以“输入要素类”坐标系的单位进行输入。但有一种情况例外:如果设置了“输出坐标系”环境变量,则此参数值应以该环境中设置的坐标系单位进行输入。如果将此字段留空,则将计算并应用默认距离值。 | Double |
代码示例
HotSpotAnalysisWithRendering 示例(Python 窗口)
以下 Python 窗口脚本演示了如何使用 HotSpotAnalysisWithRendering 工具。
import arcpy arcpy.env.workspace = "C:/data" arcpy.HotSpotsRendered_stats("911Count.shp", "ICOUNT", "911HotSpots_Rendered.lyr", "911HotSpots.shp")
HotSpotAnalysisWithRendering 示例(独立 Python 脚本)
以下独立 Python 脚本演示了如何使用 HotSpotAnalysisWithRendering 工具。
# Analyze the spatial distribution of 911 calls in a metropolitan area # using the Hot-Spot Analysis with Rendering Tool (Local Gi*) # Import system modules import arcpy # Set geoprocessor object property to overwrite existing output, by default arcpy.gp.overwriteOutput = True # Local variables... workspace = "C:/Data" 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", "#") # Hot Spot Analysis of 911 Calls # Process: Hot Spot Analysis (Getis-Ord Gi*) hs = arcpy.HotSpotsRendered_stats("911Count.shp", "ICOUNT", "911HotSpots_rendered.lyr","911HotSpots.shp") except: # If an error occurred when running the tool, print out the error message. print arcpy.GetMessages()
环境
- 输出坐标系
在分析之前,会将要素几何投影到“输出坐标系”上,这样,为距离范围或距离阈值参数输入的值就与“输出坐标系”中指定的值保持一致。所有数学计算都基于输出坐标系空间参考。
相关主题
7/10/2012