<?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: Iterating Kriging with Anisotropy in ArcGIS GeoStatistical Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252261#M593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you create "&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Kriging45.lyr". ?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;Spatial Analyst's kriging output is a plain raster layer and should not be confused with a geostatistical layer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;You have to create a Geostatistical (kriging) layer by using the Geostatistical Wizard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;-Steve&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 May 2017 18:25:26 GMT</pubDate>
    <dc:creator>SteveLynch</dc:creator>
    <dc:date>2017-05-12T18:25:26Z</dc:date>
    <item>
      <title>Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252259#M591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write a python script that will run kriging interpolation with anisotropy on 700+ variables in a dataset. I've read a lot already about using the Create Geostatistical Layer tool and was able to code it but cannot get it to automatically iterate through all my fields. It seems like I'd have to manually change the field each time which is just not efficient with the number of columns I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done an iteration before for a simple IDW interpolation using ListFields but it doesn't seem to work with this interpolation method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed some light on this? I've pasted my code below. I'm VERY new to python so I apologize if it's a mess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import os&lt;BR /&gt;import arcpy&lt;BR /&gt;import arcpy, os&lt;BR /&gt;from arcpy import env&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;Sediment1999 = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\StableIsotopeData.gdb\\Sediment1999"&lt;BR /&gt;arcpy.env.workspace = r"C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\StableIsotopeData.gdb"&lt;BR /&gt;arcpy.env.extent = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\DetroitRiverBoundary.shp"&lt;BR /&gt;arcpy.env.mask = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\DetroitRiverBoundary.shp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CheckOutExtension("GeoStats")&lt;BR /&gt;fieldList = arcpy.ListFields("Sediment1999", field_type="Double")&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;fieldNames = [f.name for f in fieldList ]&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;for name in fieldNames :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Kriging45 = arcpy.GeostatisticalDatasets("C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Kriging45.lyr")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Kriging45.Sediment1999 = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\StableIsotopeData.gdb\\Sediment1999"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Kriging45.Sediment1999name = name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GACreateGeostatisticalLayer_ga("C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Kriging45.lyr", "C:\\Users\\courtney\\Desktop\\StableIsotopeData.gbd\\Sediment1999 name", "GaLayer"+name)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GALayerToRasters_ga("GALayer"+name, (os.path.join("C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Anisotropic\\Sediment\\1999", name+".tif")), "PREDICTION")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;arcpy.CheckInExtension("GeoStats")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Below is the error message I get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:\Python27\ArcGIS10.4\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec codeObject in __main__.__dict__&lt;BR /&gt;&amp;nbsp; File "E:\Work\Miscellaneous\Mundle Stable Isotope\KrigingCodeYearSpecific.py", line 20, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GACreateGeostatisticalLayer_ga("C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Kriging45.lyr", "C:\\Users\\courtney\\Desktop\\StableIsotopeData.gbd\\Sediment1999 name", "GaLayer"+name)&lt;BR /&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\ga.py", line 1297, in GACreateGeostatisticalLayer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 045001: Input dataset(s) error. Table of inputs is not complete.&lt;BR /&gt;Failed to execute (GACreateGeostatisticalLayer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Courtney&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 17:51:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252259#M591</guid>
      <dc:creator>CourtneySpencer</dc:creator>
      <dc:date>2017-05-12T17:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252260#M592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you might try cleaning up the script and used the named variables approach in the last example of code in the help topic&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/geostatistical-analyst-toolbox/create-geostatistical-layer.htm"&gt;http://desktop.arcgis.com/en/arcmap/latest/tools/geostatistical-analyst-toolbox/create-geostatistical-layer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;just to make sure that you have the right inputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 18:14:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252260#M592</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-05-12T18:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252261#M593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you create "&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Kriging45.lyr". ?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;Spatial Analyst's kriging output is a plain raster layer and should not be confused with a geostatistical layer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;You have to create a Geostatistical (kriging) layer by using the Geostatistical Wizard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;-Steve&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 18:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252261#M593</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2017-05-12T18:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252262#M594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the Geostatistical Wizard and ran the kriging with anisotropy first to get a result then saved it to a layer file. I initially had an .xml file and tried this method but when it didn't work I tried the layer file instead. Still didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've read about using the intitial .xml or . lyr as a template then just re-running the Create Geostatistical Layer tool on each of my variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 18:29:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252262#M594</guid>
      <dc:creator>CourtneySpencer</dc:creator>
      <dc:date>2017-05-12T18:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252263#M595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have Kriging45 =&amp;nbsp;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;GeostatisticalDatasets&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;ga_layer&lt;/SPAN&gt;&lt;SPAN class=""&gt;) now you want to rather use another field, so&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Kriging45.dataset1Field = whatever this field is called. dataset1Field is the property that you want to set (or get).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;and likewise&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Kriging45.dataset1 = name of the featureclass&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 18:54:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252263#M595</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2017-05-12T18:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252264#M596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Steve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that I can manually change the variable name in the tool parameters to interpolate each time but I was wondering if there was a way to automatically loop through all my variables without having to change the parameters each time? I have over 700 variables per dataset (of which I have about 10). That'll just take too long.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 13:13:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252264#M596</guid>
      <dc:creator>CourtneySpencer</dc:creator>
      <dc:date>2017-05-15T13:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating Kriging with Anisotropy</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252265#M597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just thought I would update my original question with the solution my colleague and I discovered in case anyone else has the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Name: FinalKrigingCode.py&lt;BR /&gt;# Description: Uses an existing Geostatistical Layer (xml file) as a template&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; to interpolate another variable, then exports the new Geostatistical&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; Layer as a raster layer. Uses the ListFields function to iterate through&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; all fields within the shapefile.&lt;BR /&gt;# Requirements: Geostatistical Analyst Extension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import system modules&lt;BR /&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;BR /&gt;arcpy.env.workspace = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope"&lt;BR /&gt;arcpy.env.extent = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\DetroitRiverBoundary.shp"&lt;BR /&gt;arcpy.env.mask = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\DetroitRiverBoundary.shp"&lt;BR /&gt;Sediment1999 = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Sediment1999.shp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Check out the ArcGIS Geostatistical Analyst extension license&lt;BR /&gt;arcpy.CheckOutExtension("GeoStats")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Execute FieldList&lt;BR /&gt;fieldList = arcpy.ListFields(Sediment1999, field_type="Double")&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;fieldNames = [f.name for f in fieldList ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for name in fieldNames:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Set local variables - CreateGeostatisticalLayer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inLayer = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Kriging45.xml"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inData = "C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Sediment1999.shp F1="+name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outLayer = name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Execute CreateGeostatisticalLayer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GACreateGeostatisticalLayer_ga(inLayer, inData, outLayer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Set local variables - GALayerToGrid&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inLayer = name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outGrid = (os.path.join("C:\\Users\\courtney\\Desktop\\MundleStableIsotope\\Anisotropic\\Sediment\\1999", name+".tif"))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cellSize = 30&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cellptsHor = 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cellptsVer = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Execute GALayerToGrid&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GALayerToGrid_ga(inLayer, outGrid, cellSize, cellptsHor, cellptsVer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2017 20:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/iterating-kriging-with-anisotropy/m-p/252265#M597</guid>
      <dc:creator>CourtneySpencer</dc:creator>
      <dc:date>2017-08-08T20:02:16Z</dc:date>
    </item>
  </channel>
</rss>

