<?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: Automating Empirical Bayesian Kriging  in ArcGIS GeoStatistical Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529973#M1192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried removing the .shp and I'm receiving the same error&amp;nbsp; " ExecuteError: ERROR 999999: Error executing function. Failed to execute (SaveToLayerFile). "&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;I'm not very familiar with Python. Do I need to run the SaveToLayerFile tool through another loop so that it is applied to all of my EBK output layers?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for zField in zFields[3:]: #loop on the fields while ignoring the first three fields&lt;BR /&gt; outLayer = str(zField)&lt;BR /&gt; out_layer_file = str(zField)&lt;BR /&gt; OutEBK = arcpy.EmpiricalBayesianKriging_ga(inPointFeatures, zField.name, outLayer, outRaster, cellSize, transformation, maxLocalPoints,overlapFactor, numberSemivariograms, searchNeighbourhood, outputType, quantileValue, thresholdType, probabilityThreshold, semivariogram)&lt;BR /&gt; arcpy.SaveToLayerFile_management(outLayer, out_layer_file, "ABSOLUTE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dana&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2018 19:54:33 GMT</pubDate>
    <dc:creator>DanaCarstens</dc:creator>
    <dc:date>2018-03-16T19:54:33Z</dc:date>
    <item>
      <title>Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529968#M1187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a Python script that will apply empirical bayesian kriging to &amp;gt;120 columns of water quality data. Each column is representative of a different month in either 1985 and 2015. I've gotten the script below to work successfully in ArcMap&amp;nbsp;but it is producing temporary layers that go away once I close&amp;nbsp;the program. How can I modify my script so that I can set a standard symbology for each layer produced and have it exported as a jpeg (or tif.) to some specified folder? Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;import arcpy, os&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;# Check out the ArcGIS Spatial Analyst extension license&lt;BR /&gt;arcpy.CheckOutExtension("Spatial")&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;BR /&gt;# Set workspace&lt;BR /&gt;env.workspace = r"K:/Research/2018 GIS"&lt;/P&gt;&lt;P&gt;# Set local variables&lt;BR /&gt;inPointFeatures = r"K:/Research/2018 GIS/DO_data.shp" # input shapefile&lt;BR /&gt;zFields = arcpy.ListFields("DO_data.shp",field_type="Double")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# EBK Veriables&lt;BR /&gt;outRaster = ""&lt;BR /&gt;inPointFeatures = "DO_data.shp"&lt;BR /&gt;cellSize = 8.60966128128307E-03&lt;BR /&gt;transformation = "NONE"&lt;BR /&gt;maxLocalPoints = 100&lt;BR /&gt;overlapFactor = 1&lt;BR /&gt;numberSemivariograms = 100&lt;/P&gt;&lt;P&gt;# Set variables for search neighborhood&lt;BR /&gt;searchNeighbourhood = "NBRTYPE=SmoothCircular RADIUS=0.474897239843659 SMOOTH_FACTOR=0.2"&lt;BR /&gt;outputType = "PREDICTION"&lt;BR /&gt;quantileValue = 0.5&lt;BR /&gt;thresholdType = "EXCEED"&lt;BR /&gt;probabilityThreshold = ""&lt;BR /&gt;semivariogram = "POWER"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for zField in zFields[3:]: #loop on the fields while ignoring the first three fields&lt;BR /&gt; outLayer = str(zField) + ".shp"&lt;BR /&gt; OutEBK = arcpy.EmpiricalBayesianKriging_ga(inPointFeatures, zField.name, outLayer, outRaster, cellSize, transformation, maxLocalPoints,overlapFactor, numberSemivariograms, searchNeighbourhood, outputType, quantileValue, thresholdType, probabilityThreshold, semivariogram)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 15:09:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529968#M1187</guid>
      <dc:creator>DanaCarstens</dc:creator>
      <dc:date>2018-03-16T15:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529969#M1188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your "outLayer" is a geostatistical layer.&amp;nbsp; These are in_memory layers, and you will need to persist them somehow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you ultimately want rasters, you should probably just bypass the geostatistical layer entirely.&amp;nbsp; Instead of passing an empty string for "outRaster", instead just supply the file path, name, and file format where you want the raster.&amp;nbsp; Then pass the "outLayer" as an empty string.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will create all of the physical rasters on disk.&amp;nbsp; You can then import them as layers and apply any symbology that you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Eric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: If you really do want the geostatistical layers, you should add a step to save the geostatsitical layer to a layer file with the "Save to Layer File" geoprocessing tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 15:26:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529969#M1188</guid>
      <dc:creator>EricKrause</dc:creator>
      <dc:date>2018-03-16T15:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529970#M1189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;outLayer is a geostatistical layer (in memory). To persist it you'll use &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/save-to-layer-file.htm"&gt;SaveToLayerFile&lt;/A&gt;, or in the script convert it to contours using &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/geostatistical-analyst/ga-layer-to-contour.htm"&gt;GALayerToContour&lt;/A&gt;&amp;nbsp;or specify an output raster in the call to EBK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;-Steve&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 15:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529970#M1189</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2018-03-16T15:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529971#M1190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your reply. I tried to use SaveToLayerFile and ran into some issues. Do I need to incorporate it into my script like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for zField in zFields[3:]: #loop on the fields while ignoring the first three fields&lt;BR /&gt; outLayer = str(zField) + ".shp"&lt;BR /&gt; out_layer_file = str(zField) + ".lyr"&lt;BR /&gt; OutEBK = arcpy.EmpiricalBayesianKriging_ga(inPointFeatures, zField.name, outLayer, outRaster, cellSize, transformation, maxLocalPoints,overlapFactor, numberSemivariograms, searchNeighbourhood, outputType, quantileValue, thresholdType, probabilityThreshold, semivariogram)&lt;BR /&gt; arcpy.SaveToLayerFile_management(outLayer, out_layer_file, "ABSOLUTE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like the new layer to have the same name as zField.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 15:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529971#M1190</guid>
      <dc:creator>DanaCarstens</dc:creator>
      <dc:date>2018-03-16T15:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529972#M1191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd change&amp;nbsp;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;outLayer = str(zField) + ".shp" to&amp;nbsp;&lt;SPAN&gt;outLayer = str(zField) because it is an in-memory &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/extensions/geostatistical-analyst/what-is-a-geostatistical-layer-.htm"&gt;geostatistical layer&lt;/A&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;SPAN&gt;Secondly,&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;outRaster&amp;nbsp; is empty which means that you opted only to output a ga layer and therefore you don't need to specify a cell size as it only pertain to the output raster.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;SPAN&gt;-Steve&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 17:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529972#M1191</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2018-03-16T17:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529973#M1192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried removing the .shp and I'm receiving the same error&amp;nbsp; " ExecuteError: ERROR 999999: Error executing function. Failed to execute (SaveToLayerFile). "&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;I'm not very familiar with Python. Do I need to run the SaveToLayerFile tool through another loop so that it is applied to all of my EBK output layers?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for zField in zFields[3:]: #loop on the fields while ignoring the first three fields&lt;BR /&gt; outLayer = str(zField)&lt;BR /&gt; out_layer_file = str(zField)&lt;BR /&gt; OutEBK = arcpy.EmpiricalBayesianKriging_ga(inPointFeatures, zField.name, outLayer, outRaster, cellSize, transformation, maxLocalPoints,overlapFactor, numberSemivariograms, searchNeighbourhood, outputType, quantileValue, thresholdType, probabilityThreshold, semivariogram)&lt;BR /&gt; arcpy.SaveToLayerFile_management(outLayer, out_layer_file, "ABSOLUTE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dana&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 19:54:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529973#M1192</guid>
      <dc:creator>DanaCarstens</dc:creator>
      <dc:date>2018-03-16T19:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Empirical Bayesian Kriging</title>
      <link>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529974#M1193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outLayer = str(zField.name)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;out_layer_file = str(zField.name) + ".lyr" if you are using ArcGIS Desktop (...or ".lyrx" if using ArcGIS Pro)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/functions/listfields.htm"&gt;ListFields &lt;/A&gt;returns a field object so you should rather be using zField.name like you're doing in the call to EBK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;-Steve&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 20:21:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geostatistical-analyst-questions/automating-empirical-bayesian-kriging/m-p/529974#M1193</guid>
      <dc:creator>SteveLynch</dc:creator>
      <dc:date>2018-03-16T20:21:40Z</dc:date>
    </item>
  </channel>
</rss>

