<?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 function use in the raster calculator in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46566#M568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I am trying to use the con function in ArcGIS 10 raster calculator on a grid called "slopeperc" which is a floating point grid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to change all values in "slopeperc" that are &amp;lt; 20 to 0 and if &amp;gt; 60 I want them to be 1.&amp;nbsp;&amp;nbsp; All other values should be subject to the equation ("slopeperc" -20) / 40.&amp;nbsp; My resulting grid should be something that ranges from 0 to 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh, this is what I have tried but can't figure out why I get an ERROR 000539 message and an output raster with nothing added to my table of contents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("slopeperc" &amp;lt; 20, 0, con("slopeperc" &amp;gt; 60, 1, "slopeperc" - 20 / 40))&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jan 2011 03:32:49 GMT</pubDate>
    <dc:creator>MikeStrager</dc:creator>
    <dc:date>2011-01-21T03:32:49Z</dc:date>
    <item>
      <title>con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46566#M568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I am trying to use the con function in ArcGIS 10 raster calculator on a grid called "slopeperc" which is a floating point grid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to change all values in "slopeperc" that are &amp;lt; 20 to 0 and if &amp;gt; 60 I want them to be 1.&amp;nbsp;&amp;nbsp; All other values should be subject to the equation ("slopeperc" -20) / 40.&amp;nbsp; My resulting grid should be something that ranges from 0 to 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh, this is what I have tried but can't figure out why I get an ERROR 000539 message and an output raster with nothing added to my table of contents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("slopeperc" &amp;lt; 20, 0, con("slopeperc" &amp;gt; 60, 1, "slopeperc" - 20 / 40))&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 03:32:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46566#M568</guid>
      <dc:creator>MikeStrager</dc:creator>
      <dc:date>2011-01-21T03:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46567#M569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("slopeperc" &amp;lt; 20, 0, con("slopeperc" &amp;gt; 60, 1, ("slopeperc" - 20) / 40.0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;given what you posted that you wanted and to avoid integer division&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 10:24:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46567#M569</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-01-21T10:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46568#M570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, that still didn't work.&amp;nbsp; I guess any insight on how to do a con inside another con would be helpful.&amp;nbsp; I see the examples in Help but still can't get it right.&amp;nbsp; Argh!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 12:53:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46568#M570</guid>
      <dc:creator>MikeStrager</dc:creator>
      <dc:date>2011-01-21T12:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46569#M571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;well we both missed the glitch...Con != con&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as an example&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("grid1" &amp;lt; 2, 0, Con("grid1" &amp;lt; 3, 1, ("grid1" - 1) / 4.0))&amp;nbsp;&amp;nbsp; worked for me with my sample expression&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Con("grid1" &amp;lt; 2, 0, con("grid1" &amp;lt; 3, 1, ("grid1" - 1) / 4.0))&amp;nbsp;&amp;nbsp; failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In 10, one needs to be aware that expressions are case sensitive as well as space sensitive&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 14:00:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46569#M571</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-01-21T14:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46570#M572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that was it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Con function needs to be capitalized even when nested in another Con for ArcGIS 10 raster calculator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 16:49:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46570#M572</guid>
      <dc:creator>MikeStrager</dc:creator>
      <dc:date>2011-01-21T16:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46571#M573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also having problems with CON in raster calculator.&amp;nbsp; The quotes and percent signs seem to get added when I drag a lyer listed above the expression.&amp;nbsp;&amp;nbsp;&amp;nbsp; Could it be the "dot" syntax&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CON("%hor_vis_rg%".count &amp;gt;= 23, 1) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So then I tried the CON function instead of Raster Calculator, with the SQL expression&amp;nbsp; "Count" &amp;gt;= 310, and got the same Error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 20:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46571#M573</guid>
      <dc:creator>DianeMcConnaughey</dc:creator>
      <dc:date>2011-11-30T20:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46572#M574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;CON should be Con in 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;don't know about the % stuff and dot notation isn't supported as far as I know in 10&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 13:59:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46572#M574</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-12-01T13:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: con function use in the raster calculator</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46573#M575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;CON should be Con in 10&lt;BR /&gt;don't know about the % stuff and dot notation isn't supported as far as I know in 10&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Yes, indeed, the new 10.0 Python map algebra does not support the "grid.item" notation (which has always been problematic for parsing expressions back to good-old GRID). The new way to do it is to use the [URL=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z000000sn000000.htm]Lookup[/URL" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/009z/009z000000sn000000.htm]Lookup[/URL&lt;/A&gt;&lt;SPAN&gt;] tool:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Con(Lookup("%hor_vis_rg%","COUNT") &amp;gt;= 23, 1) &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe "%" is model element notation -- like Diane is using the Map Algebra tool inside ModelBuilder, and "hor_vis_rg" is a data element inside the model.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Dec 2011 17:29:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-function-use-in-the-raster-calculator/m-p/46573#M575</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-12-02T17:29:16Z</dc:date>
    </item>
  </channel>
</rss>

