# NbrWedge

## 语法

`NbrWedge ({radius}, {startAngle}, {endAngle}, {units})`
 参数 说明 数据类型 radius The radius is the distance from the corner of the wedge to the outer limit of the wedge. The radius is an integer or floating-point value.(默认值为 3) Double startAngle The startAngle is an integer or floating-point value from 0 to 360.The start angle is measured counterclockwise from the positive x-axis (3:00 on a clock) to the closest edge of the wedge.(默认值为 0) Double endAngle The endAngle is an integer or floating-point value from 0 to 360.The end angle is measured counterclockwise from the positive x-axis (3:00 on a clock) to the outer edge of the wedge.(默认值为 90) Double units Defines the units of the neighborhood.CELL—The unit of measurement is in cells.MAP—The units are in map coordinates.(默认值为 CELL) String

## 属性

 属性 说明 数据类型 radius(可读写) radius 是从楔形角到楔形外部界限的距离。 radius 是整数或浮点值。 Double startAngle(可读写) startAngle 表示一个范围为 0 到 360 的值。 它可以是整型或浮点型。按逆时针方向测量起始角（x 轴正向（3 点钟方向）到最近的楔形边）。 Double endAngle(可读写) endAngle 表示一个范围为 0 到 360 的值。 它可以是整型或浮点型。按逆时针方向测量 endAngle（x 轴正向（3 点钟方向）到楔形外边缘）。 Double units(可读写) 定义邻域单位。CELL—单位为像元的数量。MAP—单位位于地图坐标中。 String

## 代码示例

NbrWedge 示例 1（Python 窗口）

``````import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outNbrWedge = BlockStatistics("block", NbrWedge(5, 10.5, 40, "MAP"))
outNbrWedge.save("C:/sapyexamples/output/blstatsnbrw2")``````
NbrWedge 示例 2（独立脚本）

``````# Name: NbrWedge_Ex_02.py
# Description: Uses the NbrWedge object to execute BlockStatistics tool
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inRaster = "block"

# Create the Neighborhood Object
startAngle = 5
endAngle = 10

myNbrWedge = NbrWedge(radius, startAngle, endAngle, "")

# Execute BlockStatistics
outBlkStats =  BlockStatistics(inRaster, myNbrWedge, "MINIMUM", "DATA")

# Save the output
outBlkStats.save("C:/sapyexamples/output/blkst_wedge4")``````