SearchNeighborhoodStandard
汇总
语法
SearchNeighborhoodStandard({majorSemiaxis}, {minorSemiaxis}, {angle}, {nbrMax}, {nbrMin}, {sectorType})
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
majorSemiaxis (可选) |
以地图单位表示的距离,指定从其中选择数据的椭圆的长半轴长度。 |
Double |
|
minorSemiaxis (可选) |
以地图单位表示的距离,指定从其中选择数据的椭圆的短半轴长度。 |
Double |
|
angle (可选) |
搜索椭圆的角度。 |
Double |
|
nbrMax (可选) |
要在进行预测时使用的搜索椭圆内的最大相邻要素数。 |
Long |
|
nbrMin (可选) |
要在进行预测时使用的搜索椭圆内的最小相邻要素数。 |
Long |
|
sectorType (可选) |
搜索椭圆可分为 1 个,4 个,4 个且偏移为 45º,或 8 个分区。 |
String |
属性
| 名称 | 说明 | 数据类型 |
|---|---|---|
|
angle (读取和写入) |
搜索椭圆的角度。 |
Double |
|
majorSemiaxis (读取和写入) |
以地图单位表示的距离,指定在其中选择数据的椭圆的长半轴长度。 |
Double |
|
minorSemiaxis (读取和写入) |
以地图单位表示的距离,指定在其中选择数据的椭圆的短半轴长度。 |
Double |
|
nbrMax (读取和写入) |
要在进行预测时使用的搜索椭圆内的最大相邻要素数。 |
Long |
|
nbrMin (读取和写入) |
要在进行预测时使用的搜索椭圆内的最小相邻要素数。 |
Long |
|
nbrType (只读) |
邻域类型:平滑或标准。 |
String |
|
sectorType (读取和写入) |
搜索椭圆可分为 1 个,4 个,4 个且偏移为 45º,或 8 个分区。 |
String |
代码示例
SearchNeighborhoodStandard 结合反距离权重法生成输出栅格。
import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
arcpy.ga.IDW("ca_ozone_pts", "OZONE", "outIDW", "C:/gapyexamples/output/idwout", "2000", "2",
arcpy.SearchNeighborhoodStandard(300000, 300000, 0, 15, 10, "ONE_SECTOR"), "")
SearchNeighborhoodStandard 结合反距离权重法生成输出栅格。
# Name: InverseDistanceWeighting_Example_02.py
# Description: Interpolate a series of point features onto a rectangular raster
# using Inverse Distance Weighting (IDW).
# Requirements: Geostatistical Analyst extension
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"
# Set local variables
inPointFeatures = "ca_ozone_pts.shp"
zField = "OZONE"
outLayer = "outIDW"
outRaster = "C:/gapyexamples/output/idwout"
cellSize = 2000.0
power = 2
# Set variables for search neighborhood
majSemiaxis = 300000
minSemiaxis = 300000
angle = 0
maxNeighbors = 15
minNeighbors = 10
sectorType = "ONE_SECTOR"
searchNeighbourhood = arcpy.SearchNeighborhoodStandard(majSemiaxis, minSemiaxis,
angle, maxNeighbors,
minNeighbors, sectorType)
# Run IDW
arcpy.ga.IDW(inPointFeatures, zField, outLayer, outRaster, cellSize,
power, searchNeighbourhood)