<?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: Zonal Statistics for Overlapping Zones Consistent failure in Esri Forestry Group (EFG) Questions</title>
    <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875404#M69</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Henry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you mind posting a screenshot of your data, as well as the error? Also, are you running this in ArcMap or Pro? And are you using Model Builder for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2019 19:01:04 GMT</pubDate>
    <dc:creator>ClaytonCooley1</dc:creator>
    <dc:date>2019-09-18T19:01:04Z</dc:date>
    <item>
      <title>Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875403#M68</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: #242729; background-color: #f9f8f6; border: 0px; padding: 0px 15px 0px 0px;"&gt;&lt;DIV class="" data-post-id="336206" style="color: #bbc0c4 !important; border: 0px; font-weight: inherit; font-size: 13px; margin: -2px;"&gt;&lt;DIV class="" data-value="0" style="color: #6a737c !important; border: 0px; font-weight: inherit; font-size: 1.61538rem !important; margin: 2px;"&gt;I am trying to run Zonal Statistics for Overlapping Zones on some Buffer feature classes that overlap, and I'm trying to calculate % forest cover under each buffer zone. I have a reclassed basemap that is either forest or non-forest as 1 and 0 values in a raster. I downloaded and ran the script and it succeeded in calculating the zonal statistics for my first feature class and it took about 12 minutes. Since then, I have not gotten it to succeed, and it has taken over 2 hours to complete, and fails every time with Error 001156: cannot write OID FSP001 to table (FSP001 being the name of one of my buffers). It always has this error regardless of which feature class I input into the script. The raster is just a reclassed basemap. I would like to avoid doing each zone individually as there are over 500 of them. I've run this script about 10 times, and every time it has the same error, except for the first time when it succeeded, despite there being no discernible difference between the first feature class and the second one. I am not sure what I am doing wrong and it is highly discouraging. The script (I think) uses an iterator to return geometric data, but it takes a very long time and continues to fail.&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 18:34:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875403#M68</guid>
      <dc:creator>HenrySymanski</dc:creator>
      <dc:date>2019-09-18T18:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875404#M69</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Henry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you mind posting a screenshot of your data, as well as the error? Also, are you running this in ArcMap or Pro? And are you using Model Builder for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875404#M69</guid>
      <dc:creator>ClaytonCooley1</dc:creator>
      <dc:date>2019-09-18T19:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875405#M70</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running it in Arcmap, I'm not using the model builder. It was a toolbox that I downloaded off the internet from someone who developed the script. I can post a screenshot of the script and of the layers when the script is done running.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 19:05:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875405#M70</guid>
      <dc:creator>HenrySymanski</dc:creator>
      <dc:date>2019-09-18T19:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875406#M71</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/459912_Error message.png" /&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/459913_Untitled2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the two images that show the layers and the error messages. This failed after 4 hours and 48 minutes of running.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The python code is as follows:&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;# Local variables...&lt;BR /&gt;inputFeatureZone = arcpy.GetParameterAsText(0)&lt;BR /&gt;joinField = arcpy.GetParameterAsText(1)&lt;BR /&gt;valueRaster = arcpy.GetParameterAsText(2)&lt;BR /&gt;joinedFC = arcpy.GetParameterAsText(3)&lt;/P&gt;&lt;P&gt;#Loop through features&lt;BR /&gt;inRows = arcpy.SearchCursor(inputFeatureZone)&lt;BR /&gt;inRow = inRows.next()&lt;/P&gt;&lt;P&gt;#input variables&lt;BR /&gt;strFID = '"FID" ='&lt;BR /&gt;zone = "zone"&lt;/P&gt;&lt;P&gt;cellAssign = "CELL_CENTER"&lt;BR /&gt;priority = "NONE"&lt;BR /&gt;newSelection = "NEW_SELECTION"&lt;/P&gt;&lt;P&gt;# Make a layer from the feature class&lt;BR /&gt;arcpy.MakeFeatureLayer_management(inputFeatureZone, zone)&lt;/P&gt;&lt;P&gt;while inRow:&lt;BR /&gt; #selct the fid to process&lt;BR /&gt; arcpy.SelectLayerByAttribute_management(zone, newSelection, strFID + str(inRow.FID))&lt;BR /&gt; &lt;BR /&gt; #create a unique name for the zone&lt;BR /&gt; uniqueZone = arcpy.CreateUniqueName("zone.shp", arcpy.env.workspace)&lt;BR /&gt; uniqueTable = arcpy.CreateUniqueName("ZSasT", arcpy.env.workspace)&lt;BR /&gt; #create a temporary feature to use for zonal stats as table&lt;BR /&gt; arcpy.CopyFeatures_management(zone, uniqueZone)&lt;BR /&gt; outZSaT = ZonalStatisticsAsTable(uniqueZone, joinField, valueRaster, uniqueTable, "NODATA", "ALL")&lt;/P&gt;&lt;P&gt;#move to next record.&lt;BR /&gt; inRow = inRows.next()&lt;/P&gt;&lt;P&gt;#Clear the last selection.&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(zone, "CLEAR_SELECTION")&lt;BR /&gt;#merge the tables so the can be joined to the zone feature class&lt;BR /&gt;mergedTable = arcpy.CreateUniqueName("merge.dbf", arcpy.env.workspace)&lt;BR /&gt;tableList = arcpy.ListTables()&lt;BR /&gt;fullPathTableList = []&lt;BR /&gt;for table in tableList:&lt;BR /&gt; fullPathTableList.append(arcpy.Describe(table).catalogPath)&lt;BR /&gt; &lt;BR /&gt;arcpy.Merge_management(fullPathTableList, mergedTable)&lt;/P&gt;&lt;P&gt;#join them&lt;BR /&gt;arcpy.AddJoin_management(zone, joinField, mergedTable, joinField)&lt;BR /&gt;#save the joined data as a new feature&lt;BR /&gt;arcpy.CopyFeatures_management(zone, joinedFC)&lt;/P&gt;&lt;P&gt;# clean up old output features&lt;BR /&gt;arcpy.Delete_management(tempDIR + os.sep + tempWorkspace)&lt;/P&gt;&lt;P&gt;print "Process Complete"&lt;/P&gt;&lt;P&gt;#free memory&lt;BR /&gt;del inRow, tableList, zone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know anything about python so this is completely foreign to me. If there is something wrong with the code, I wouldn't know, or know how to fix it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 20:11:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875406#M71</guid>
      <dc:creator>HenrySymanski</dc:creator>
      <dc:date>2019-09-18T20:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875407#M72</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like there must be an issue with the tool you downloaded. If I were&lt;/P&gt;&lt;P&gt;you, I would attempt to run this with the Zonal Statistics as Table tool in&lt;/P&gt;&lt;P&gt;ArcMap. Try following these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Place all of your buffers in one feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) For your raster, open the attribute field and select &lt;STRONG&gt;only&lt;/STRONG&gt; the&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;forested&lt;/STRONG&gt; pixels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Open the Zonal Statistics as Table tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Use your buffer for the input feature data and select your our unique&lt;/P&gt;&lt;P&gt;identifier field as your Zone field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Under Statistics type, leave as All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Run the tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Once the table gets generated, you’ll have a count of all the forested&lt;/P&gt;&lt;P&gt;pixels within each buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Add a new field titled ‘ForestedAcres’ and calculate your Count field by&lt;/P&gt;&lt;P&gt;0.222394 to get your total forested acres.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9) Add another field called ‘BufferAcres’ and calculate the total acres for&lt;/P&gt;&lt;P&gt;each buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10) Add another field called ForestedPerc and use Field Calculator to&lt;/P&gt;&lt;P&gt;divide your ForestedAcres by your BufferAcres field to find the percentage&lt;/P&gt;&lt;P&gt;of forested acres. ex. ForestedAcres/BufferAcres * 100&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 20:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875407#M72</guid>
      <dc:creator>ClaytonCooley</dc:creator>
      <dc:date>2019-09-18T20:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875408#M73</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try this tomorrow. I have tried zonal statistics as table before but it comes up with an incorrect count of the pixels. If it happens again I can post the attribute table here to show you what I mean. Does this work on overlapping buffer zones or no? All of my buffers are around points and each one overlaps. I thought maybe that was why zonal statistics as table did not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 21:02:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875408#M73</guid>
      <dc:creator>HenrySymanski</dc:creator>
      <dc:date>2019-09-18T21:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875409#M74</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried to do Zonal Statistics as Table on one of my feature classes and it does not give me the same number of outputs in the table as there are buffer zones. Additionally, the Area values for the output table are not all equal, which i assume they need to be. Is there something I am doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 16:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875409#M74</guid>
      <dc:creator>HenrySymanski</dc:creator>
      <dc:date>2019-09-19T16:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875410#M75</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using your unique identifier as your Zone Field? If not, that may&lt;/P&gt;&lt;P&gt;be causing the issue. I wouldn't think the area values have to be equal&lt;/P&gt;&lt;P&gt;unless all your buffers are the same distance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 16:34:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875410#M75</guid>
      <dc:creator>ClaytonCooley</dc:creator>
      <dc:date>2019-09-19T16:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics for Overlapping Zones Consistent failure</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875411#M76</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All of my buffers are the same distance, 2km. I'm using a field that assigns a unique number to each buffer, the "Name" field which contains values "FSP001" - "FSP078". Each value is unique in this field. All of the buffers overlap as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2019 16:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/zonal-statistics-for-overlapping-zones-consistent/m-p/875411#M76</guid>
      <dc:creator>HenrySymanski</dc:creator>
      <dc:date>2019-09-19T16:38:47Z</dc:date>
    </item>
  </channel>
</rss>

