设置模型参数 (地统计分析)

许可等级:BasicStandardAdvanced

摘要

在现有的地统计模型源中设置参数值。

用法

语法

GASetModelParameter_ga (in_ga_model_source, model_param_xpath, in_param_value, out_ga_model)
参数说明数据类型
in_ga_model_source

要分析的地统计模型源。

File; Geostatistical Layer
model_param_xpath

所需模型参数的 XML 路径。

String
in_param_value

由 XML 路径定义的参数值。

String
out_ga_model

利用在 XML 路径中定义的参数值创建的地统计模型。

File

代码实例

SetModelParameter 示例 1(Python 窗口)

更改地统计模型源中的参数值。

import arcpy
from arcpy import env
env.workspace = "C:/gapyexamples/data"
newParam = arcpy.GASetModelParameter_ga(
    "C:/gapyexamples/data/kriging.lyr", 
    "/model[@name = 'Kriging']/model[@name = 'Variogram']/value[@name = 'Nugget']",
    "1", "C:/gapyexamples/output/outModel.xml")
print newParam
SetModelParameter 示例 2(独立脚本)

更改地统计模型源中的参数值。

# Name: GASetModelParameter_Example_02.py
# Description: Sets parameter value in an existing geostatistical model source.
# Requirements: Geostatistical Analyst Extension

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"

# Set local variables
modelSource = "C:/gapyexamples/data/kriging.lyr"
xmlPath = "/model[@name = 'Kriging']/model[@name = 'Variogram']/value[@name = 'Nugget']"
newValue = 1
outModel = "C:/gapyexamples/output/outModel.xml"

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

# Execute GASetModelParameter
newParam = arcpy.GASetModelParameter_ga(modelSource, xmlPath, newValue, outModel)

# Show results
print newParam

环境

此工具不使用任何地理处理环境

相关主题

许可信息

ArcGIS for Desktop Basic:需要 Geostatistical Analyst
ArcGIS for Desktop Standard:需要 Geostatistical Analyst
ArcGIS for Desktop Advanced:需要 Geostatistical Analyst
9/15/2013