邻域选择 (地统计分析)

许可等级:BasicStandardAdvanced

摘要

基于用户定义的邻域创建点图层。

邻域选择工具对话框
输出图层包含具有 10 个蓝色选中点的选择集。

例如,您可能要在输入点所定义的位置周围的圆形邻域创建点选择范围。上图显示了输出结果处于该圆形内的 10 个蓝色点。

用法

语法

GANeighborhoodSelection_ga (in_dataset, out_layer, point_coord, neighbors_max, neighbors_min, minor_semiaxis, major_semiaxis, angle, {shape_type})
参数说明数据类型
in_dataset

用于创建邻域选择的点。

Feature Layer
out_layer

存储邻域选择的图层。

Feature Layer
point_coord

邻域中心的 x,y 坐标。

Point
neighbors_max

每个扇区中所要使用的点数。如果某个扇区具有所需点数,则使用该扇区中的所有点。

Long
neighbors_min

每个扇区中所要使用的最小点数。如果任何指定扇区中的点数都没有达到所需的最小值,则会选择扇区之外最近的可用点。

Long
minor_semiaxis

搜索邻域短半轴的尺寸。

Double
major_semiaxis

搜索邻域长半轴的尺寸。

Double
angle

邻域轴的旋转角度。

Double
shape_type
(可选)

邻域的几何。

  • 单扇区 单个椭圆
  • 四扇区 分为四个扇区的椭圆
  • 偏移四扇区 分为四个扇区且偏移 45 度的椭圆
  • 八扇区 分为八个扇区的椭圆
String

代码实例

NeighborhoodSelection 示例 1(Python 窗口)

基于某项邻域标准创建要素图层。

import arcpy
from arcpy import env
env.workspace = "C:/gapyexamples/data"
arcpy.GANeighborhoodSelection_ga("ca_ozone_pts", "outNS", "-2000000 -50000", 
                                 "20", "5","200000", "200000", "0", "One sector")
NeighborhoodSelection 示例 2(独立脚本)

基于某项邻域标准创建要素图层。

# Name: NeighborhoodSelection_Example_02.py
# Description: Creates a layer of points based on a user-defined neighborhood.
# Requirements: Geostatistical Analyst Extension

# Import system modules
import arcpy

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

# Set local variables
inPoints = "ca_ozone_pts.shp"
outLayer = "outNS"
pointCoord = "-2000000 -50000"
maxNeighbors = 20
minNeighbors = 5
majSemiaxis = 200000
minSemiaxis = 200000
angle = 0
shape = "One Sector"

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

# Execute NeighborhoodSelection
arcpy.GANeighborhoodSelection_ga(inPoints, outLayer, pointCoord, maxNeighbors,
                                 minNeighbors, majSemiaxis, minSemiaxis, angle,
                                 shape)

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 需要 Geostatistical Analyst
ArcGIS for Desktop Standard: 需要 Geostatistical Analyst
ArcGIS for Desktop Advanced: 需要 Geostatistical Analyst
5/10/2014