RadiusFixed (arcpy.sa)

摘要

通过指定分析所需的距离和最少点数定义固定搜索半径。如果在指定距离内没有找到所需数量的点,则增加搜索半径,直至找到指定最少数量的点。

讨论

使用半径对象的工具包括:克里金法反距离权重法

语法

RadiusFixed ({distance}, {minNumberOfPoints})
参数说明数据类型
distance

The distance specifies the distance as a radius within which input sample points will be used to perform the interpolation. The value of the radius is expressed in map units. The default radius is five times the cell size of the output raster.

Double
minNumberOfPoints

The minNumberOfPoints is an integer defining the minimum number of points to be used to perform the interpolation.

If the required number of points is not found within the specified distance, the search distance will be increased until the specified minimum number of points is found.

When the search radius needs to be increased, it is done so until the minNumberOfPoints fall within that radius, or the extent of the radius crosses the lower (southern) and/or upper (northern) extent of the output raster. NoData is assigned to all locations that do not satisfy the above condition.

(默认值为 0)

Long

属性

属性说明数据类型
distance
(读写)

The distance, in map units, specifying that all input sample points within the specified radius will be used to perform interpolation.

Double
minNumberOfPoints
(读写)

The minNumberOfPoints is an integer defining the minimum number of points to be used for interpolation. If the required number of points is not found within the specified distance, the search distance will be increased until the specified minimum number of points is found.

Long

代码实例

RadiusFixed 示例 1(Python 窗口)

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

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myRadius = RadiusFixed(80000)
outKriging = Kriging("ca_ozone_pts.shp", "ELEVATION", "SPHERICAL", "", myRadius)
outKriging.save("C:/sapyexamples/output/krigradfix")
RadiusFixed 示例 2(独立脚本)

通过反距离权重法插值工具使用 RadiusFixed 类计算表面。

# Name: RadiusFixed_Ex_02.py
# Description: Uses the RadiusFixed object to execute IDW 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
inFeature = "ca_ozone_pts.shp"

# Create the Radius Object
distance = 15000
minNumPoints = 3
searchRadius = RadiusFixed(distance, minNumPoints)

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

# Execute IDW
outRadFix = Idw(inFeature, "elevation", 2000, 2, searchRadius)

# Save the output 
outRadFix.save("C:/sapyexamples/output/idwradfix")

相关主题

9/15/2013