<?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: Raster calculator failed when using setnull function in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242248#M3389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;gt; [why] Raster is whipped around the layer name but NOT the 5 in the Results window output. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;This is because the SetNull tool can take a straight out integer as an argument, it doesn't need to be a raster layer, raster dataset, or raster object -- no need to wrap in in Raster().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;gt; &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Why would a layer whose path is know to ArcMap need the raster&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I don't believe&amp;nbsp; the F:/test/x needs to be put inside Raster() to work in arcpy -- my guess is whenever the Raster Calculator tools's parser finds a string in that context, it assumes it must be a raster name and wraps Raster() around it - so if you put in "raster" + 5 it will be changed to Raster("raster") + 5 which is valid. (The plus operator can operate on a raster and an integer, but not a string and an integer.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Jun 2015 05:08:44 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2015-06-13T05:08:44Z</dc:date>
    <item>
      <title>Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242240#M3381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the expression below to try convert all the values that are negative or equal to zero to NoData&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SetNull("cov_fdg_ct" &amp;lt;= 0,"cov_fdg_ct")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it failed to execute with the error message below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing: RasterCalculator SetNull("cov_fdg_ct" &amp;lt;= 0,"cov_fdg_ct") "E:\GIS Data\Thesis modeling\FloodDepthGrids\cov_fdg_c"
Start Time: Fri Jun 12 17:49:33 2015
SetNull("cov_fdg_ct" &amp;lt;= 0,"cov_fdg_ct")
ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;expression&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 5, in rcexec
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 320, in SetNull
&amp;nbsp;&amp;nbsp;&amp;nbsp; where_clause)
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Utils.py", line 47, in swapper
&amp;nbsp;&amp;nbsp;&amp;nbsp; result = wrapper(*args, **kwargs)
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\sa\Functions.py", line 309, in Wrapper
&amp;nbsp;&amp;nbsp;&amp;nbsp; ["SetNull", in_conditional_raster, in_false_raster_or_constant])
RuntimeError: ERROR 000732: Input Raster: Dataset cov_fdg_ct does not exist or is not supported

Failed to execute (RasterCalculator).
Failed at Fri Jun 12 17:49:34 2015 (Elapsed Time: 0.16 seconds)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been reading many posts from those who also got the ERROR 000539 and most of them seem to be due to a syntax error. However, I can't seem to figure out what syntax error is in my simple expression. It would be much appreciated if you can provide some advice!&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>Sat, 11 Dec 2021 12:08:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242240#M3381</guid>
      <dc:creator>Zheng_KiYip</dc:creator>
      <dc:date>2021-12-11T12:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242241#M3382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first argument is a raster, not a condition. You can use a where clause as the third parameter, though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SetNull("cov_fdg_ct","cov_fdg_ct","Value &amp;lt;=0")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 01:24:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242241#M3382</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-06-13T01:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242242#M3383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren is correct.&lt;BR /&gt;Always check the help files for syntax and bookmark the help page...for example &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Set_Null/009z00000007000000/"&gt;SetNull syntax&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 02:33:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242242#M3383</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-13T02:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242243#M3384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Au contraire, &lt;/EM&gt;gentlemen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Raster Calculator the rules of arcpy map algebra apply so you can do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SetNull("cov_fdg_ct" &amp;lt;= 0,"cov_fdg_ct")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is converted to the Python below which is then evaluated.&lt;/P&gt;&lt;P&gt;(The &amp;lt;= operator then gets handled by the Python parser to run the &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00p600000008000000" rel="nofollow noopener noreferrer" target="_blank"&gt;LessThanEqual&lt;/A&gt; tool, which resolves to the "truth" raster required by the SetNull tool. It's really quite awesome.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from arcpy.sa import *
