<?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 tool in Spatial Analyst (Query Builder) in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412300#M5783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a tree crown delimitation project with lidar data. Everything is going well but at some point, it just seems I can't use the query builder in the con tool. I've used it in steps before this point so I don't know where the trouble might be....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the steps thus far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;&lt;SPAN style="color: #303030;"&gt;invert canopy raster (Math/Negate tool)&lt;/SPAN&gt;&lt;/H4&gt;&lt;P&gt;- tree peaks become ponds&lt;/P&gt;&lt;P&gt;- branches/crowns become watersheds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Smooth inverted raster (Filter)&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Determine local minima&lt;/H4&gt;&lt;P&gt;- focal flow to extract tree tops (Con tool, VALUE = “255”, if true, return Inverted raster&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Remove lowest trees (&amp;lt; 7 meters) --&amp;gt; here comme the trouble, trying to use the con tool, I don't have access to the data in the Query Builder of the con tool!!&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Nov 2014 02:12:37 GMT</pubDate>
    <dc:creator>PatrickPineault</dc:creator>
    <dc:date>2014-11-29T02:12:37Z</dc:date>
    <item>
      <title>Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412300#M5783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a tree crown delimitation project with lidar data. Everything is going well but at some point, it just seems I can't use the query builder in the con tool. I've used it in steps before this point so I don't know where the trouble might be....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the steps thus far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;&lt;SPAN style="color: #303030;"&gt;invert canopy raster (Math/Negate tool)&lt;/SPAN&gt;&lt;/H4&gt;&lt;P&gt;- tree peaks become ponds&lt;/P&gt;&lt;P&gt;- branches/crowns become watersheds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Smooth inverted raster (Filter)&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Determine local minima&lt;/H4&gt;&lt;P&gt;- focal flow to extract tree tops (Con tool, VALUE = “255”, if true, return Inverted raster&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Remove lowest trees (&amp;lt; 7 meters) --&amp;gt; here comme the trouble, trying to use the con tool, I don't have access to the data in the Query Builder of the con tool!!&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 02:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412300#M5783</guid>
      <dc:creator>PatrickPineault</dc:creator>
      <dc:date>2014-11-29T02:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412301#M5784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Show the exact Con syntax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 07:30:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412301#M5784</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-11-29T07:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412302#M5785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a screenshot of the query builder in wich I don't have the info of the input conditional raster. Usually we get the the attributes of the raster in this window.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="294" src="https://community.esri.com/legacyfs/online/35599_pastedImage_0.png" style="width: 522px; height: 293.835px;" width="522" /&gt;&lt;/P&gt;&lt;P&gt;And then, if I enter the query as supposed:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" height="332" src="https://community.esri.com/legacyfs/online/35700_pastedImage_4.png" style="width: 591px; height: 332.438px;" width="591" /&gt;&lt;/P&gt;&lt;P&gt;I get this message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" height="345" src="https://community.esri.com/legacyfs/online/35701_pastedImage_5.png" style="width: 620px; height: 349px;" width="613" /&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 14:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412302#M5785</guid>
      <dc:creator>PatrickPineault</dc:creator>
      <dc:date>2014-11-29T14:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412303#M5786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did by chance you type "Value"&amp;lt;-7 ?&amp;nbsp;&amp;nbsp; (it is really hard to read from the screen grabs)&lt;/P&gt;&lt;P&gt;if so, you need spaces between the fields, the operators and the values, ie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Value" &amp;lt; -7&amp;nbsp;&amp;nbsp;&amp;nbsp; with a space between "Value" and &amp;lt; and -7&lt;/P&gt;&lt;P&gt;Also, did you click on the error messages to see what they said, to save us some time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 16:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412303#M5786</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-11-29T16:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412304#M5787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I juste tried it by putting spaces where you told me and it worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I stil don't get it why I can't build the query in the query builder by clicking on the value??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for debugging me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 17:10:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412304#M5787</guid>
      <dc:creator>PatrickPineault</dc:creator>
      <dc:date>2014-11-29T17:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412305#M5788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to add a little comment to the solution &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;‌ provided. There is a difference between integer and floating rasters. The integer rasters have an attribute table (so it has attribute fields and allows you to construct a condition) while the floating (decimal point) rasters do not. Hence the empty query builder screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Way back in the older versions of ArcGIS, one needed to add the spaces around floating rasters and the operators when composing map algebra. I think this is an example of what has not been corrected (yet).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Nov 2014 17:42:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412305#M5788</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-11-29T17:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Con tool in Spatial Analyst (Query Builder)</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412306#M5789</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: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Way back in the older versions of ArcGIS, one needed to add the spaces around floating rasters and the operators when composing map algebra&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Xander, this isn't it - the deal here is we're trying to use a SQL expression. The SQL syntax requires the spaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I would avoid the SQL syntax issue altogether by using the Raster Calculator tool, which allows raster layers to be treated as raster objects so you can use a straight arcpy map algebra expression, for example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14173255125077509" jivemacro_uid="_14173255125077509"&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Con("confocalflow" &amp;lt; -7, "confocalflow")&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gets converted by the Raster Calculator tool to the arcpy (python) map algebra expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14173256504173030" jivemacro_uid="_14173256504173030"&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Con(Raster("confocalflow") &amp;lt; -7, Raster("confocalflow"))&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The spaces in the expressions above are totally optional -- but I like using them because it makes the expression easier to read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick, another advantage of using this tool is you can sometimes combine tools (especially local operators like Con) into a complex expressions that will run at lot faster than running each tool one at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Patrick, please consider moving this thread to the &lt;A href="https://community.esri.com/space/2091"&gt;Spatial Analyst&lt;/A&gt;‌ space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 05:32:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/con-tool-in-spatial-analyst-query-builder/m-p/412306#M5789</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-11-30T05:32:47Z</dc:date>
    </item>
  </channel>
</rss>

