<?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: Major bug in Zonal Stats? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574825#M3863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan, I don't have ArcGIS10.3.1. Care to test it using &lt;A href="https://www.dropbox.com/s/rq0kpk72rp3fb1g/zonal.mpk?dl=0"&gt;my data&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 16:21:41 GMT</pubDate>
    <dc:creator>GüntherGrill</dc:creator>
    <dc:date>2015-08-12T16:21:41Z</dc:date>
    <item>
      <title>Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574822#M3860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;I am using ArcGIS 10.2.2 to determine zonal statistics for a number of zones. If there is any NoData in the value raster, I want the zone results to be "NoData", precisely as advertised by the tools description. This &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/EN/HELP/MAIN/10.1/index.html#//009z000000w7000000" rel="nofollow" style="font-size: 15px; color: #358daa; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;tool description&lt;/A&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt; states:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;DATA — Within any particular zone, only cells that have a value in the input Value raster will be used in determining the output value for that zone. NoData cells in the Value raster will be ignored in the statistic calculation.&lt;/P&gt;&lt;P style="font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;NODATA — Within any particular zone, if any NoData cells exist in the Value raster, it is deemed that there is insufficient information to perform statistical calculations for all the cells in that zone; therefore, the entire zone will receive the NoData value on the output raster.&lt;/P&gt;&lt;P style="font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Please have a look at my setup in this picture: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG alt="Zonal.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/121910_Zonal.png" style="width: 620px; height: 629px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I am using the NODATA option with a value raster that has one NoData pixel, and therefore expect the resulting zone value (zone 61154) to be 'NoData'. Instead, I get a value of 12.74 (rounded to 13 in the image), which confuses me on two levels: First, I expected 'NoData', and second, the resulting value of 12.74 is mathematically impossible, because the mean cannot be larger than the maximum value in the value raster, which is 10 in this case.&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;If I am using the DATA option, I get a value of about 9.1, which makes sense. We tested this on different datasets, computers, and ArcGIS versions.&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;The 'Count' attribute is also wrong for that particular zone. There are indeed 421 cells in that zone, but the tool only counted 297. Calculating 421 minus 297 results in 124 - oddly enough, this is the "position" where the NoData pixel is located, if one counts the pixels from upper left to lower right in the zone. The tool might be getting the cell count wrong (too low), which might explain the increase of the average.&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;see also: &lt;A href="http://gis.stackexchange.com/questions/157766/major-bug-in-arcgis-zonal-statistics" title="http://gis.stackexchange.com/questions/157766/major-bug-in-arcgis-zonal-statistics"&gt;Major bug in ArcGIS Zonal statistics? - Geographic Information Systems Stack Exchange&lt;/A&gt; where someone already confirmed the issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 18:52:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574822#M3860</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-11T18:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574823#M3861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;btw, zone and value are both raster data sets with the same resolution (despite the visual appearance)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 21:02:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574823#M3861</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-11T21:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574824#M3862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is as you said on the other site and You followed Bill's suggestion, then you should forward this as a bug.&amp;nbsp; In the interim to confirm that everything is fine, you could try the following procedure&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;export both grids to Esri grids (not tiffs, jpegs etc) using&lt;UL&gt;&lt;LI&gt;the same cell size&lt;/LI&gt;&lt;LI&gt;the same extent&lt;/LI&gt;&lt;LI&gt;make sure that they are snapped so that the cell bounds of both are coincident&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;confirm the total cell count for both and that one and/or both have nodata values&lt;/P&gt;&lt;P&gt;rerun the analysis to confirm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all the above is fine,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;upgrade to 10.3.1 and check for new patches .... barring that&lt;/LI&gt;&lt;LI&gt;zip and ship your data and report as a bug.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then report back here.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 21:11:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574824#M3862</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-08-11T21:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574825#M3863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan, I don't have ArcGIS10.3.1. Care to test it using &lt;A href="https://www.dropbox.com/s/rq0kpk72rp3fb1g/zonal.mpk?dl=0"&gt;my data&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 16:21:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574825#M3863</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-12T16:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574826#M3864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go...for your viewing pleasure&lt;/P&gt;&lt;P&gt;&lt;IMG alt="ZonalStats_on_off.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/122055_ZonalStats_on_off.png" style="width: 620px; height: 472px;" /&gt;Ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 16:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574826#M3864</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-08-12T16:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574827#M3865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thanks for doing this, this confirms the erroneous behavior of the tool. I wonder why you didn't get 12.7 as the mean like I do, but the cell count and the fact that it should produce NODATA still points to a major error in the code, does it not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 16:57:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574827#M3865</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-12T16:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574828#M3866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, I found out why the mean value for that zone is different in your case. You used "ALL" statistics as in &lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_14393997528751304 jive_macro_code jive_text_macro" data-renderedposition="29_8_912_16" jivemacro_uid="_14393997528751304" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;arcpy.gp.ZonalStatisticsAsTable_sa(zones,"Value",val_grid, out,"NODATA","&lt;/SPAN&gt;&lt;STRONG style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-position: repeat;"&gt;ALL")&lt;/STRONG&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-position: repeat;"&gt;N&lt;/STRONG&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you used only the "MEAN" instead as in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14393997126737 jive_text_macro" data-renderedposition="105_8_912_16" jivemacro_uid="_14393997126737" modifiedtitle="true"&gt;&lt;P&gt;arcpy.gp.ZonalStatisticsAsTable_sa(zones,"Value",value_grid, out,"NODATA","&lt;STRONG&gt;MEAN&lt;/STRONG&gt;")&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I predict you would get something around 12.74 .... as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bizarre!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 17:14:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574828#M3866</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-12T17:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574829#M3867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will check later...I just used the tool in ArcToolbox...haven't tried the python-arcpy approach...which I will just in case there are differences in behaviour between the tool and arcpy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 17:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574829#M3867</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-08-12T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574830#M3868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again! I used the code for illustration purposes only (export as python snippet) and also use the Toolbox. But you are right in the sense, that Toolbox and Python code sometimes produce different results too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 17:21:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574830#M3868</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-12T17:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574831#M3869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An ESRI employee pointed me to an existing bug report:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA4NDg4Mw==" title="http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA4NDg4Mw=="&gt;BUG-000084883 - The 'Ignore NoData in calculations' option in Zona..&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case closed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 18:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574831#M3869</guid>
      <dc:creator>GüntherGrill</dc:creator>
      <dc:date>2015-08-19T18:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Major bug in Zonal Stats?</title>
      <link>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574832#M3870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 10.4.1 now and is there still a bug? If I calculated ZonalStatisticsAsTable with the data supplied by Günther Grill, calculations with parameter ignore_nodata set to "DATA" my result set contains nine rows, otherwise, set to NODATA, it contains eight rows. Does that mean ignore the whole zone if there is nodata in it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/major-bug-in-zonal-stats/m-p/574832#M3870</guid>
      <dc:creator>Andreas</dc:creator>
      <dc:date>2017-03-14T14:31:38Z</dc:date>
    </item>
  </channel>
</rss>

