<?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 CON Statement with OR and &amp;amp;amp; in Spatial Data Science Questions</title>
    <link>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361974#M775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ksmikrud&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think what I want to accomplish and what I have in code is far from successful. I have 3 rasters: a lakes raster, a glacier raster and a land cover classification with multiple codes (11,12,13,14,....etc) and basically I'm just trying to correct some errors in the classification. For example where I know there is a lake (lakes.img =0 and my land cover class =51 or 52....I want to make sure I'm coding the final raster class to 53. Similarly if Glacier =0 and the classification values =52 or 53, I want to change those to have a value of 51. If possible and these conditions are not met I just want the original classification values to show in the output raster. Essentially I'm just trying to fix a couple of codes that have errors in my land cover raster but have an output that is pretty much my original land cover raster with those errors fixed. Is this possible to do? The statement below is what I was inputting to the raster calculator in 10.2. I think it also doesn't like my use of OR but even when I tried just a simpler version of the following statement I got errors saying the true value was ambiguous. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("lakes.img" == 0&amp;nbsp; &amp;amp;&amp;nbsp; ("TRH_Classification011314.img"&amp;nbsp; ==&amp;nbsp; 51 OR "TRH_Classification011314.img"&amp;nbsp; ==&amp;nbsp; 52),&amp;nbsp; 53, Con("glacier4.img" == 0&amp;nbsp; &amp;amp; ("TRH_Classification011314.img"&amp;nbsp; ==&amp;nbsp; 52&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; OR "TRH_Classification011314.img" == 53), 51, "TRH_Classification011314.img")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help in advance!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2014 22:20:25 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-01-17T22:20:25Z</dc:date>
    <item>
      <title>CON Statement with OR and &amp;amp;</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361974#M775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ksmikrud&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think what I want to accomplish and what I have in code is far from successful. I have 3 rasters: a lakes raster, a glacier raster and a land cover classification with multiple codes (11,12,13,14,....etc) and basically I'm just trying to correct some errors in the classification. For example where I know there is a lake (lakes.img =0 and my land cover class =51 or 52....I want to make sure I'm coding the final raster class to 53. Similarly if Glacier =0 and the classification values =52 or 53, I want to change those to have a value of 51. If possible and these conditions are not met I just want the original classification values to show in the output raster. Essentially I'm just trying to fix a couple of codes that have errors in my land cover raster but have an output that is pretty much my original land cover raster with those errors fixed. Is this possible to do? The statement below is what I was inputting to the raster calculator in 10.2. I think it also doesn't like my use of OR but even when I tried just a simpler version of the following statement I got errors saying the true value was ambiguous. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("lakes.img" == 0&amp;nbsp; &amp;amp;&amp;nbsp; ("TRH_Classification011314.img"&amp;nbsp; ==&amp;nbsp; 51 OR "TRH_Classification011314.img"&amp;nbsp; ==&amp;nbsp; 52),&amp;nbsp; 53, Con("glacier4.img" == 0&amp;nbsp; &amp;amp; ("TRH_Classification011314.img"&amp;nbsp; ==&amp;nbsp; 52&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; OR "TRH_Classification011314.img" == 53), 51, "TRH_Classification011314.img")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help in advance!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 22:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361974#M775</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-17T22:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: CON Statement with OR and &amp;</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361975#M776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;See the 2nd answer to this question: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/91591-Con-tool-error-The-truth-value-of-a-raster-is-ambiguous" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/91591-Con-tool-error-The-truth-value-of-a-raster-is-ambiguous&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use | instead of OR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jan 2014 03:15:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361975#M776</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2014-01-18T03:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: CON Statement with OR and &amp;</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361976#M777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/91591-Con-tool-error-The-truth-value-of-a-raster-is-ambiguous?p=325291&amp;amp;viewfull=1#post325291"&gt;direct link&lt;/A&gt;&lt;SPAN&gt; to the post mentioned in my previous answer (can't edit for some reason).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 20:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/con-statement-with-or-and-amp-amp/m-p/361976#M777</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2014-01-19T20:21:57Z</dc:date>
    </item>
  </channel>
</rss>

