<?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: Conditional statements Raster Calculator in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118851#M1649</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!&amp;nbsp; Nice solve with Cell Statistics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2020 14:11:02 GMT</pubDate>
    <dc:creator>JayJohnsonWashoeCounty</dc:creator>
    <dc:date>2020-09-23T14:11:02Z</dc:date>
    <item>
      <title>Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118845#M1643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a weighted analysis with four rasters. Two of the rasters have areas of NoData, which means I do not want to use the Weighted Overlay tool because this tool does not ignore NoData in calculations.&amp;nbsp;If I were to use the Weighted Overlay tool I would have to assign a value to areas of NoData - and my conclusion is that this would not make the weight calculations completely correct. Someone please correct me if I am wrong!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get around this problem I started looking into using conditional statements using Con in Raster Calculator. I found a post where someone came up with this syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Con(IsNull(Raster3), Float(w1*Raster1 + w2*Raster2)/(w1+w2) , Float(Raster1 + Raster2 + Raster3)/3)‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Where &lt;EM&gt;wx&lt;/EM&gt; is the weighting&amp;nbsp;applied to each raster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this works fine with three rasters, where one of the rasters contains areas of NoData.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But what is the syntax if you have &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt;two&lt;/SPAN&gt;&lt;/SPAN&gt; rasters that contains areas of NoData?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional questions: &lt;BR /&gt;- Is the division necessary in the calculations because not all three rasters are included? And why is the second Float divided by the number 3 and not 1 (as in 100%)?&lt;/P&gt;&lt;P&gt;- In the syntax above, in the second Float the rasters are not multiplied with weightings - is this correct? And if so, please explain why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping for help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2020 09:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118845#M1643</guid>
      <dc:creator>Tensio_TSAdmin</dc:creator>
      <dc:date>2020-09-16T09:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118846#M1644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from ....&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/how-weighted-overlay-works.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/how-weighted-overlay-works.htm"&gt;How Weighted Overlay works—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the section&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Using Restricted and NoData for the scale value&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I don't see any reference to nodata making things incorrect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What in that explanation do you think would give rise to invalide results?&lt;/P&gt;&lt;P&gt;There are just cautions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2020 10:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118846#M1644</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-09-16T10:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118847#M1645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not mean that NoData makes the calculation incorrect, I mean that classifying NoData to a value makes the results inaccurate and in turn incorrect. I explain all of it below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are running the Weighted Overlay tool with three rasters and&amp;nbsp;one of the raster have cells&amp;nbsp;of NoData, this results in a raster where the NoData areas in one of the rasters "propagates" into the resulting raster (see figure below). This results in kind of a "Intersect" operation of the rasters, which I do not want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/507056_5.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to avoid this "Intersection", you have to classify NoData to a value - let's say the value 10.&amp;nbsp;In the Weighted Overlay calculation, this means that these areas (now with the value 10) are a part of the calculation and are effectively made relevant with a weighting, when they are &lt;STRONG&gt;originally not relevant&lt;/STRONG&gt;. In my head it would cause incorrect and inaccurate results if you classify NoData values to a number value (value of 10 used as example)&amp;nbsp;and run the Weighted Overlay tool.&lt;/P&gt;&lt;P&gt;Hope this explained better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is my thought process about this totally wrong?&lt;/P&gt;&lt;H3&gt;&lt;BR /&gt;This post also explains the issue:&amp;nbsp;&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/93749/weighted-overlay-with-nodata-cells" title="https://gis.stackexchange.com/questions/93749/weighted-overlay-with-nodata-cells"&gt;arcgis desktop - Weighted Overlay with "nodata" cells - Geographic Information Systems Stack Exchange&lt;/A&gt;&amp;nbsp;&lt;/H3&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2020 11:49:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118847#M1645</guid>
      <dc:creator>Tensio_TSAdmin</dc:creator>
      <dc:date>2020-09-16T11:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118848#M1646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not understand what you want to do with the non-intersecting areas - the reason NoData exists is to mark areas of missing data so you do not have a nonsensical weighted overlay results.&amp;nbsp; Map Algebra is very flexible but of you want an output cell value of some kind you need to assign it some value. If you want them all just set to zero the simplest thing is to just do the weighted overlay, get the result with the NoData, and convert all NoData to a 'missing value' of your choice:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fixed &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Con&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;IsNull&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result_raster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; result_raster&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2020 15:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118848#M1646</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2020-09-16T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118849#M1647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before you run your process, take Raster3 and convert all the NoData areas to be "0" values.&lt;/P&gt;&lt;P&gt;Then, your weighted overlay should give you the output you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This really gets to the heart of the difference between NoData and 0 values.&amp;nbsp; NoData essentially means "I don't know what is here", so there is no way to quantify the output of the weighted overlay operation.&amp;nbsp; On the other hand, a 0 value means "this cell has no affect on the operation" (at least for the additive sort of overlay you show above) and can be meaningfully used in a weighted overly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2020 22:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118849#M1647</guid>
      <dc:creator>JayJohnsonWashoeCounty</dc:creator>
      <dc:date>2020-09-16T22:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118850#M1648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jay, your reply got me into the right mindset. I also discovered the Cell Statistics tool which have a "Ignore NoData" parameter which was the best solution for me. I set the calculation parameter to "Sum".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:02:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118850#M1648</guid>
      <dc:creator>Tensio_TSAdmin</dc:creator>
      <dc:date>2020-09-23T14:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional statements Raster Calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118851#M1649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!&amp;nbsp; Nice solve with Cell Statistics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:11:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/conditional-statements-raster-calculator/m-p/118851#M1649</guid>
      <dc:creator>JayJohnsonWashoeCounty</dc:creator>
      <dc:date>2020-09-23T14:11:02Z</dc:date>
    </item>
  </channel>
</rss>

