<?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 Error with Zonal statistics in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554686#M7987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the spatial analyst zonal statistics tool to get the standard deviation of elevation.&amp;nbsp; For zones, I have a coarser raster with each cell uniquely numbered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tool runs without error, but the results for standard deviation (std) have zero in all zones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the same analysis for mean or maximum gives the correct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, running the same analysis after converting the zonal grid to polygons gives correct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known bug?&amp;nbsp; Or perhaps I missed something important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jul 2014 07:15:56 GMT</pubDate>
    <dc:creator>DanRosauer</dc:creator>
    <dc:date>2014-07-23T07:15:56Z</dc:date>
    <item>
      <title>Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554686#M7987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the spatial analyst zonal statistics tool to get the standard deviation of elevation.&amp;nbsp; For zones, I have a coarser raster with each cell uniquely numbered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tool runs without error, but the results for standard deviation (std) have zero in all zones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the same analysis for mean or maximum gives the correct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, running the same analysis after converting the zonal grid to polygons gives correct values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known bug?&amp;nbsp; Or perhaps I missed something important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 07:15:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554686#M7987</guid>
      <dc:creator>DanRosauer</dc:creator>
      <dc:date>2014-07-23T07:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554687#M7988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you set the analysis extent and cell size in the Environments tab of the tool prior to running the analysis?&amp;nbsp; it could be that the initial vector version automatically set this prior to running the statistics, although this wouldn't necessarily account for the mean working.&amp;nbsp; In any event, you should set the cell size and output extent so that they match the input layer prior to running any SA tools...don't assume they will be correct&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 07:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554687#M7988</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-07-23T07:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554688#M7989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just set the analysis extent, cell size and snap to, in the environment settings.&amp;nbsp; The result cells now align correctly to the zones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem remains of STD results being zero, while mean and max are fine.&amp;nbsp; I don't need a solution any more, as the work-around of converting the zones grid to polygons worked.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does look like a possible error in the software though.&amp;nbsp; Has anyone else hit the same issue?&amp;nbsp; How do we report it to ESRI?&amp;nbsp; (do they monitor these discussions?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 23:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554688#M7989</guid>
      <dc:creator>DanRosauer</dc:creator>
      <dc:date>2014-07-23T23:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554689#M7990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan there is a &lt;A href="http://support.esri.com/en/"&gt;support request form&lt;/A&gt; on this site, but I don't know if individuals can submit one, or if you belong to an organization, your rep may have to.&amp;nbsp; Good luck and report to this thread should you find a solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 00:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554689#M7990</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-07-24T00:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554690#M7991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way...is this Zonal Statistics as table?&amp;nbsp; If so, what do you expect the standard deviation to be given your dataset AND if you are examining results within a table, did you expressly format the column for the expected number of decimal points?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 03:26:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554690#M7991</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-07-24T03:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554691#M7992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: Calibri, sans-serif; font-size: 15px;"&gt;No, not as table.&amp;nbsp; It returns a grid.&amp;nbsp; And for the mean statistic it correctly gives floating point values.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 04:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554691#M7992</guid>
      <dc:creator>DanRosauer</dc:creator>
      <dc:date>2014-07-24T04:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554692#M7993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would look carefully at your input data. Is there variation within each zone at all?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 16:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554692#M7993</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-07-24T16:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554693#M7994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent idea, this is the only one that would account for a 0 std dev outside of pure error.&amp;nbsp; There is no indication on any zonal statistics thread of this behaviour being reported before.&amp;nbsp; You might also want to examine the statistics of the std dev raster to confirm non-visually that the values are indeed all 0 (which I am sure you have)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 16:30:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554693#M7994</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-07-24T16:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554694#M7995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Curtis and Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good questions, but I can assure you that I wouldn't have posted to the forum without checking for such basic causes first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned, when I replaced the zonal grid with a polygon feature class covering the identical areas, the standard deviation gave results which were about as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some context, if needed, the zones are each a single pixel of 2.5 minutes, roughly 4.5km.&amp;nbsp; The data being summarised is a DEM at 9 second (roughly 250 metre) resolution.&amp;nbsp; So there are about 277 elevation pixels in each zone, except along the coast.&amp;nbsp; The elevations range from sea level up to about 1300m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way I can think of&amp;nbsp; that these data could give varying mean values but 0 standard devation, is if&lt;SPAN style="line-height: 1.5;"&gt; for each zone, defined in this case by a single pixel, it is taking only one sample, rather than sampling all 277 of the finer resolution data pixels which it overlaps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A way to check for this second possibility, would be to see if the mean values are actually correct, or just reflecting the value of a single elevation pixel within each zone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could post data online, but will take some fiddling to cut it down to a managabe test size.&amp;nbsp; So only if someone definitely wants to test it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 08:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554694#M7995</guid>
      <dc:creator>DanRosauer</dc:creator>
      <dc:date>2014-07-25T08:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554695#M7996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan&lt;BR /&gt;The differing cell size intrigues me...could you try to rasterize your zonal polygon file using the same cell size as your DEM and rerun the analysis ... just humor me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 11:27:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554695#M7996</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-07-25T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554696#M7997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks to me like your standard deviations are being calculated from a single pixel (the center of each large cell). This will always give you zero - no variation from one value!&amp;nbsp; It worked for you with polygons because by default the cell size used was your value grid cell size. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The default cell size used is usually the max of the inputs (this varies by tool). If you set the geoprocessing environment cellsize to the value grid before the tool is run, you may get the results you're looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course this means your std value is replicated for all cells in the zone - this seems very strange until you figure out that this allows zonal statistics to be used as part of a complex map algebra expression, for example, to identify all the cells in each zone that share the maximum zone value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ZonalStatistics(zonegrid, "VALUE", valuegrid, "MAXIMUM") == valuegrid&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be remiss to mention that statistics calculated using the zonal tools are by definition area (cell area) weighted - it is best practice to get a more accurate weighting by projecting the raster data before doing these calculations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 18:01:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554696#M7997</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-07-25T18:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error with Zonal statistics</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554697#M7998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way this is important!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #4d4d4d; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;You can specify the output cell size or resolution, or you can take the default. The default cell size, or resolution, for analysis results is set to the largest cell size of all the input raster datasets for the tool.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//009t000000nz000000"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)‌: Environment settings for raster data&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 18:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/error-with-zonal-statistics/m-p/554697#M7998</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-07-25T18:07:08Z</dc:date>
    </item>
  </channel>
</rss>

