<?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 Re: How to use Local Raster Function Set Null? in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570014#M8243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get the feeling that the raster functions are easier to implement in ArcGIS Pro as shown in this thread. &lt;A href="https://community.esri.com/thread/174625"&gt;Trying to use Con statement in Raster Function in Pro&lt;/A&gt; . I just had a quick look in 10.4.1 and it is far less straight forward as using the Raster Calculator or in Python. However, maybe &lt;A href="https://community.esri.com/migrated-users/3355"&gt;Curtis Price&lt;/A&gt; has some suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Aug 2016 19:54:44 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2016-08-10T19:54:44Z</dc:date>
    <item>
      <title>How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570008#M8237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally I use the geo-processing tools to complete the following task but I thought I would give the raster functions ago as they appear to be a quicker and smarter way of doing thinks, but I failed at the first hurdle!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a DEM and I want to set all&amp;nbsp; negative elevation values to NODATA, typically I would use the &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/set-null.htm"&gt;Set Null tool&lt;/A&gt; to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I started to create a raster function (see screen shot below) but I cannot work out how to complete this apparently simple task.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/214924_Capture.PNG" style="width: 620px; height: 568px; margin-left: auto; margin-right: auto; display: block;" /&gt;&lt;/P&gt;&lt;P&gt;How do you complete the dialog to say "value &amp;lt; 0". I'm not understanding what the greyed out operation box is telling me? For example if one was to write this in python it would be:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;outSetNull&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;SetNull&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"elevation"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"elevation"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="s" style="color: #a31515; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;"VALUE &amp;lt; 0"&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: verdana, geneva; font-size: 10pt;"&gt;Would someone post a screen shot of how to run the local function Set Null as a Raster Function?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 12:25:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570008#M8237</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-08-10T12:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570009#M8238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your raster called elevation or dem???&lt;/P&gt;&lt;P&gt;and it would be "Value &amp;lt; 0"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 12:35:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570009#M8238</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-10T12:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570010#M8239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you asking about the example python code? I just copied that out of the help file as a comparison to show when scripting you declare a criteria of &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"Value &amp;lt; 0". I cannot work out how to put that criteria in the &lt;EM&gt;raster function&lt;/EM&gt; as shown in the image.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 13:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570010#M8239</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-08-10T13:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570011#M8240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;didn't see the image analyst window... if so, it sounds more convoluted than using the raster calculator or the tool.&amp;nbsp; apparently it is a right-click thing &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/editing-functions-on-a-raster-dataset.htm" title="http://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/editing-functions-on-a-raster-dataset.htm"&gt;Editing functions on a raster dataset—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;assuming this is the help you are talking about&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:01:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570011#M8240</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-10T14:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570012#M8241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had drilled down to the page &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/local-function.htm" title="http://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/local-function.htm"&gt;Local function—Help | ArcGIS for Desktop&lt;/A&gt; but it gives no examples of how to complete the Set Null tool, it just lists what is available. I can't work out how to complete the dialog because the equivalent geo-processing tool accepts a criteria (e.g. "Value &amp;lt; 0"), hence my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:55:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570012#M8241</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-08-10T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570013#M8242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and you toggle on the Spatial Analyst extension in the Customize Extensions menu? &lt;/P&gt;&lt;P&gt;The link I gave was for more generic operations which I think are the how too.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I suppose these have there place, but I still use a tool or program access to the tool through python... and cleanup when I am done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 15:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570013#M8242</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-08-10T15:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570014#M8243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get the feeling that the raster functions are easier to implement in ArcGIS Pro as shown in this thread. &lt;A href="https://community.esri.com/thread/174625"&gt;Trying to use Con statement in Raster Function in Pro&lt;/A&gt; . I just had a quick look in 10.4.1 and it is far less straight forward as using the Raster Calculator or in Python. However, maybe &lt;A href="https://community.esri.com/migrated-users/3355"&gt;Curtis Price&lt;/A&gt; has some suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 19:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570014#M8243</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-08-10T19:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570015#M8244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this example, I just added a Mask function. This a Dem with everything below 1600m changed to NoData&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/215105_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 08:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570015#M8244</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2016-08-11T08:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570016#M8245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I like your method nice and simple and almost certainly the way I will set pixels to no data in the future! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;But it does not resolve the approach I was taking so I won't mark it as correct, sorry! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;The good news is I managed to solve it, so see my solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570016#M8245</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-08-11T09:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Local Raster Function Set Null?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570017#M8246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help and especially &lt;A href="https://community.esri.com/migrated-users/5327"&gt;Neil Ayres&lt;/A&gt; as his solution is basically a whole lot easier (see below)! With a second set of eyes looking over my shoulder we cracked this frustrating problem. Probably like &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt; I'm used to using the geo-processing tools or scripting it and I was looking for a way to include the criteria part of the set null tool in the raster function, in my case the "Value &amp;lt; 0".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The short answer is you can't, it's not geared up to accept expressions. I had actually explored the approach I'm about to reveal but dismissed it as me making some mistake but it turns out there is a bug in 10.4.1 which I will explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you need to create a boolean grid, in my case where elevation is less than 0, this is essentially the result of the criteria, then you chain that into the set null tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the first raster function is Less Than Equal as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="215108" alt="Untitled.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/215108_Untitled.png" style="width: 620px; height: 463px; margin-left: auto; margin-right: auto; display: block;" /&gt;&lt;/P&gt;&lt;P&gt;The output of LessThanEqual function feeds into the Set Null function along with the DEM for what will be the values used under a FALSE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="215109" alt="Untitled.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/215109_Untitled.png" style="height: auto; margin-left: auto; margin-right: auto; display: block;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the final function chain is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="215110" alt="Untitled.png" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/215110_Untitled.png" style="width: 620px; height: 482px; margin-left: auto; margin-right: auto; display: block;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the bug is that ArcMap does not display this "on the fly raster" correctly. The symbology defaults to stretch using standard deviation. This &lt;EM&gt;should&lt;/EM&gt; work but it does not as it is saying the value range is 0 to 1 when in my case it should 1m to 360m. So changing stretch type to min-max the values &lt;SPAN style="text-decoration: underline;"&gt;still stay at 0 to 1&lt;/SPAN&gt; even though it is showing the correct values in the mini statistics panel in the stretch panel. I had to tick on edit high/low values and manually set the min and max values then the raster displayed correct with everything below zero set to NODATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="215111" alt="Untitled.png" class="image-4 jive-image" src="https://community.esri.com/legacyfs/online/215111_Untitled.png" style="width: 620px; height: 564px; margin-left: auto; margin-right: auto; display: block;" /&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;EM&gt; DEM showing cells in the sea (Value &amp;lt; 0) as NODATA&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:30:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-use-local-raster-function-set-null/m-p/570017#M8246</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-08-11T09:30:31Z</dc:date>
    </item>
  </channel>
</rss>

