标注 | 说明 | 数据类型 |
输入点 | 输入点要素集用于标识扇形视域的原点。 输入必须至少具有一个点。 | Feature Set |
输出扇形视域要素类 | 含有输出扇形视域要素的要素类。 | Feature Class |
最小距离 | 原点距扇形视域起点的距离 | Double |
最大距离 | 原点距扇形视域终点的距离 | Double |
水平起始角 | 原点与扇形视域起点的角度 | Double |
水平终止角 | 原点与扇形视域终点的角度 | Double |
距离单位 (可选) | 指定最小和最大距离的线性测量单位。
| String |
角度单位 (可选) | 指定起始角和终止角的角度测量单位。
| String |
摘要
以给定水平起始角、水平终止角、最小距离和最大距离创建从起点开始的扇形视域。
使用情况
将从水平起始角参数中的值到水平终止角参数中的值,以顺时针方向来创建扇形视域。
参数
arcpy.defense.GenerateRangeFans(in_features, out_range_fan_feature_class, inner_radius, outer_radius, horizontal_start_angle, horizontal_end_angle, {distance_units}, {angle_units})
名称 | 说明 | 数据类型 |
in_features | 输入点要素集用于标识扇形视域的原点。 输入必须至少具有一个点。 | Feature Set |
out_range_fan_feature_class | 含有输出扇形视域要素的要素类。 | Feature Class |
inner_radius | 原点距扇形视域起点的距离 | Double |
outer_radius | 原点距扇形视域终点的距离 | Double |
horizontal_start_angle | 原点与扇形视域起点的角度 | Double |
horizontal_end_angle | 原点与扇形视域终点的角度 | Double |
distance_units (可选) | 指定最小和最大距离的线性测量单位。
| String |
angle_units (可选) | 指定起始角和终止角的角度测量单位。
| String |
代码示例
以下 Python 窗口脚本演示了如何使用 GenerateRangeFans 函数。
import arcpy
arcpy.env.workspace = r"C:\Data.gdb"
arcpy.defense.GenerateRangeFans("RLOS_Observers",
"Range_Fan_out",
100, 2000, 45, 180,
"METERS",
"DEGREES")
以下示例将在示例工作流脚本中使用 GenerateRangeRings 函数。
# Description: Generate range rings around active airports
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = r"C:\Data.gdb"
arcpy.env.overwriteOutput = True
# Select points from airports from input
airports = "Airports"
active = "Active_Airports"
whereClause = "Active = 'Yes'"
arcpy.analysis.Select(airports, active, whereClause)
# Generate Range Fans from selected airports
outputFans = "Range_Fans"
distType = "KILOMETERS"
angleUnits = "DEGREES"
arcpy.defense.GenerateRangeFans(active,
outputFans,
10,
100,
90,
180,
distType,
angleUnits)