RadiusVariable (arcpy.sa)

サマリ

Defines a variable search radius by specifing a maximum distance and the number of points for analysis. If the number of points cannot be satisfied within that maximum distance, a smaller number of points will be used.

説明

Tools that use radius objects: Kriging and IDW.

構文

RadiusVariable ({numberOfPoints}, {maxDistance})
パラメータ説明データ タイプ
numberOfPoints

The numberOfPoints is an integer value specifying the number of nearest input sample points to be used to perform the interpolation.

(デフォルト値は次のとおりです 12)

Long
maxDistance

The maxDistance specifies the distance, in map units, by which to limit the search for the nearest input sample points. The default value is the length of the extent's diagonal.

If the number of points cannot be satisfied within that distance, a smaller number of points will be used.

Double

特性

プロパティ説明データ タイプ
numberOfPoints
(読み書き)

The numberOfPoints is an integer value specifying the number of nearest input sample points to be used to perform the interpolation.

Long
maxDistance
(読み書き)

The maxDistance specifies the distance, in map units, by which to limit the search for the nearest input sample points. If the number of points cannot be satisfied within that distance, a smaller number of points will be used.

Double

コードのサンプル

RadiusVariable example 1 (Python window)

Demonstrates how to create a RadiusVariable class and use it in the Kriging tool within the Python window.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myRadius = RadiusVariable(12)
outKriging = Kriging("ca_ozone_pts.shp", "ELEVATION", "SPHERICAL", 2000, myRadius, "C:/sapyexamples/output/krigvpradiusv")
outKriging.save("C:/sapyexamples/output/krigradvar")
RadiusVariable example 2 (stand-alone script)

Calculates a surface with the Idw interpolation tool using the RadiusVariable class.

# Name: RadiusVariable_Ex_02.py
# Description: Uses the RadiusVariable 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 Variable
numberOfPoints = 5
maxDistance = 200000
searchRadius = RadiusVariable(numberOfPoints, maxDistance)

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

# Execute IDW
outIDWRadVar = Idw(inFeature, "elevation", 2000, 3, searchRadius)

# Save the output 
outIDWRadVar.save("C:/sapyexamples/output/idwradvar")

関連トピック

4/26/2014