<?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: 2 iterators in the same model builder in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120619#M458</link>
    <description>&lt;P&gt;Just to prove it&amp;nbsp;&lt;EM&gt;can&lt;/EM&gt; be done, here is an example I worked up for the good of the thread.&lt;/P&gt;&lt;P&gt;(The Calculate Value tool in the main model was needed because the iterator generates "fieldname #" for the field name on each iteration, I cleaned it up with the Calculate Value expression %Polygon ID field%[-2:], output data type Field.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="model.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28354i4426F034156D165E/image-size/large?v=v2&amp;amp;px=999" role="button" title="model.jpg" alt="model.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="submodel.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28355iC9CD8B35AC666569/image-size/large?v=v2&amp;amp;px=999" role="button" title="submodel.jpg" alt="submodel.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 28 Nov 2021 21:35:46 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-11-28T21:35:46Z</dc:date>
    <item>
      <title>2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1119426#M454</link>
      <description>&lt;P&gt;Hi all! I am facing a problem because I know is not possible to include 2 iterators in the same model builder. I have 10 features (polygons) in a shapefile and 1000 rasters in a folder. I want to calculate for each polygon the zonal statistical as a table for each raster. Therefore, I need to use:&lt;/P&gt;&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;Iterate feature selection to avoid the problem of overlapping polygons and iterate each polygon&lt;/LI&gt;&lt;LI&gt;Iterate raster to make the iteration of each raster in each polygon&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Therefore, I need two iterators, any idea on how to overcome this problem?&lt;/P&gt;&lt;P&gt;I am trying by creating a submodel and a model as shown in the images below but without too much success&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="submodel2.JPG" style="width: 672px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28064i78FDF96D125BF4E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="submodel2.JPG" alt="submodel2.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="model.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28062iD53A9E17910642CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="model.JPG" alt="model.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 05:34:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1119426#M454</guid>
      <dc:creator>SAV</dc:creator>
      <dc:date>2021-11-23T05:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1119741#M455</link>
      <description>&lt;P&gt;You are missing the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/collect-values.htm" target="_self"&gt;Collect Values&lt;/A&gt; tool in your submodel, then the submodel will pass back the generated list of rasters.. &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/add-a-submodel-to-a-model.htm#ESRI_SECTION1_ED2926F95107420F9D483F4637D23821" target="_self"&gt;See the help for an example. (UPDATED LINK)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In ArcGIS Pro,&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/raster-analysis/zonal-statistics-as-table.htm" target="_self"&gt; Zonal Statistics as Table&lt;/A&gt; has been updated to support overlapping polygons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 18:41:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1119741#M455</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-28T18:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120604#M456</link>
      <description>&lt;P&gt;I have changed the submodel as you said including the collect values tool. I have run it and seems to work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="submodel.JPG" style="width: 933px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28352iB242F9C58A9847DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="submodel.JPG" alt="submodel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, in the main model, I can not select the output of the submodel (Input value raster) in the zonal statistical as table&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="model.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28353i76A3EB9033884D46/image-size/large?v=v2&amp;amp;px=999" role="button" title="model.JPG" alt="model.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I still could not do it. I do not have license of ArcGis Pro!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 18:22:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120604#M456</guid>
      <dc:creator>SAV</dc:creator>
      <dc:date>2021-11-28T18:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120607#M457</link>
      <description>&lt;P&gt;1. You need to do the zonal statistics in the submodel. &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/add-a-submodel-to-a-model.htm#ESRI_SECTION1_ED2926F95107420F9D483F4637D23821" target="_self"&gt;This example in the help&lt;/A&gt; (this is Pro but it applies to ArcMap too) shows this, the processing has to happen in the "inner loop", then each inner iteration set of results can be passed back up. You need to be careful to name your outputs uniquely using model variables so each zonalstats output table doesn't get overwritten, e.g. %shedname%_%rastername%_tbl.&amp;nbsp; It gets really complicated fast which is why we often use Python for complex iterations like this.&lt;/P&gt;&lt;P&gt;2. There are tools to process overlapping polygons in ArcMap available! Here are two toolboxes to check out.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/item.html?id=3528bd72847c439f88190a137a1d0e67" target="_self"&gt;Spatial Analyst Supplemental Tools&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/item.html?id=29707fb7f1664538871c65d7e1d9612e" target="_self"&gt;NAWQA Area-Characterization Toolbox&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3. You said you don't have a Pro license. This is not true, although you may not have an install set up, but legally if you are licensed for ArcMap you are also licensed for Pro. If you don't have a site administrator to help you with this, contact Esri customer service and they can set you up with a license.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 18:43:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120607#M457</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-28T18:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120619#M458</link>
      <description>&lt;P&gt;Just to prove it&amp;nbsp;&lt;EM&gt;can&lt;/EM&gt; be done, here is an example I worked up for the good of the thread.&lt;/P&gt;&lt;P&gt;(The Calculate Value tool in the main model was needed because the iterator generates "fieldname #" for the field name on each iteration, I cleaned it up with the Calculate Value expression %Polygon ID field%[-2:], output data type Field.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="model.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28354i4426F034156D165E/image-size/large?v=v2&amp;amp;px=999" role="button" title="model.jpg" alt="model.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="submodel.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28355iC9CD8B35AC666569/image-size/large?v=v2&amp;amp;px=999" role="button" title="submodel.jpg" alt="submodel.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 21:35:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120619#M458</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-28T21:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120957#M459</link>
      <description>&lt;P&gt;I just got installed ArcGIS 2.8. I am about to run the model builder in ArcGIS pro, but as far as I read to consider the overlapping polygons, I do not have to change anything in the options, right? the zonal statistics as table in ArcGIS 2.8 Pro considers the overlapping polygons as default right? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is the same person (Sara), but from my organization account!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 19:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120957#M459</guid>
      <dc:creator>SaraAV</dc:creator>
      <dc:date>2021-11-29T19:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120960#M460</link>
      <description>&lt;P&gt;Note if you use Pro, you don't need to iterate the polygons, you can just iterate on the rasters in a single model. The ModelBuilder workflow I showed above processes each polygon one at a time so it would work in ArcMap.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/zonal-statistics-as-table.htm#S_GUID-51435339-4392-4BC2-93E9-DDCAD27E2919" target="_self"&gt;As for Zonal Statistics As Table processing overlapping features, read the fine manual.&lt;/A&gt; At least it is advertised that way - but I always trust, but verify!&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;EM&gt;If the&amp;nbsp;&lt;SPAN class=""&gt;Input raster or feature zone data&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN class=""&gt;in_zone_data&lt;/SPAN&gt;&amp;nbsp;in Python) has overlapping features, the zonal analysis will be performed for each individual feature.&lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 29 Nov 2021 19:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120960#M460</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-29T19:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120983#M461</link>
      <description>&lt;P&gt;Hi, sorry for keeping asking, but I am having some problems to run it in ArcGIS Pro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having issues to name the tables with the same name of my rasters because the extension TIF of the raster. I am using parse path, but I am not able to making it work in ArcGIS Pro. As far as I know, in ArcMap, you use %Value% to name the files once you extract the name without extension from parse path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, when I am iterating over the&amp;nbsp; raster files, I do not got the symbol of the three arrows circling as I got in model builder of ArcMap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me to fix these issues?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put an image of what I got until now in the model builder in ArcGIS pro.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 792px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28460i67DC3560A0F6CAC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and this is how the zonal statistical as table looks...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 559px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28461iED9BE19C1161480A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 20:41:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1120983#M461</guid>
      <dc:creator>SAV</dc:creator>
      <dc:date>2021-11-29T20:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121008#M462</link>
      <description>&lt;P&gt;The thing in percents is a &lt;EM&gt;model variable&lt;/EM&gt;, not a default thing I think you think it is.&amp;nbsp;I don't see a %Value% variable in your model anywhere. This won't work because there is no variable to substitute so it will use the text "%Value%" and %'s aren't allowed for items in the geodatabase. %Name (2)%_tbl may work for the output to your zonal statistics as table - though you want to connect the variable &lt;EM&gt;Name (2)&amp;nbsp;&lt;/EM&gt;to the Zonal Statistics As Table tool as a precondition to make sure the Parse Path runs first.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 21:05:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121008#M462</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-29T21:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121019#M463</link>
      <description>&lt;P&gt;When I am trying to use&amp;nbsp;%Name (2)%_tbl as a name, I have the following error &lt;STRONG&gt;%Name (2)%_tbl must not contain spaces.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To do the precondition I have done the following in the Zonal Statistics as table&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.PNG" style="width: 559px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28465i29F6C9EA3A3CF4D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.PNG" alt="Capture3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 21:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121019#M463</guid>
      <dc:creator>SAV</dc:creator>
      <dc:date>2021-11-29T21:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121038#M464</link>
      <description>&lt;P&gt;I solved the problem by renaming the output of the parse_path to Name2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28470i4539A93065F06128/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.PNG" alt="Capture4.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but in the iterate rasters, only use the first raster and does not iterate over the other rasters in that folder. The iterate rasters looks like the following image&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture5.PNG" style="width: 564px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28472iAFE2F39EEB379DA0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture5.PNG" alt="Capture5.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and my folder I am sure that has more than 1 raster file as shown in the image below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28473i933B42647D70CC48/image-size/large?v=v2&amp;amp;px=999" role="button" title="7.PNG" alt="7.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you know why iterate only over the first raster file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121038#M464</guid>
      <dc:creator>SAV</dc:creator>
      <dc:date>2021-11-29T22:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121053#M465</link>
      <description>&lt;P&gt;Great to hear you got this thing running. I don't know, I would make sure you validate the model before you re-run it. Your model looks like it should run correctly. You may want to try "turning it off and turning it on again" -- ie restart Pro. Often that fixes things for me when things do not run as they should!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:32:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121053#M465</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-29T22:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: 2 iterators in the same model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121060#M466</link>
      <description>&lt;P&gt;Good solution removing the space. This can happen with the Spatial Analyst tools - they often bail on names, layer names, or even paths with spaces or any special characters.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:40:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/2-iterators-in-the-same-model-builder/m-p/1121060#M466</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-11-29T22:40:43Z</dc:date>
    </item>
  </channel>
</rss>

