<?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: Interpolating with IDW(geostatistical analyst): Python for Loop in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652332#M50805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which Place or Space is this to be directed?&lt;/P&gt;&lt;P&gt;You provide no error messages or what the problem is.&amp;nbsp; Since that is missing it is impossible to assist without going through the analysis ourselves.&amp;nbsp; What environment settings did you stipulate when performing the IDW other than those provided in the script?&amp;nbsp; Is the file paths some network location?&amp;nbsp; Have you tried source and destinations on a local drive etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Feb 2015 03:03:05 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-02-15T03:03:05Z</dc:date>
    <item>
      <title>Interpolating with IDW(geostatistical analyst): Python for Loop</title>
      <link>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652331#M50804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to interpolate point feature classes with Python.&amp;nbsp; I would like the output to maintain the name of the input feature class. &lt;/P&gt;&lt;P&gt;However, my code seem not to be running.&lt;/P&gt;&lt;P&gt;Please assist me troubleshoot the code:&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Please see below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import system modules&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r"\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\Monthly"&lt;/P&gt;&lt;P&gt;fclist=arcpy.ListFeatureClasses()&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput="True"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Set local variables&lt;/P&gt;&lt;P&gt;inPointFeatures = "fc"&lt;/P&gt;&lt;P&gt;zField = "ETommd"&lt;/P&gt;&lt;P&gt;outLayer = "outIDW"&lt;/P&gt;&lt;P&gt;outRaster = r"\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\MonthlyET.gdb\fc"&lt;/P&gt;&lt;P&gt;cellSize = 2000.0&lt;/P&gt;&lt;P&gt;power = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Set variables for search neighborhood&lt;/P&gt;&lt;P&gt;majSemiaxis = 300000&lt;/P&gt;&lt;P&gt;minSemiaxis = 300000&lt;/P&gt;&lt;P&gt;angle = 0&lt;/P&gt;&lt;P&gt;maxNeighbors = 15&lt;/P&gt;&lt;P&gt;minNeighbors = 10&lt;/P&gt;&lt;P&gt;sectorType = "ONE_SECTOR"&lt;/P&gt;&lt;P&gt;searchNeighbourhood = arcpy.SearchNeighborhoodStandard(majSemiaxis, minSemiaxis,&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;&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;&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; angle, maxNeighbors,&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;&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;&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; minNeighbors, sectorType)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Check out the ArcGIS Geostatistical Analyst extension license&lt;/P&gt;&lt;P&gt;arcpy.CheckOutExtension("GeoStats")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Execute IDW&lt;/P&gt;&lt;P&gt;for fc in fclist:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outRaster = r"\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\MonthlyET.gdb\fc[:-4]"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.IDW_ga(fc, zField, "", outRaster, cellSize, power, searchNeighbourhood)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 01:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652331#M50804</guid>
      <dc:creator>KevinAchieng</dc:creator>
      <dc:date>2015-02-15T01:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Interpolating with IDW(geostatistical analyst): Python for Loop</title>
      <link>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652332#M50805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which Place or Space is this to be directed?&lt;/P&gt;&lt;P&gt;You provide no error messages or what the problem is.&amp;nbsp; Since that is missing it is impossible to assist without going through the analysis ourselves.&amp;nbsp; What environment settings did you stipulate when performing the IDW other than those provided in the script?&amp;nbsp; Is the file paths some network location?&amp;nbsp; Have you tried source and destinations on a local drive etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 03:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652332#M50805</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-02-15T03:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Interpolating with IDW(geostatistical analyst): Python for Loop</title>
      <link>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652333#M50806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Off the top, it should be arcpy.env.overwriteOutput = True (no quotes) and setting inPointFeatures = "fc" literally sets the variable to the string "fc" and is never used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 03:21:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652333#M50806</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-02-15T03:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Interpolating with IDW(geostatistical analyst): Python for Loop</title>
      <link>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652334#M50807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, your path to outRaster will not work as you expect. By leaving the variable fc[:-4] inside the quotes, it literally becomes part of the string (e.g. "...&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;\Product\MonthlyET.gdb\fc[:-4]"&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, use the os module's path.join method to join your base path to the variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; fc = "someraster2014"
&amp;gt;&amp;gt;&amp;gt; import os
&amp;gt;&amp;gt;&amp;gt; outRaster = os.path.join(r"\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\MonthlyET.gdb",fc[:-4])
&amp;gt;&amp;gt;&amp;gt; print outRaster
\\bsedom5\users\kachieng2\Desktop\ET_2002-2014\Product\MonthlyET.gdb\someraster&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652334#M50807</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-12T03:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Interpolating with IDW(geostatistical analyst): Python for Loop</title>
      <link>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652335#M50808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darren,&lt;/P&gt;&lt;P&gt;I imported os, and used the join method. It worked!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 19:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652335#M50808</guid>
      <dc:creator>KevinAchieng</dc:creator>
      <dc:date>2015-02-15T19:51:04Z</dc:date>
    </item>
  </channel>
</rss>

