KrigingModelOrdinary (arcpy.sa)
摘要
定义普通克里金法模型。可用模型类型包括“球面”、“圆”、“指数”、“高斯”和“线性”。
讨论
KrigingModelOrdinary 对象用于克里金法工具。
普通克里金法假设模型为:
Z(s) = µ + ε(s)
lagSize 的默认值为默认的输出像元大小。
如果未指定 majorRange、partialSill 和 nugget 的默认值,将在内部计算默认值。
语法
| 参数 | 说明 | 数据类型 | 
| semivariogramType | Semivariogram model to be used. 
 (默认值为 SPHERICAL) | String | 
| lagSize | The lag size to be used in model creation. The default is the output raster cell size. | Double | 
| majorRange | Represents a distance beyond which there is little or no correlation. | Double | 
| partialSill | The difference between the nugget and the sill. | Double | 
| nugget | Represents the error and variation at spatial scales too fine to detect. The nugget effect is seen as a discontinuity at the origin. | Double | 
属性
| 属性 | 说明 | 数据类型 | 
| semivariogramType (读写) | Semivariogram model to be used. 
 
 | String | 
| lagSize (读写) | The lag size to be used in model creation. The default is the output raster cell size. | Double | 
| majorRange (读写) | Represents a distance beyond which there is little or no correlation. | Double | 
| partialSill (读写) | The difference between the nugget and the sill. | Double | 
| nugget (读写) | Represents the error and variation at spatial scales too fine to detect. The nugget effect is seen as a discontinuity at the origin. | Double | 
代码实例
演示如何创建 KrigingModelOrdinary 对象以及如何在 Python 窗口的 Kriging 工具中使用该对象。
import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
kModelOrdinary = KrigingModelOrdinary("CIRCULAR", 70000, 250000, 180000, 34000)
outKrigingOrd1 = Kriging("ca_ozone_pts.shp", "ELEVATION", kModelOrdinary, 2000, RadiusVariable(),"")
outKrigingOrd1.save("C:/sapyexamples/output/kordinary1")
使用 KrigingModelOrdinary 对象计算 Kriging 表面。
# Name: KrigingModelOrdinary_Ex_02.py
# Description: Uses the KrigingModelOrdinary object to execute the Kriging 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
inPointFeature = "ca_ozone_pts.shp"
outVarRaster = "C:/sapyexamples/output/ovariance2"
# Create KrigingModelOrdinary Object
lagSize = 70000
majorRange = 250000
partialSill = 180000
nugget = 34000
kModelOrdinary = KrigingModelOrdinary("CIRCULAR", lagSize, majorRange,
                                         partialSill, nugget)
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
# Execute Kriging
outKrigingOrd2 = Kriging(inPointFeature, "ELEVATION", kModelOrdinary, 2000,
                     RadiusFixed(200000, 10), outVarRaster)
# Save the output 
outKrigingOrd2.save("C:/sapyexamples/output/kordinary2")