out = SetNull(Raster("cov_fdg_ct") &amp;lt;= 0, Raster("cov_fdg_ct"))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is our friend Zheng is having an issue with "cov_fgd_ct" which is for some reason not resolving to a valid raster layer name or raster dataset path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:08:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242243#M3384</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T12:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242244#M3385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;which could only mean that it was typed in manually into the raster calculator otherwise it wouldn't have appeared in the list of rasters .... hmmmm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 02:56:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242244#M3385</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-13T02:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242245#M3386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting....&lt;/P&gt;&lt;P&gt;The Results of a test....&amp;nbsp; Raster in ArcMap 10.3.1 TOC,&lt;/P&gt;&lt;P&gt;Select ... ArcToolbox, Spatial Analyst Tools, Map Algebra...Raster Calculator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;random raster appears as a selectable raster.&lt;/P&gt;&lt;P&gt;Enter the expression shown in the image below WITH a where clause, doesn't give an option for where, but what the hey...I put one in.&amp;nbsp; The results from the Results window&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;Messages&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Executing: RasterCalculator &lt;STRONG&gt;SetNull("random","random","VALUE&amp;gt;0.5") F:\Test\x2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Start Time: Fri Jun 12 23:07:49 2015&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;SetNull(Raster(r"random"),Raster(r"random"),"VALUE&amp;gt;0.5")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Succeeded at Fri Jun 12 23:07:52 2015 (Elapsed Time: 3.25 seconds)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion....surmization...&lt;BR /&gt;The raster calculator whips in the Raster around the inputs ( I should have been more inventive) but uses the where clause&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109400" alt="RasterCalculator1.png" class="image-1 jive-image" height="267" src="https://community.esri.com/legacyfs/online/109400_RasterCalculator1.png" style="width: 336px; height: 218px; float: none;" width="458" /&gt;&lt;/P&gt;&lt;P&gt;Guess they should separate out raster calculator help or show some examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT&lt;/P&gt;&lt;P&gt;More inventive now to show what you can also do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;SetNull("random",5,"VALUE&amp;gt;0.5)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Results&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Messages&lt;BR /&gt;Executing: RasterCalculator &lt;STRONG&gt;SetNull("random",5,"VALUE&amp;gt;0.5") F:\Test\x3&lt;/STRONG&gt;&lt;BR /&gt;Start Time: Fri Jun 12 23:22:30 2015&lt;BR /&gt;&lt;STRONG&gt;SetNull(Raster(r"random"),5,"VALUE&amp;gt;0.5")&lt;/STRONG&gt;&lt;BR /&gt;Succeeded at Fri Jun 12 23:22:34 2015 (Elapsed Time: 4.12 seconds)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Fun with the raster calculator&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 03:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242245#M3386</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-13T03:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242246#M3387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess in this particular case it doesn't work &lt;EM&gt;exactly&lt;/EM&gt; like I said, but the result is the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 03:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242246#M3387</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-06-13T03:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242247#M3388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just fine it a little insistent or odd that Raster is whipped around the layer name but NOT the 5 in the Results window output.&amp;nbsp; Why would a layer whose path is know to ArcMap need the raster&lt;/P&gt;&lt;P&gt;Now wrap your head around this one...reading a file from disk...using a layer in arcmap and a where clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SetNull("F:/test/x","random","VALUE&amp;lt;0.25")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Messages&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executing: RasterCalculator &lt;STRONG&gt;SetNull("F:/test/x","random","VALUE&amp;lt;0.25")&lt;/STRONG&gt; C:\Users\Dan\Documents\ArcGIS\Default.gdb\rastercalc&lt;/P&gt;&lt;P&gt;Start Time: Fri Jun 12 23:36:08 2015&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SetNull(Raster(r"F:/test/x"),Raster(r"random"),"VALUE&amp;lt;0.25")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Succeeded at Fri Jun 12 23:36:11 2015 (Elapsed Time: 3.27 seconds)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hmmmm....got to love it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 03:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242247#M3388</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-13T03:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242248#M3389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;gt; [why] Raster is whipped around the layer name but NOT the 5 in the Results window output. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;This is because the SetNull tool can take a straight out integer as an argument, it doesn't need to be a raster layer, raster dataset, or raster object -- no need to wrap in in Raster().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;gt; &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Why would a layer whose path is know to ArcMap need the raster&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I don't believe&amp;nbsp; the F:/test/x needs to be put inside Raster() to work in arcpy -- my guess is whenever the Raster Calculator tools's parser finds a string in that context, it assumes it must be a raster name and wraps Raster() around it - so if you put in "raster" + 5 it will be changed to Raster("raster") + 5 which is valid. (The plus operator can operate on a raster and an integer, but not a string and an integer.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 05:08:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242248#M3389</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-06-13T05:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242249#M3390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sigh...I know these things...you know these things...but try to explain the subtle differences to someone...&lt;/P&gt;&lt;P&gt;for example... where classes:&lt;/P&gt;&lt;P&gt; (1)&amp;nbsp; Table Select for an integer raster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TableSelect x F:\Test\t ""VALUE" &amp;gt; 5"&amp;nbsp;&amp;nbsp; double quotes around the whole thing, plus the field name&lt;/P&gt;&lt;P&gt; (2)&amp;nbsp;&amp;nbsp; SetNull for the same raster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetNull("x","x","VALUE&amp;gt;5") F:\Test\x2 double quotes around the whole thing NOT the field name&lt;/P&gt;&lt;P&gt;We can explain these things away ... but try explaining these subtleties to introductory students.&amp;nbsp; I have lots of examples where "things" could be standardized whether they need to be or not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 05:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242249#M3390</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-13T05:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242250#M3391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: 'andale mono', times; font-size: 10pt;"&gt;SetNull("x","x","VALUE&amp;gt;5")&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I would highly recommend getting students away from the SQL parameter and use this instead in Raster Calculator&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;SetNull("x" &amp;gt; 5, "x")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;or in Python&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;gt5ras = SetNull(Raster("x") &amp;gt; 5, "x")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or in Python (better)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;testras = Raster("x")
gt5ras = SetNull(testras &amp;gt; 5, testras)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:08:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242250#M3391</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T12:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242251#M3392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes...it is the latter two that I lean towards...specifically, I like them to do it manually once, then emulate the return syntax from the Results window.&amp;nbsp; They can then copy and paste and retain the syntax, in a text file, for future work.&amp;nbsp; It save them having to look it up or whipping quotes around things randomly in the hopes that errors go away&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 07:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242251#M3392</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-15T07:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242252#M3393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for all your advice and responses! Sorry for the delayed reply - I haven't had access to this GIS machine again until today.&lt;/P&gt;&lt;P&gt;To my surprise, I used the same syntax as I did last week and it got executed successfully as below. &lt;STRONG&gt;Any suggestions to what may have changed?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="RasterCalc_01.PNG" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/110508_RasterCalc_01.PNG" style="width: 620px; height: 281px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/110507_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Darren and Dan - Last week before I posted this message, I have also tried the syntax you have suggested (i.e. including the where clause) but I got the same error. However, when I tried again today, it worked also as shown below. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="RasterCalc_03.PNG" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/110509_RasterCalc_03.PNG" style="width: 620px; height: 286px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="RasterCalc_05.PNG" class="image-4 jive-image" src="https://community.esri.com/legacyfs/online/110510_RasterCalc_05.PNG" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;What I have found interesting was that when I took out the space between the = and 0, it no longer works&lt;/P&gt;&lt;P&gt;&lt;IMG alt="RasterCalc_04.PNG" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/110512_RasterCalc_04.PNG" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 17:30:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242252#M3393</guid>
      <dc:creator>Zheng_KiYip</dc:creator>
      <dc:date>2015-06-16T17:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242253#M3394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;​You should include spaces between fields, variable names, operators and values as a matter of course to remove/reduce the change that they may become concatenated. &lt;/P&gt;&lt;P&gt;On another note, you are tempting fate by working with rasters data particularly Esri grids, in a folder path that contains spaces...you may and continue to be 'luck' but when you aren't ... remember these words&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 18:49:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242253#M3394</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-16T18:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator failed when using setnull function</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242254#M3395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dan! I'll change my directories to have no space to be safe - can't rely on luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 20:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-failed-when-using-setnull/m-p/242254#M3395</guid>
      <dc:creator>Zheng_KiYip</dc:creator>
      <dc:date>2015-06-16T20:59:13Z</dc:date>
    </item>
  </channel>
</rss>

