Set Model Parameter (Geostatisical Analyst)

Nivel de licencia:BasicStandardAdvanced

Resumen

Sets parameter value(s) in an existing geostatistical model source.

Uso

Sintaxis

GASetModelParameter_ga (in_ga_model_source, model_param_xpath, in_param_value, out_ga_model)
ParámetroExplicaciónTipo de datos
in_ga_model_source

The geostatistical model source to be analyzed.

File; Geostatistical Layer
model_param_xpath

XML path to the required model parameter.

String
in_param_value

Value for the parameter defined by the XML path.

String
out_ga_model

Geostatistical model created with the parameter value defined in the XML path.

File

Ejemplo de código

SetModelParameter example 1 (Python window)

Change the value of a parameter in a geostatistical model source.

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 example 2 (stand-alone script)

Change the value of a parameter in a geostatistical model source.

# 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

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Temas relacionados

Información sobre licencias

ArcGIS for Desktop Basic: Requiere Geostatistical Analyst
ArcGIS for Desktop Standard: Requiere Geostatistical Analyst
ArcGIS for Desktop Advanced: Requiere Geostatistical Analyst
9/11/2013