<?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 problem in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269476#M3845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keep all the constants in bracket.&lt;/P&gt;&lt;P&gt;And the whole expression in Float()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2015 19:34:31 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2015-03-26T19:34:31Z</dc:date>
    <item>
      <title>Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269473#M3842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with map algebra in raster calculator. I need to create a raster by employing this formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/(1+Exp^(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN"))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a logistic regression prediction probability formula. The rasters involved are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Z BIN - a grid raster with binary values (pix type integer)&lt;/P&gt;&lt;P&gt;SALINITET BIN - a grid raster with binary values&lt;/P&gt;&lt;P&gt;Vs_aspect BIN -&amp;nbsp; a grid raster with binary values&lt;/P&gt;&lt;P&gt;Distance to Water - a grid raster with numeric values 0-1000 (distance to water from 0 to 1000 meters) (pix type floating point)&lt;/P&gt;&lt;P&gt;DRENAZA BIN - a grid raster with binary values&lt;/P&gt;&lt;P&gt;Poljski_Vodni_Kapacitet BIN - a grid raster with binary values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I input the formula in raster calculator as listed above, I get the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executing: RasterCalculator 1/(1+Exp^(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN")) "C:\Users\***\Documents\Vrsac\PREDIKCIJA\VPred"&lt;/P&gt;&lt;P&gt;Start Time: Thu Mar 26 19:55:44 2015&lt;/P&gt;&lt;P&gt;1/(1+Exp^(3.642-1.502*Raster(r"Z BIN")-0.784*Raster(r"SALINITET BIN")-0.619*Raster(r"Vs_aspect BIN")-0.004*Raster(r"Distance to Water")-0.738*Raster(r"DRENAZA BIN")-1.029*Raster(r"Poljski_Vodni_Kapacitet BIN")))&lt;/P&gt;&lt;P&gt;ERROR 000539: Error running expression: rcexec()&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;expression&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 5, in rcexec&lt;/P&gt;&lt;P&gt;TypeError: unsupported operand type(s) for +: 'int' and 'function'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to execute (RasterCalculator).&lt;/P&gt;&lt;P&gt;Failed at Thu Mar 26 19:55:44 2015 (Elapsed Time: 0.01 seconds)4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no idea what does the error line tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 19:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269473#M3842</guid>
      <dc:creator>MiroslavMaric1</dc:creator>
      <dc:date>2015-03-26T19:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269474#M3843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try keeping the whole expression of "Exp" within a bracket&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;1/(1+(Exp^(3.642...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 19:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269474#M3843</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-03-26T19:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269475#M3844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just tried it and I get the following error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executing: RasterCalculator 1/(1+(Exp^(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN"))) "C:\Users\***\Documents\Vrsac\PREDIKCIJA\VP"&lt;/P&gt;&lt;P&gt;Start Time: Thu Mar 26 20:27:41 2015&lt;/P&gt;&lt;P&gt;1/(1+(Exp^(3.642-1.502*Raster(r"Z BIN")-0.784*Raster(r"SALINITET BIN")-0.619*Raster(r"Vs_aspect BIN")-0.004*"Distance to Water"-0.738*Raster(r"DRENAZA BIN")-1.029*Raster(r"Poljski_Vodni_Kapacitet BIN"))))&lt;/P&gt;&lt;P&gt;ERROR 000539: Error running expression: rcexec()&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;expression&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 5, in rcexec&lt;/P&gt;&lt;P&gt;TypeError: can't multiply sequence by non-int of type 'float'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to execute (RasterCalculator).&lt;/P&gt;&lt;P&gt;Failed at Thu Mar 26 20:27:41 2015 (Elapsed Time: 0.34 seconds)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing it is the float type raster that is the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 19:29:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269475#M3844</guid>
      <dc:creator>MiroslavMaric1</dc:creator>
      <dc:date>2015-03-26T19:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269476#M3845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keep all the constants in bracket.&lt;/P&gt;&lt;P&gt;And the whole expression in Float()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 19:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269476#M3845</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2015-03-26T19:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269477#M3846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find that &lt;STRONG&gt;liberal&lt;/STRONG&gt; use of brackets and spaces helps with the Raster Calculator...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 20:13:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269477#M3846</guid>
      <dc:creator>StefanFree</dc:creator>
      <dc:date>2015-03-26T20:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269478#M3847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exponent (power) map algebra operator is ** not ^. &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00p600000008000000"&gt;Here's the list &lt;/A&gt;(see Power).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//009z0000008s000000"&gt;Exp&lt;/A&gt;(grid) is a function, so there is no need for ^ or **.&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14274015469876689 jive_text_macro" data-renderedposition="71_8_912_32" jivemacro_uid="_14274015469876689"&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;1/(1+Exp(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN"))&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 possibly (but untested):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14274015406324748 jive_text_macro" data-renderedposition="166_8_912_32" jivemacro_uid="_14274015406324748"&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;1/(1+math.e**(3.642-1.502*"Z BIN"-0.784*"SALINITET BIN"-0.619*"Vs_aspect BIN"-0.004*"Distance to Water"-0.738*"DRENAZA BIN"-1.029*"Poljski_Vodni_Kapacitet BIN"))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 20:18:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269478#M3847</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-03-26T20:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Raster calculator problem</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269479#M3848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the input Darren, this proved to be the right answer. It calculated the raster using either of the two formulas you listed, and they are identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, many thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 13:29:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-problem/m-p/269479#M3848</guid>
      <dc:creator>MiroslavMaric1</dc:creator>
      <dc:date>2015-03-27T13:29:03Z</dc:date>
    </item>
  </channel>
</rss>

