<?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 Raster Calculator &amp;amp;quot;con&amp;amp;quot; statement issues in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197767#M2781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying put together a string of con statements using two images in order to create one new image. Ex: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;con([B1.tif] == 90, [B2.tif]-20, [B2.tif])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;con([B1.tif] == 75, [B2.tif]-10, [B2.tif])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The calculator executes the statements, but produces one new image for both statements. Is there any way of writing the syntax such that only one image is created from a string of con statements?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sam&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Oct 2010 14:59:28 GMT</pubDate>
    <dc:creator>SamuelJantz</dc:creator>
    <dc:date>2010-10-12T14:59:28Z</dc:date>
    <item>
      <title>Raster Calculator &amp;quot;con&amp;quot; statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197767#M2781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying put together a string of con statements using two images in order to create one new image. Ex: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;con([B1.tif] == 90, [B2.tif]-20, [B2.tif])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;con([B1.tif] == 75, [B2.tif]-10, [B2.tif])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The calculator executes the statements, but produces one new image for both statements. Is there any way of writing the syntax such that only one image is created from a string of con statements?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sam&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 14:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197767#M2781</guid>
      <dc:creator>SamuelJantz</dc:creator>
      <dc:date>2010-10-12T14:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197768#M2782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;to address your specific question, con statements can be nested, however, this may prove less than satisfactory if you have more than 2 to next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;con([B1.tif] == 90, [B2.tif]-20, (con([B1.tif] == 75, [B2.tif]-10, [B2.tif]))&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 17:05:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197768#M2782</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-10-12T17:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197769#M2783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I will need to add many more conditions; probably around 30. However, I gave the statement a test run with just two conditions and kept getting the error that it could not save the raster dataset with output format GRID. Is there another method that would be less cumbersome than using con?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sam&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 01:57:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197769#M2783</guid>
      <dc:creator>SamuelJantz</dc:creator>
      <dc:date>2010-10-13T01:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197770#M2784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;if this is some form of reclassification, have a look at this thread&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/4126-using-RECLASS-in-Raster-calculator"&gt;http://forums.arcgis.com/threads/4126-using-RECLASS-in-Raster-calculator&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 07:36:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197770#M2784</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-10-13T07:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197771#M2785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yep, that did it! Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 18:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197771#M2785</guid>
      <dc:creator>SamuelJantz</dc:creator>
      <dc:date>2010-10-14T18:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197772#M2786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi I have found a roundabout way to my issue but I wanted to see if anyone else has been encountering this and wanted to know why IT WAS HAPPENING.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Every I ran the statement below in Raster Calculator I kept getting an error message (also displayed below). However, this exact statement would run perfectly in 9.3. Any suggestions as to why this error keeps popping up?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Statement in Raster Calculator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con((("%elev%" &amp;gt; 1500 &amp;amp; "%elev%" &amp;lt; 2500) &amp;amp; ("%mat%" &amp;gt; 165 &amp;amp; "%mat%" &amp;lt; 215) &amp;amp; ("%slope%" &amp;gt; 1800 &amp;amp; "%slope%" &amp;lt; 10500) &amp;amp; ("%pcp_drym%" &amp;gt; 15 &amp;amp; "%pcp_drym%" &amp;lt; 24) &amp;amp; ("%pcp_wetm%" &amp;gt; 150 &amp;amp; "%pcp_wetm%" &amp;lt; 220)), 1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Received upon Execution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000539: Error running expression: rcexec() &amp;lt;type 'exceptions.ValueError'&amp;gt;: The truth value of a raster is ambiguous. Failed to execute (Raster Calculator).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 18:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197772#M2786</guid>
      <dc:creator>CoreyAnco</dc:creator>
      <dc:date>2010-10-28T18:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197773#M2787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran into the same situation. You need some additional parentheses (see below).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Rick&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con(((("%elev%" &amp;gt; 1500) &amp;amp; ("%elev%" &amp;lt; 2500)) &amp;amp; (("%mat%" &amp;gt; 165) &amp;amp; ("%mat%" &amp;lt; 215)) &amp;amp; (("%slope%" &amp;gt; 1800) &amp;amp; ("%slope%" &amp;lt; 10500)) &amp;amp; (("%pcp_drym%" &amp;gt; 15) &amp;amp; ("%pcp_drym%" &amp;lt; 24)) &amp;amp; (("%pcp_wetm%" &amp;gt; 150) &amp;amp; ("%pcp_wetm%" &amp;lt; 220))), 1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Received upon Execution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000539: Error running expression: rcexec() &amp;lt;type 'exceptions.ValueError'&amp;gt;: The truth value of a raster is ambiguous. Failed to execute (Raster Calculator).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 16:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197773#M2787</guid>
      <dc:creator>RichardRupp</dc:creator>
      <dc:date>2010-11-04T16:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator "con" statement issues</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197774#M2788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the reply. I went aroud it by running several different con statements and then using plus to add th evariables together and then another con statement to isolate the combined variables for each environmental factor. I am relieved to know that just adding one more set of parentheses relieves this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the reply, I will be sure to pass along the helpful information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Corey&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 15:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/raster-calculator-amp-quot-con-amp-quot-statement/m-p/197774#M2788</guid>
      <dc:creator>CoreyAnco</dc:creator>
      <dc:date>2010-12-15T15:46:43Z</dc:date>
    </item>
  </channel>
</rss>

