Select to view content in your preferred language

Kernel Interpolation with Barrier - Python Issue (bug?)

2811
11
Jump to solution
02-15-2017 12:57 PM
BryanNicholson
Deactivated User

Hello all, I have perhaps an odd issue with regards to the Kernel Interpolation with Barriers (KIB) prediction method using Python (2.7) and ArcGIS 10.1.

First, using the Geostatistical Analyst wizard to perform the KIB, or Kernel Smoothing as it is referred to in the wizard, works fine and dandy. However, I want to move the KIB from the wizard into a python script so I can automate it for ~100 maps. 

First, here are some parameters I use and want to apply from the wizard: Function=Exponential; Surface Type=Prediction; Bandwidth=1000; Smoothing Factor=0.2; and Radius=8000.

The link for the method is here: Kernel Interpolation With Barriers—Help | ArcGIS Desktop 

The issue is that the KIB does not have a place to put the Smoothing and Radius (Search Neighborhood) information into the python script. I tried to run the script without it but I get this error:

ERROR 040008: Input value is out of range.
Failed to execute (KernelInterpolationWithBarriers).

I also tried to run the tool from within ArcMap but it also does not have a spot to input the search neighborhood. 

I tried to figure out a way to include the Search Neighborhood environment in the script but I haven't found a way.

Does anyone have a solution to this or any feedback?

Thank you!

0 Kudos
11 Replies
BryanNicholson
Deactivated User

Alright, so I applied your suggestions but I continued to receive the same error about it not being a geostat layer. 

I eventually replaced the inXML from this: "C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml"

to this: "C:/Arc_Workspace/Kernel_Smoothing_2.lyr",

where the "Kernel_Smoothing_2.lyr" is the output from the Kernel Smoothing prediction of the Geostatistical Analyst wizard (the same one where the xml template came from), and it worked!

Apparently it really wanted the input to be a layer and not a xml file? Which is weird because the documentation says it can accept a 'File' as input. 

Anyway, thanks a lot for your continued help and timely responses! Now I just have an ApplySymbology issue I need to figure out!

-Bryan

0 Kudos
EricKrause
Esri Regular Contributor

Glad to hear that it is working for you now.  Create Geostatistical Layer does accept both layer files and xml files as input.  I don't know why you could only get the layer file to work, but I guess it isn't worth worrying about now that you have your script working.

0 Kudos