<?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 Issue getting Raster Calculator to read floating-point value in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593564#M12294</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to perform an optimal path analysis using Tobler's Function, and I am having issues working with the raster calculator. My math look like this:&lt;/P&gt;&lt;P&gt;(1.0 / 1000) / (6 * Exp(-3.5 * Abs(Tan(("slope" * 3.14159)/180) + .05)))&lt;/P&gt;&lt;P&gt;This return values very close to 0 (e.g., 0.00014) when it finishes. From what I've read this looks like something I'm doing is causing issues using integers and floating-point values. Does anyone have help or advice they would be willing to share?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting my workflow from this source&amp;nbsp;&lt;A href="https://www.cambridge.org/core/journals/advances-in-archaeological-practice/article/basics-of-least-cost-analysis-for-archaeological-applications/DE502C37794C0E200AE7FA6A7529E25E" target="_blank" rel="noopener"&gt;The Basics of Least Cost Analysis for Archaeological Applications | Advances in Archaeological Practice | Cambridge Core&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Mar 2025 21:29:32 GMT</pubDate>
    <dc:creator>ifarrell71</dc:creator>
    <dc:date>2025-03-07T21:29:32Z</dc:date>
    <item>
      <title>Issue getting Raster Calculator to read floating-point value</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593564#M12294</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to perform an optimal path analysis using Tobler's Function, and I am having issues working with the raster calculator. My math look like this:&lt;/P&gt;&lt;P&gt;(1.0 / 1000) / (6 * Exp(-3.5 * Abs(Tan(("slope" * 3.14159)/180) + .05)))&lt;/P&gt;&lt;P&gt;This return values very close to 0 (e.g., 0.00014) when it finishes. From what I've read this looks like something I'm doing is causing issues using integers and floating-point values. Does anyone have help or advice they would be willing to share?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting my workflow from this source&amp;nbsp;&lt;A href="https://www.cambridge.org/core/journals/advances-in-archaeological-practice/article/basics-of-least-cost-analysis-for-archaeological-applications/DE502C37794C0E200AE7FA6A7529E25E" target="_blank" rel="noopener"&gt;The Basics of Least Cost Analysis for Archaeological Applications | Advances in Archaeological Practice | Cambridge Core&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 21:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593564#M12294</guid>
      <dc:creator>ifarrell71</dc:creator>
      <dc:date>2025-03-07T21:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Issue getting Raster Calculator to read floating-point value</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593568#M12295</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/888583"&gt;@ifarrell71&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would verify this by breaking down the large equation, and walking through it step-by-step in order to see where exactly it may be having the issue. Also, it may be worth trying to assign everything number as a floating point integer, something like this: (1.0 / 1000.0) / (6.0 * Exp(-3.5 * Abs(Tan(("slope" * 3.14159) / 180.0) + 0.05))) and seeing if this sets it into a good spot!&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 21:45:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593568#M12295</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2025-03-07T21:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issue getting Raster Calculator to read floating-point value</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593628#M12296</link>
      <description>&lt;P&gt;is your "slope" raster in degrees or radians?&amp;nbsp; That can simplify the equation.&lt;/P&gt;&lt;P&gt;Also is "Exp" actually the correct incarnation or is it a substitute for the "power of"&lt;/P&gt;&lt;P&gt;Using python as an angle and a "slope" surface of 45 degrees, what is your expected answer?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;slope = 45

(1.0 / 1000) / (6**(-3.5 * abs(tan(radians(slope)) + 0.05)))
0.7239454537426908

(1.0 / 1000) / (6 * exp(-3.5 * abs(tan(radians(slope)) + 0.05)))
0.00657477614286675&lt;/LI-CODE&gt;&lt;P&gt;I will leave that for you to decide based on the book you are using.&lt;/P&gt;&lt;P&gt;Also two potentially wrong answers can result if your slope is already in radians and you try to incorporate the changes in either variant of the above&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# -------  what happens when slope is already in radians and either is used ----
slope = radians(slope)  # 45 degrees is now 0.7853981633974483 radians

# wrongly assuming slope is in degrees then trying to convert will make things
# worse using either equation variant

(1.0 / 1000) / (6**(-3.5 * abs(tan(radians(slope)) + 0.05)))
0.0014911191902071232

(1.0 / 1000) / (6 * exp(-3.5 * abs(tan(radians(slope)) + 0.05)))
0.00020829931476860165&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 08 Mar 2025 17:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/issue-getting-raster-calculator-to-read-floating/m-p/1593628#M12296</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-03-08T17:25:56Z</dc:date>
    </item>
  </channel>
</rss>

