<?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: Multidimensional zonal statistics in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374796#M12853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Adam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. I use ArcGIS 10.1 with service pack 1 (arcinfo licence).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the error output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\Users\COTTIERF\Documents\ArcGIS\MultidimensionSupplementalTools\Scripts\mds\tools\multidimensional_zonal_statistics_as_table.py", line 442, in execute
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.zonal_statistics_as_table_for_grid(parameters, messages, dataset)
&amp;nbsp; File "C:\Users\COTTIERF\Documents\ArcGIS\MultidimensionSupplementalTools\Scripts\mds\tools\multidimensional_zonal_statistics_as_table.py", line 567, in zonal_statistics_as_table_for_grid
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.snapRaster = temp_snap
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 529, in set_
&amp;nbsp;&amp;nbsp;&amp;nbsp; self[env] = val
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 581, in __setitem__
&amp;nbsp;&amp;nbsp;&amp;nbsp; ret_ = setattr(self._gp, item, value)
RuntimeError: Object: Error in accessing environment &amp;lt;snapRaster&amp;gt;

Failed to execute (MultidimensionalZonalStatisticsAsTable).&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards and thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fabien&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:20:43 GMT</pubDate>
    <dc:creator>FabienCottier</dc:creator>
    <dc:date>2021-12-11T17:20:43Z</dc:date>
    <item>
      <title>Multidimensional zonal statistics</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374794#M12851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I'm posting here as I encountered a bug using the multidimensional zonal statistics script from the multidimensional supplemental tool &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.arcgis.com/home/item.html?id=9f963f362fe5417f87d44618796db938" rel="nofollow" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=9f963f362fe5417f87d44618796db938&lt;/A&gt;&lt;SPAN&gt;&amp;gt;. Using data from the global precipitation dataset (0.5 degree cell netCDF file, with separate band for&amp;nbsp; month from 1901 to 2010), I would like to compute the amount of precipitation by administrative zone for Kenya per year (I use the GAUL dataset -feature class dataset- for the first administrative order).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm however stuck at the first step, which consists in getting the total amount of precipitation for each kenyan administrative zone for each time band. When using the multidimensional zonal statistics script, I get an error in python, whereby it appears that there is an error with the SnapRaster. I'm surprised to get this error, since the zone field is a feature layer (the gaul dataset). Anyway, I did try also using a raster conversion (with 05. degree cell) of the polygon GAUL layer, but I still get the same error, as well as when I tell arcpy explicitly to consider the gaul raster, as the snap raster (in the environment variable).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To be honest, it is the first time, I'm using netCDF file and I'm a bit lost here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I would appreciate any help to overcome this issue!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks and best wishes,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fabien&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: feel free to contact me if you need more details.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 11:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374794#M12851</guid>
      <dc:creator>FabienCottier</dc:creator>
      <dc:date>2013-09-24T11:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional zonal statistics</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374795#M12852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Fabien,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of ArcGIS are you running?&amp;nbsp; Can you post the error output here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Adam&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 15:50:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374795#M12852</guid>
      <dc:creator>AdamWehmann</dc:creator>
      <dc:date>2013-09-25T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional zonal statistics</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374796#M12853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Adam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. I use ArcGIS 10.1 with service pack 1 (arcinfo licence).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the error output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\Users\COTTIERF\Documents\ArcGIS\MultidimensionSupplementalTools\Scripts\mds\tools\multidimensional_zonal_statistics_as_table.py", line 442, in execute
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.zonal_statistics_as_table_for_grid(parameters, messages, dataset)
&amp;nbsp; File "C:\Users\COTTIERF\Documents\ArcGIS\MultidimensionSupplementalTools\Scripts\mds\tools\multidimensional_zonal_statistics_as_table.py", line 567, in zonal_statistics_as_table_for_grid
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.snapRaster = temp_snap
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 529, in set_
&amp;nbsp;&amp;nbsp;&amp;nbsp; self[env] = val
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 581, in __setitem__
&amp;nbsp;&amp;nbsp;&amp;nbsp; ret_ = setattr(self._gp, item, value)
RuntimeError: Object: Error in accessing environment &amp;lt;snapRaster&amp;gt;

Failed to execute (MultidimensionalZonalStatisticsAsTable).&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards and thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fabien&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374796#M12853</guid>
      <dc:creator>FabienCottier</dc:creator>
      <dc:date>2021-12-11T17:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional zonal statistics</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374797#M12854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Fabien,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, check that you are using version 1.2 of the Multidimension Supplemental Tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, simply replace the line 533:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.snapRaster = temp_snap&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.snapRaster = temp_snap.catalogPath&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a datatype mismatch.&amp;nbsp;&amp;nbsp; In ArcGIS 10.1, the snapRaster environment setting expects string input, but it was given a raster input.&amp;nbsp; The code will function as-is in 10.2 due to some datatype coercion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adam&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 00:30:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374797#M12854</guid>
      <dc:creator>AdamWehmann</dc:creator>
      <dc:date>2013-09-27T00:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional zonal statistics</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374798#M12855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Adam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for the help. I'm away at a workshop for the week-end, but I'll have a look at it once I'm back in the office next week. I'll let you know how does this work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With my best wishes and thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fabien&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 07:16:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374798#M12855</guid>
      <dc:creator>FabienCottier</dc:creator>
      <dc:date>2013-09-27T07:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Multidimensional zonal statistics</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374799#M12856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Adam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for the help, changing the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;arcpy.env.snapRaster &lt;/SPAN&gt;&lt;SPAN&gt; did correct the bug! I could compute statistics both with a raster and shapefile as zone field. The only remaining issue is with when a feature class stored in a geodatabase is used as a zone field, in this case, I get the following error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Not a valid zone dataset.

Traceback (most recent call last):
&amp;nbsp; File "C:\Users\COTTIERF\Documents\ArcGIS\MultidimensionSupplementalTools\Scripts\mds\tools\multidimensional_zonal_statistics_as_table.py", line 442, in execute
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.zonal_statistics_as_table_for_grid(parameters, messages, dataset)
&amp;nbsp; File "C:\Users\COTTIERF\Documents\ArcGIS\MultidimensionSupplementalTools\Scripts\mds\tools\multidimensional_zonal_statistics_as_table.py", line 612, in zonal_statistics_as_table_for_grid
&amp;nbsp;&amp;nbsp;&amp;nbsp; raise arcpy.ExecuteError
ExecuteError

Failed to execute (MultidimensionalZonalStatisticsAsTable).
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This not a very important issue, since I can always export my feature class stored in a geodatabase in a shapefile, but I thought that you wish to be aware of it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks for the help and all the best!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fabien&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/multidimensional-zonal-statistics/m-p/374799#M12856</guid>
      <dc:creator>FabienCottier</dc:creator>
      <dc:date>2021-12-11T17:20:46Z</dc:date>
    </item>
  </channel>
</rss>

