# KrigingModelUniversal (arcpy.sa)

## 讨论

KrigingModelUniversal 对象用于克里金法工具。

` Z(s) = µ(s) +  ε(s)`

lagSize 的默认值为默认的输出像元大小。

## 语法

KrigingModelUniversal ({semivariogramType}, {lagSize}, {majorRange}, {partialSill}, {nugget})
 参数 说明 数据类型 semivariogramType Semivariogram model to be used. LINEARDRIFT —Universal Kriging with linear drift. QUADRATICDRIFT — Universal Kriging with quadratic drift. (默认值为 LINEARDRIFT) 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. LINEARDRIFT —Universal Kriging with linear drift.QUADRATICDRIFT —Universal Kriging with quadratic drift. 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

## 代码实例

KrigingModelUniversal 示例 1（Python 窗口）

``````import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
kModelUniversal = KrigingModelUniversal("LINEARDRIFT", 70000, 250000, 180000, 34000)
outKrigingUni1 = Kriging("ca_ozone_pts.shp", "ELEVATION", kModelUniversal, 2000, RadiusVariable(),"")
outKrigingUni1.save("C:/sapyexamples/output/kuniversal1")
``````
KrigingModelUniversal 示例 2（独立脚本）

``````# Name: KrigingModelUniversal_Ex_02.py
# Description: Uses the KrigingModelUniversal 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/uvariance2"

# Create KrigingModelUniversal Object
lagSize = 70000
majorRange = 250000
partialSill = 180000
nugget = 34000
kModelUniversalObj = KrigingModelUniversal("LINEARDRIFT", lagSize, majorRange,
partialSill, nugget)

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

# Execute
outKrigingUni2 = Kriging(inPointFeature, "ELEVATION", kModelUniversalObj, 2000,