<?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: Krig result differences help in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487278#M6969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That looks like a display issue. Check the resampling on each in the layer properties. I bet one is nearest neighbor (the blocky one), and one is bilinear. Another way to see if you got different answers is to just subtract one from the other. You should get all zero's. &lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Eric&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your input.&amp;nbsp; I did check the resampling property and you were correct that it was set differently for the output generated by the Python code.&amp;nbsp; Although I am not sure this was the complete reason for my issue --- the cell size @528 was ok in the SA tool but when I changed the cell size to 50 (from 528) in the Python script and it generated a much closer representation of what gets built by the SA defaults.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, I just set the Semivariogram model to Linear (as needed) and the new cell size:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

gp.Kriging_sa(inputFeatureDataset, attributeName, outputRaster,&lt;STRONG&gt; "Linear", "50.00995"&lt;/STRONG&gt;, "VARIABLE 12", Output_variance_of_prediction_raster)

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a bunch for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:27:33 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2021-12-11T21:27:33Z</dc:date>
    <item>
      <title>Krig result differences help</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487275#M6966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcGIS 9.3.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python 2.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I 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).&amp;nbsp; I am wondering if there are some default values the SA tool uses when no values are present in the dialog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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).&amp;nbsp; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any input is much appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
def genContourKRIG(inPTS, zfld):
&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Set the output workspace name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = oLoc #os.path.expanduser("~")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Workspace = path
&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; rastername = str(gp.GetParameter(1))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.overwriteoutput = 1
&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; # Set the input feature dataset
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputFeatureDataset = inPTS
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Set the output raster name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if rastername !="":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outputRaster = rastername
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outputRaster = "Krig_1" 
&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; # Don't write out the variance raster
 Output_variance_of_prediction_raster = ""
&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; # Set the output extent
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = gp.describe(inPTS)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmin = 877223.554167 #desc.Extent.XMin #hard-coded for now
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ymin = 368517.887500 #desc.Extent.YMin #hard-coded for now
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmax = 877223.554167 #desc.Extent.XMax #hard-coded for now
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ymax = 368517.887500 #desc.Extent.YMax #hard-coded for now
&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;&amp;nbsp;&amp;nbsp; gp.Extent = "877223.554167 368517.887500 877223.554167 368517.887500" #hard-coded for now
&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; # Set the attribute field
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributeName = zfld
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Check out Spatial Analyst extension license
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CheckOutExtension("Spatial")
&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; # Process: Kriging...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Kriging_sa(inputFeatureDataset, attributeName, outputRaster, "Linear", "528", "VARIABLE 12", Output_variance_of_prediction_raster)

&amp;nbsp;&amp;nbsp;&amp;nbsp; except:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # If an error occurred while running a tool, then print the messages
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddMessage(gp.GetMessages())
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 10:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487275#M6966</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2012-10-09T10:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Krig result differences help</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487276#M6967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;[ATTACH=CONFIG]18288[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]18289[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Images attached to show differences I am seeing.&amp;nbsp; First image Krige was run from SA toolbar.&amp;nbsp; Second image is from Python code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487276#M6967</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2012-10-09T14:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Krig result differences help</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487277#M6968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That looks like a display issue. Check the resampling on each in the layer properties. I bet one is nearest neighbor (the blocky one), and one is bilinear. Another way to see if you got different answers is to just subtract one from the other. You should get all zero's. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487277#M6968</guid>
      <dc:creator>EricRice</dc:creator>
      <dc:date>2012-10-09T14:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Krig result differences help</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487278#M6969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That looks like a display issue. Check the resampling on each in the layer properties. I bet one is nearest neighbor (the blocky one), and one is bilinear. Another way to see if you got different answers is to just subtract one from the other. You should get all zero's. &lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Eric&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your input.&amp;nbsp; I did check the resampling property and you were correct that it was set differently for the output generated by the Python code.&amp;nbsp; Although I am not sure this was the complete reason for my issue --- the cell size @528 was ok in the SA tool but when I changed the cell size to 50 (from 528) in the Python script and it generated a much closer representation of what gets built by the SA defaults.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, I just set the Semivariogram model to Linear (as needed) and the new cell size:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

gp.Kriging_sa(inputFeatureDataset, attributeName, outputRaster,&lt;STRONG&gt; "Linear", "50.00995"&lt;/STRONG&gt;, "VARIABLE 12", Output_variance_of_prediction_raster)

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a bunch for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/krig-result-differences-help/m-p/487278#M6969</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T21:27:33Z</dc:date>
    </item>
  </channel>
</rss>

