<?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 Zonal Statistics as Table - exclude values? in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304652#M4272</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;BR /&gt;&lt;SPAN&gt;Is there a way to exclude certain values when running the zonal statistics tool? More specifically, I need to get the sum of the raster cells in each zone, and that works fine, but I also want to calculate the number of the cells that their values are higher than zero (zero in my data is equivalent to "no data"), regardless of their value. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run the tool, the output table contains a "Count" column, but it counts all the cells in the zone, including the zeros, so it doesn't give me any valuable information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that theoretically I can use the Raster Calculator and replace the zeros with NoData, but I have dozens of rasters, and I don't want to use this option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Israel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jun 2013 21:38:05 GMT</pubDate>
    <dc:creator>IsraelShpindel</dc:creator>
    <dc:date>2013-06-27T21:38:05Z</dc:date>
    <item>
      <title>Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304652#M4272</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;BR /&gt;&lt;SPAN&gt;Is there a way to exclude certain values when running the zonal statistics tool? More specifically, I need to get the sum of the raster cells in each zone, and that works fine, but I also want to calculate the number of the cells that their values are higher than zero (zero in my data is equivalent to "no data"), regardless of their value. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run the tool, the output table contains a "Count" column, but it counts all the cells in the zone, including the zeros, so it doesn't give me any valuable information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that theoretically I can use the Raster Calculator and replace the zeros with NoData, but I have dozens of rasters, and I don't want to use this option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Israel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 21:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304652#M4272</guid>
      <dc:creator>IsraelShpindel</dc:creator>
      <dc:date>2013-06-27T21:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304653#M4273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/index.html#//009z00000007000000" rel="nofollow" target="_blank"&gt;SetNull&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; will allow you to specify 0 as your nodata value.&amp;nbsp; If you have many grids to process consider writing a model/script to process all the rasters in a folder at once.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 14:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304653#M4273</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2013-06-28T14:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304654#M4274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm aware of this option, but I was just wondering if there is any better way. I do work with python, but the problem is that this solution will take a lot of time (the grids are quite large) and I will also have to join the data into one table in the end of the process, which would make it even longer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ideally,the best solution would be to somehow "get into" the zonal statistcs tool through python and change its settings, but I guess that can't be done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks anyway!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Jun 2013 19:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304654#M4274</guid>
      <dc:creator>IsraelShpindel</dc:creator>
      <dc:date>2013-06-29T19:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304655#M4275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ideally,the best solution would be to somehow "get into" the zonal statistcs tool through python and change its settings, but I guess that can't be done.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Israel, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tool syntax and parameter interfaces are the same in the dialog interface or from ModelBuilder. This is actually a huge strengh of 10.0 over 9.x raster tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, you may want to look into this. Using Python map algebra you can set values to NoData before the tool sees them (no extra raster creation required).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
valras = Raster("value_grid.img")
zonras = Raster("zones.img")
outZSaT = ZonalStatisticsAsTable(zonras, "VALUE", 
&amp;nbsp;&amp;nbsp;&amp;nbsp; SetNull(valras == 98 or valras == 99, valras)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "stats_tbl", "NODATA", "MEAN")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304655#M4275</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304656#M4276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;However, you may want to look into this. Using Python map algebra you can set values to NoData before the tool sees them (no extra raster creation required).&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SetNull doesn't create a new raster? Does it change the original raster permanently?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 16:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304656#M4276</guid>
      <dc:creator>IsraelShpindel</dc:creator>
      <dc:date>2013-07-01T16:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304657#M4277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;SetNull doesn't create a new raster?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nested in map algebra it may make a "throw away" temp raster behind the scenes that is deleted when the map algebra expression is processed -- or it may be able to just do it in memory as it is processing. Depends on the combination of operators.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Does it change the original raster permanently?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nope, the input raster is unmodified.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 17:07:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304657#M4277</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-07-01T17:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics as Table - exclude values?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304658#M4278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, that is exactly what I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 17:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/zonal-statistics-as-table-exclude-values/m-p/304658#M4278</guid>
      <dc:creator>IsraelShpindel</dc:creator>
      <dc:date>2013-07-01T17:24:19Z</dc:date>
    </item>
  </channel>
</rss>

