需要 Geostatistical Analyst 许可。
摘要
获取现有地统计模型源中的模型参数值。
用法
- 此工具通常用于模型或脚本中。 
- 地统计模型源是一个地统计图层或地统计模型 (XML)。 
- 有关详细信息,请参阅设置模型参数。 
- 示例输入模型源: - /model[@name = 'Kriging']/model[@name = 'Variogram']/value[@name = 'Nugget']; /model[@name = 'Kriging']/model[@name = 'Variogram']/model[@name = 'VariogramModel']/value[@name = 'Range'] - 将返回 "out_param_value" = 0.345;1127.14 
- 可以在结果窗口中查看返回的值。 
语法
GAGetModelParameter_ga (in_ga_model_source, model_param_xpath)
| 参数 | 说明 | 数据类型 | 
| in_ga_model_source | 要分析的地统计模型源。 | File; Geostatistical Layer | 
| model_param_xpath | 所需模型参数的 XML 路径。 | String | 
代码示例
GetModelParameter 示例 1(Python 窗口)
提取地统计模型源中的参数值。
import arcpy
arcpy.env.workspace = "C:/gapyexamples/data"
outParam = arcpy.GAGetModelParameter_ga(
    "C:/gapyexamples/data/kriging.lyr",
    "/model[@name = 'Kriging']/model[@name = 'Variogram']/value[@name = 'Nugget']")
print outParam
获取模型参数 (GetModelParameter) 示例 2(独立脚本)
提取地统计模型源中的参数值。
# Name: GAGetModelParameter_Example_02.py
# Description: Gets model parameter value from 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']"
# Check out the ArcGIS Geostatistical Analyst extension license
arcpy.CheckOutExtension("GeoStats")
# Execute GAGetModelParameter
outParam = arcpy.GAGetModelParameter_ga(modelSource, xmlPath)
# Show results
print outParam
环境
许可信息
- ArcGIS Desktop Basic: 需要 Geostatistical Analyst
- ArcGIS Desktop Standard: 需要 Geostatistical Analyst
- ArcGIS Desktop Advanced: 需要 Geostatistical Analyst