ArcGIS 9.3.1Python 2.5I am getting differences in raster outputs when a point layer is run thru Kriging process via the Spatial Analyst toolbar/extension and when run in code (Python 2.5). I am wondering if there are some default values the SA tool uses when no values are present in the dialog.There are only 2 inputs I am attempting: Semivariogram model: Ordinary/Linear and Output Cell Size: 528 (the Lag size gets set to this as well). Everything remains the same in the Python code I am using but the output raster is MUCH smoother than the output generated by the Python code.Even after reclassifying the output raster, it is still very coarse in comparison to the output (temporary) raster that gets generated by the SA tool.Any input is much appreciated!
def genContourKRIG(inPTS, zfld):
try:
# Set the output workspace name
path = oLoc #os.path.expanduser("~")
gp.Workspace = path
rastername = str(gp.GetParameter(1))
gp.overwriteoutput = 1
# Set the input feature dataset
inputFeatureDataset = inPTS
# Set the output raster name
if rastername !="":
outputRaster = rastername
else:
outputRaster = "Krig_1"
# Don't write out the variance raster
Output_variance_of_prediction_raster = ""
# Set the output extent
desc = gp.describe(inPTS)
xmin = 877223.554167 #desc.Extent.XMin #hard-coded for now
ymin = 368517.887500 #desc.Extent.YMin #hard-coded for now
xmax = 877223.554167 #desc.Extent.XMax #hard-coded for now
ymax = 368517.887500 #desc.Extent.YMax #hard-coded for now
gp.Extent = "877223.554167 368517.887500 877223.554167 368517.887500" #hard-coded for now
# Set the attribute field
attributeName = zfld
# Check out Spatial Analyst extension license
gp.CheckOutExtension("Spatial")
# Process: Kriging...
gp.Kriging_sa(inputFeatureDataset, attributeName, outputRaster, "Linear", "528", "VARIABLE 12", Output_variance_of_prediction_raster)
except:
# If an error occurred while running a tool, then print the messages
gp.AddMessage(gp.GetMessages())