ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 合约
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

NbrWedge

需要 Spatial Analyst 许可。

  • 摘要
  • 插图
  • 讨论
  • 语法
  • 属性
  • 代码实例

摘要

定义通过指定半径和两个角度(以地图单位或像元数为单位)而创建的楔形邻域。

插图

FocalStatistics 函数的 NbrWedge 邻域
FocalStatistics 函数的 NbrWedge 邻域示例(半径 3 像元,起始角度 0,终止角度 90)。
BlockStatistics 函数的 NbrWedge 邻域
BlockStatistics 函数的 NbrWedge 邻域示例(半径 = 3 像元,起始角度 = 0,终止角度 = 270)。

讨论

使用楔形邻域对象的工具包括:块统计、焦点统计、点统计和点密度。

楔形由半径、起始角度、终止角度及单位进行指定。楔形按逆时针方向从起始角延伸到终止角。角度为算术度(基于 x 轴正向按逆时针方向进行测量)。也可使用负角度。

半径用像元单位或地图单位标识并且沿着垂直于 x 轴或 y 轴的方向进行测量。采用地图单位指定半径时,会将其转换为以像元为单位的半径。所得的以像元为单位的半径会生成一个区域,该区域能够近似地表示出使用原始的地图单位为半径时计算的区域。中心位于楔形内的所有像元都将包括在邻域的处理范围内。

语法

 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
(读写)

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.

Double
startAngle
(读写)

startAngle表示一个范围为 0 到 360 的值。它可以是整型或浮点型。

按逆时针方向测量起始角(x 轴正向(3 点钟方向)到最近的楔形边)。

Double
endAngle
(读写)

endAngle 表示一个范围为 0 到 360 的值。它可以是整型或浮点型。

按逆时针方向测量 endAngle(x 轴正向(3 点钟方向)到楔形外边缘)。

Double
units
(读写)

Defines the units of the neighborhood.

String

代码实例

NbrWedge 示例 1(Python 窗口)

演示如何创建 NbrWedge 类以及如何在 Python 窗口的 BlockStatistics 工具中使用该类。

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(独立脚本)

使用 NbrWedge 类执行 BlockStatistics 工具。

# 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
radius = 5
startAngle = 5
endAngle = 10

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

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

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

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

相关主题

  • Spatial Analyst 类概述
  • 邻域类概述
有关此主题的反馈?

ArcGIS for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明