<?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 Batch ZonalStatisticsAsTable in Arcpy in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/batch-zonalstatisticsastable-in-arcpy/m-p/1212967#M59874</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have around 50 rasters that I want to calculate their Zonalstatistics (Mean) as a table. The idea is that I want in the end one table with 50 rows of mean for each raster.&lt;/P&gt;&lt;P&gt;I started with this code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r'C:\Users\YM\Desktop\et_products\WAPOR\WAPOR.v2_dekadal_L2_AETI_D\2009'&lt;BR /&gt;shapefile = r'C:\Users\YM\Desktop\statistics_point\buffer_3oo_R3.shp'&lt;/P&gt;&lt;P&gt;rasters = arcpy.ListRasters("*.tif")&lt;/P&gt;&lt;P&gt;inZoneData = shapefile&lt;BR /&gt;zoneField = "Site"&lt;BR /&gt;inValueRaster = raster&lt;BR /&gt;outTable = 'test_table'&lt;/P&gt;&lt;P&gt;for raster in rasters:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; utZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster,&amp;nbsp;outTable, "NODATA", "MEAN")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem that I am having is I don't know how to make the process not overwriting the table for each time it goes from a raster to another but add the calculated mean in the next row and carry on.&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 15:20:36 GMT</pubDate>
    <dc:creator>YEMY</dc:creator>
    <dc:date>2022-09-15T15:20:36Z</dc:date>
    <item>
      <title>Batch ZonalStatisticsAsTable in Arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/batch-zonalstatisticsastable-in-arcpy/m-p/1212967#M59874</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have around 50 rasters that I want to calculate their Zonalstatistics (Mean) as a table. The idea is that I want in the end one table with 50 rows of mean for each raster.&lt;/P&gt;&lt;P&gt;I started with this code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r'C:\Users\YM\Desktop\et_products\WAPOR\WAPOR.v2_dekadal_L2_AETI_D\2009'&lt;BR /&gt;shapefile = r'C:\Users\YM\Desktop\statistics_point\buffer_3oo_R3.shp'&lt;/P&gt;&lt;P&gt;rasters = arcpy.ListRasters("*.tif")&lt;/P&gt;&lt;P&gt;inZoneData = shapefile&lt;BR /&gt;zoneField = "Site"&lt;BR /&gt;inValueRaster = raster&lt;BR /&gt;outTable = 'test_table'&lt;/P&gt;&lt;P&gt;for raster in rasters:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; utZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster,&amp;nbsp;outTable, "NODATA", "MEAN")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem that I am having is I don't know how to make the process not overwriting the table for each time it goes from a raster to another but add the calculated mean in the next row and carry on.&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 15:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/batch-zonalstatisticsastable-in-arcpy/m-p/1212967#M59874</guid>
      <dc:creator>YEMY</dc:creator>
      <dc:date>2022-09-15T15:20:36Z</dc:date>
    </item>
  </channel>
</rss>

