I'm trying to finish my model... but I have a problem. I need to introduce in my model a script that choise between kriging and IDW/spline interpolation. Kriging is the default method used in my model, but If kriging return an error then I want to run IDW interpolation and pass the result to another tool.
My model runs fine with kriging interpolation, raster was produced and the tool "extract values to points" run successfully.
But if the kriging method return an error and the script calculate IDW/Spline, raster output was produced but extract values to point was unable to run successfully. And I receive this statement: "All the inputs are not current"
from arcpy.sa import *
limiti = arcpy.GetParameterAsText(0)
arcpy.env.mask = limiti
arcpy.env.extent = limiti
errors = 0
inFC = arcpy.GetParameterAsText(1)
campo = arcpy.GetParameterAsText(2)
outRaster = arcpy.GetParameterAsText(3)
cellSize = 1000
Modello = "Spherical"
arcpy.Kriging_3d(inFC, campo, outRaster, Modello,cellSize, "", "")
e = sys.exc_info()
errors += 1
if errors > 0:
arcpy.Spline_3d(inFC, campo, outRaster,cellSize, "TENSION", "","")