<?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 syntax error in con statement in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10217#M193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a land value grid and am trying to use a con statement to set certain land values equal to 1 and all else equal to 0. This is my syntax: con (Raster1 &amp;gt;=135000 &amp;amp; Raster1 &amp;lt;=175000, 1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried so many different ways to write this, double (, spaces, etc. And I continue to get the error message 000539; the truth value of a raster is ambiguous. What am I doing wrong? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running ArcGIS 10, ArcView with Spatial Analyst&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jan 2011 23:17:09 GMT</pubDate>
    <dc:creator>AshleyJohnson</dc:creator>
    <dc:date>2011-01-04T23:17:09Z</dc:date>
    <item>
      <title>syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10217#M193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a land value grid and am trying to use a con statement to set certain land values equal to 1 and all else equal to 0. This is my syntax: con (Raster1 &amp;gt;=135000 &amp;amp; Raster1 &amp;lt;=175000, 1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried so many different ways to write this, double (, spaces, etc. And I continue to get the error message 000539; the truth value of a raster is ambiguous. What am I doing wrong? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running ArcGIS 10, ArcView with Spatial Analyst&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 23:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10217#M193</guid>
      <dc:creator>AshleyJohnson</dc:creator>
      <dc:date>2011-01-04T23:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10218#M194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I suggest that you type as little as possible and use the selection options within the raster calculator as much as possible&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; con (Raster1 &amp;gt;=135000 &amp;amp; Raster1 &amp;lt;=175000, 1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;might be&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;con( ("Raster1" &amp;gt;= 135000) &amp;amp; ("Raster1" &amp;lt;= 175000), 1, 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if memory serves, grid names are enclosed in " " in version 10 and [ ] in 9.x, also put ( ) around statements that use boolean operations. and check the forum, this has been documented previously&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/13219-Con-statement-error-in-raster-calculator?p=40419&amp;amp;posted=1#post40419"&gt;http://forums.arcgis.com/threads/13219-Con-statement-error-in-raster-calculator?p=40419&amp;amp;posted=1#post40419&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 23:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10218#M194</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-01-04T23:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10219#M195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 17:56:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10219#M195</guid>
      <dc:creator>AshleyJohnson</dc:creator>
      <dc:date>2011-03-02T17:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10220#M196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not to be greedy, but how would I nest a set null statement in there? So instead of setting the false values to 0 I would set them to null?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 18:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10220#M196</guid>
      <dc:creator>AshleyJohnson</dc:creator>
      <dc:date>2011-03-02T18:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10221#M197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you might want to consider using the setnull instead&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z00000007000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z00000007000000.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 18:59:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10221#M197</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2011-03-02T18:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10222#M198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much, good stuff. I appreciate it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 11:22:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10222#M198</guid>
      <dc:creator>AshleyJohnson</dc:creator>
      <dc:date>2011-03-03T11:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error in con statement</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10223#M199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; &lt;SPAN style="font-family: inherit;"&gt;how would I nest a set null statement in there? So instead of setting the false values to 0 I would set them to null?&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you like the simplicity of Con, just leave off the false_expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14155831646257486 jive_text_macro" jivemacro_uid="_14155831646257486"&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Con(("Raster1" &amp;gt;= 135000) &amp;amp; ("Raster1" &amp;lt;= 175000), 1)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 01:32:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/syntax-error-in-con-statement/m-p/10223#M199</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-11-10T01:32:47Z</dc:date>
    </item>
  </channel>
</rss>

