<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Kernel Interpolation with Barrier - Python Issue (bug?) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620266#M48321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't help you with the fact that there is no parameter for search neighbourhood, but if you post your script leading up to the error, we may be able to figure that out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2017 21:08:56 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2017-02-15T21:08:56Z</dc:date>
    <item>
      <title>Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620265#M48320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;The link for the method is here:&amp;nbsp;&lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/latest/tools/geostatistical-analyst-toolbox/kernel-interpolation-with-barriers.htm" title="https://desktop.arcgis.com/en/arcmap/latest/tools/geostatistical-analyst-toolbox/kernel-interpolation-with-barriers.htm"&gt;Kernel Interpolation With Barriers—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;ERROR 040008: Input value is out of range.&lt;BR /&gt;Failed to execute (KernelInterpolationWithBarriers).&lt;/P&gt;&lt;P&gt;I also tried to run the tool from within ArcMap but it also does not have a spot to input the search neighborhood.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to figure out a way to include the Search Neighborhood environment in the script but I haven't found a way.&lt;/P&gt;&lt;P&gt;Does anyone have a solution to this or any feedback?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 20:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620265#M48320</guid>
      <dc:creator>BryanNicholson</dc:creator>
      <dc:date>2017-02-15T20:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620266#M48321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't help you with the fact that there is no parameter for search neighbourhood, but if you post your script leading up to the error, we may be able to figure that out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 21:08:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620266#M48321</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2017-02-15T21:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620267#M48322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bryan,&lt;/P&gt;&lt;P&gt;You are correct that the Kernel Interpolation with Barriers geoprocessing tool does not have a search neighborhood option.&amp;nbsp; This option is only available in the Geostatistical Wizard and only for Exponential, Gaussian, and Constant kernel types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you can automate your process using the &lt;A href="http://resources.arcgis.com/en/help/main/10.1/#/Create_Geostatistical_Layer/003000000015000000/"&gt;Create Geostatistical Layer&lt;/A&gt; geoprocessing tool.&amp;nbsp; This tool takes a model source as input and allows you to apply that model source to a new dataset.&amp;nbsp; To create the model source, use the Geostatistical Wizard and perform Kernel Smoothing with the parameters that you want (it doesn't matter which dataset you use).&amp;nbsp; When you click Finish, there will be a "Save..." option on the Method Report dialog.&amp;nbsp; This will allow you to save an xml file that will serve as the model source in Create Geostatistical Layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your Python script, run Create Geostatistical Layer for each of your datasets, and use the xml from before as the model source for all of them.&amp;nbsp; Since you are using ArcMap 10.1, you will need to provide your datasets and fields as strings (more recent versions can use an arcpy class).&amp;nbsp; See the script examples in the tool documentation above, and feel free to post more questions if you run into any problems with the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 22:17:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620267#M48322</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2017-02-15T22:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620268#M48323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply, I think this is what I needed. I'm just having an issue on the implementation. I'll post some code here for you to look at. I've never pasted code here before so I hope I'm doing this right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I am getting this error:&lt;/P&gt;&lt;P&gt;Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000840: The value is not a Geostatistical Layer.&lt;BR /&gt;ERROR 000814: Invalid file type&lt;BR /&gt;ERROR 045001: Input dataset(s) error. Invalid number of datasets. Model requires 2 inputs vs provided 1&lt;BR /&gt;Failed to execute (GACreateGeostatisticalLayer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a snippet of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CheckOutExtension("GeoStats")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Is this supposed to be the .xml file?&amp;nbsp;&lt;/P&gt;&lt;P&gt;KS_Model = "C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# I think my main issue is here, the documentation isn't clear on what the X=Shape, F1='OZONE' , etc. is supposed to be in my case. I think I need to leave the zField variable in here somehow so that it knows which field to include in the model for each iteration. BH_Points_export is a feature class, btw, should it be a shp?&lt;BR /&gt; inData = "C:/Arc_Workspace/Metals_Workspace.gdb/BH_Points_export " + zField&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# zField is the field.aliasname of the field that has the z values for the Kernel prediction&lt;BR /&gt; outGL = str(zField)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#str() to make sure it is a string input&lt;BR /&gt; &lt;BR /&gt;OutKSlyr = arcpy.GACreateGeostatisticalLayer_ga(KS_Model, inData, outGL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# I've also tried using this, but I get the same error:&lt;/P&gt;&lt;P&gt;OutKSlyr = arcpy.GACreateGeostatisticalLayer_ga("C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml",&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; "C:/Arc_Workspace/Metals_Workspace.gdb/BH_Points_export F1=FieldName",&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"outGL")&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 14:56:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620268#M48323</guid>
      <dc:creator>BryanNicholson</dc:creator>
      <dc:date>2017-02-16T14:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620269#M48324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your syntax should be something like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.GACreateGeostatisticalLayer_ga("C:/temp/myModelSource.xml", "C:/temp/myDataset.shp myField", "myNewGALayer")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first parameter should be a file path to the xml.&amp;nbsp; The second parameter will be a string where you first specify the file path to the dataset (shp and fgdb both work) followed by a space, then the name of the field.&amp;nbsp; The third parameter is the name of the new geostatistical layer that is created by applying the parameter from the model source to the new dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since geostatistical layers are saved in memory, you probably also want to save them as a layer file on disk so that you can easily open them in maps.&amp;nbsp; After the code above, use something like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.SaveToLayerFile_management("myNewGALayer","C:/temp/galayerfile.lyr")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the X, Y, and F1 options that appear in the example, these options are not required in your case.&amp;nbsp; They are used when the X and Y coordinates of the points are stored in fields rather than in the SHAPE attribute of the feature class. If your datasets were, for example, csv files (which don't have a SHAPE attribute), you could pass the X coordinates, the Y coordinates, and the field (F1) using those options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One final question... are you using any barriers in your interpolation?&amp;nbsp; If so, I'll need to give a slightly different code example of how to do that.&amp;nbsp; If you aren't using barriers, the code above should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 17:26:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620269#M48324</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2017-02-16T17:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620270#M48325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a barrier actually. The barrier is a polyline that connects to&lt;/P&gt;&lt;P&gt;itself wherein all the points are located and interpolation is meant to&lt;/P&gt;&lt;P&gt;occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 17:52:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620270#M48325</guid>
      <dc:creator>BryanNicholson</dc:creator>
      <dc:date>2017-02-16T17:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620271#M48326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll need to alter the statement to something like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.GACreateGeostatisticalLayer_ga("C:/temp/myModelSource.xml", "C:/temp/myDataset.shp myField ; C:/temp/myBarriers.shp", "myNewGALayer")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is that you need to pass the feature class, the field, and the barriers in a single string.&amp;nbsp; You separate the two datasets with a semicolon like in the example above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 18:00:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620271#M48326</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2017-02-16T18:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620272#M48327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, so I have this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fields = arcpy.ListFields(inFeature)&lt;BR /&gt; for field in fields:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FieldName = field.aliasName&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if TwoAcid in FieldName:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#TwoAcid is just a string I'm scanning for in each field in the table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zField = str(FieldName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.GACreateGeostatisticalLayer_ga("C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml",&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"C:/Arc_Workspace/Metals_Workspace.gdb/BH_Points_export field;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;C:/Arc_Workspace/Metals_Workspace.gdb/Water_Boundary",&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"outGL")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000840: The value is not a Geostatistical Layer.&lt;BR /&gt;ERROR 000814: Invalid file type&lt;BR /&gt;ERROR 045001: Input dataset(s) error. `Dataset`: Field `field` does not exist&lt;BR /&gt;Failed to execute (GACreateGeostatisticalLayer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this same error message above when using zField in place of 'field'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried placing the anticipated field name in the 'field' spot, to which I get this error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000840: The value is not a Geostatistical Layer.&lt;BR /&gt;ERROR 000814: Invalid file type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I still missing something in my code, should I convert the feature class's into shapefiles?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Bryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 20:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620272#M48327</guid>
      <dc:creator>BryanNicholson</dc:creator>
      <dc:date>2017-02-16T20:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620273#M48328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small update. I used the Feature class to Shapefile tool to convert the input feature class and the barrier into shapefiles. After running the script again I continue to get the same errors related to a non-existent Field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 20:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620273#M48328</guid>
      <dc:creator>BryanNicholson</dc:creator>
      <dc:date>2017-02-16T20:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620274#M48329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have a couple problems.&amp;nbsp; First, use the field name, not the field alias.&lt;/P&gt;&lt;P&gt;Change this line: &lt;EM&gt;FieldName = field.aliasName&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FieldName = field.name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later in the code, you need to pass the variable into the tool with:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.GACreateGeostatisticalLayer_ga("C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"C:/Arc_Workspace/Metals_Workspace.gdb/BH_Points_export &lt;SPAN style="color: #ff0000;"&gt;" + FieldName + "&lt;/SPAN&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;C:/Arc_Workspace/Metals_Workspace.gdb/Water_Boundary",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"outGL")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you pass "field" inside the string of the parameter, it won't be recognized as a variable.&amp;nbsp; It will look for a field called "field" and fail when it doesn't find one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also want to store the output geostatistical layer (the last parameter) as a variable.&amp;nbsp; If you keep the same name ("outGL") for each iteration, it will just get overwritten after each iteration.&amp;nbsp; Or you can save each one as a layer file, but those will also need unique names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not the greatest Python programmer, and I can't directly test this without your data, but I think what I just outlined will work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Optionally, you may want to also consider storing all of the parameters as variables in order to make it easier to read and understand.&amp;nbsp; Something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;inXML = "C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;inPoints = "C:/Arc_Workspace/Metals_Workspace.gdb/BH_Points_export"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;infield = "&amp;lt;your field&amp;gt;"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;inBarrier = "C:/Arc_Workspace/Metals_Workspace.gdb/Water_Boundary"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;inDataset = inPoints + " " + infield + ";" + inBarrier&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;outGAlayer = "outGL"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 11pt;"&gt;&lt;EM&gt;arcpy.GACreateGeostatisticalLayer_ga(inXML, inDataset, outGALayer)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 20:59:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620274#M48329</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2017-02-16T20:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620275#M48330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, so I applied your suggestions but I continued to receive the same error about it not being a geostat layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I eventually replaced the inXML from this:&amp;nbsp;&lt;EM style="color: #333333; background-color: #ffffff; border: 0px; font-size: 14.6667px;"&gt;"C:/Arc_Workspace/Metals_Workspace.gdb/KernelS_Template.xml"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;to this:&amp;nbsp;"C:/Arc_Workspace/Kernel_Smoothing_2.lyr",&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, thanks a lot for your continued help and timely responses! Now I just have an ApplySymbology issue I need to figure out!&lt;/P&gt;&lt;P&gt;-Bryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620275#M48330</guid>
      <dc:creator>BryanNicholson</dc:creator>
      <dc:date>2017-02-17T15:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel Interpolation with Barrier - Python Issue (bug?)</title>
      <link>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620276#M48331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear that it is working for you now.&amp;nbsp; Create Geostatistical Layer does accept both layer files and xml files as input.&amp;nbsp; 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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 16:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/kernel-interpolation-with-barrier-python-issue-bug/m-p/620276#M48331</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2017-02-17T16:04:11Z</dc:date>
    </item>
  </channel>
</rss>

