﻿{"id":8245,"date":"2019-03-07T00:43:57","date_gmt":"2019-03-06T23:43:57","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=8245"},"modified":"2019-03-07T06:40:38","modified_gmt":"2019-03-07T05:40:38","slug":"arcgis-model-builder-entity-iterators","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/arcgis-model-builder-entity-iterators\/","title":{"rendered":"ArcGis Model Builder: entity iterators"},"content":{"rendered":"\n<p>We have already discussed two types of iterators, the layer iterators ( <a href=\"https:\/\/translate.google.com\/translate?hl=fr&amp;prev=_t&amp;sl=fr&amp;tl=en&amp;u=http:\/\/www.sigterritoires.fr\/%3Fp%3D890\">ArcGIS Model Builder: how<\/a>\nto spread <a href=\"https:\/\/translate.google.com\/translate?hl=fr&amp;prev=_t&amp;sl=fr&amp;tl=en&amp;u=http:\/\/www.sigterritoires.fr\/%3Fp%3D890\">a<\/a> <a href=\"https:\/\/translate.google.com\/translate?hl=fr&amp;prev=_t&amp;sl=fr&amp;tl=en&amp;u=http:\/\/www.sigterritoires.fr\/%3Fp%3D890\">template into a dataset<\/a> <a href=\"https:\/\/translate.google.com\/translate?hl=fr&amp;prev=_t&amp;sl=fr&amp;tl=en&amp;u=http:\/\/www.sigterritoires.fr\/%3Fp%3D890\">in input<\/a> ) and the digital iterators ( <a href=\"https:\/\/translate.google.com\/translate?hl=fr&amp;prev=_t&amp;sl=fr&amp;tl=en&amp;u=http:\/\/www.sigterritoires.fr\/%3Fp%3D913\">ArcGIS Model Builder: FOR and WHILE<\/a>\niterators ).\nTherefore still remains the last type of iterators: entities iterators. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p><strong>What are the entities iterators<\/strong> <strong>?<\/strong> <\/p>\n\n\n\n<p>You know the difference between ArcCatalog and ArcMap: when it refers to\nan operation performed on a layer ( creation , copy , <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/qgis-projections-crs\/\">projection<\/a>, &#8230;) you use\nArcCatalog. When it refers to intervene on a layer entities (modification,\naddition , &#8230;) you use ArcMap. In this case, it is similar : when you want apply\na processing to various layers, you use the layer iterators. <\/p>\n\n\n\n<p>There are three types of iterators: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Iterate the selection entity <\/li><li>Iterate the selection records <\/li><li>Iterate the field values <\/li><\/ul>\n\n\n\n<p>The three iterators correspond to the same objective: select the input\nentities layer according to the values included in an attribute field . So ,\nwhy three iterators ? It &lsquo;s not because of the selection that you make (it is always\nthe same), but about the &nbsp;the iterator output.\nIf you are reading this article, then, you have already experienced some trouble\nwith Model Builder. Therefore you know that the tools of the toolbox are unpredictable\nand they do not work (randomly). You have tools that ask for a Feature Class as\ninput data as, others that apply to tabular views (Row selection) and others that\nask for a Value . The three iterators correspond to these three types of\ntoolbox tool conditions . <\/p>\n\n\n\n<p>To be clear, you have a single data layer as input, you use an attribute\nwith different values ; <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>you use <em>iterate<\/em> <em>the<\/em> <em>entity selection<\/em> you will obtain a <strong>Feature Class<\/strong> type as output to be connected to the processing model <\/li><li>you use <em>iterate<\/em> <em>the<\/em> <em>records selection<\/em> you will obtain a <strong>Tabular<\/strong> <strong>Vue<\/strong> type output to be connected to the processing model <\/li><li>you use <em>Iterate<\/em> <em>Field<\/em> <em>Values<\/em> you will obtain a <strong>Value<\/strong> (text) output to be connected to the processing model <\/li><\/ul>\n\n\n\n<p><strong>How to iterate the entity selection<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"293\" data-attachment-id=\"8246\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/arcgis-model-builder-entity-iterators\/71-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/71.png?fit=630%2C293&amp;ssl=1\" data-orig-size=\"630,293\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"71\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/71.png?fit=630%2C293&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/71.png?resize=630%2C293&#038;ssl=1\" alt=\"\" class=\"wp-image-8246\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/71.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/71.png?resize=300%2C140&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>The input layer contains 5 hydrographic regions, each one represented by\na polygon . The iterator will create , successively , a class entity containing\none of the polygons , and this entity class will be used as input of the process\nmodel. <\/p>\n\n\n\n<p>For each iteration , the iterator will generate, as well, a string, <em>Value,<\/em> containing the code for the hydrographic region. This value will be used as an online substitution variable for the output layer of the process model. To this end , we insert % Value% in the layer name at the end of the last tool knew model , for example <em>C: \\ Users \\ admin \\ Documents \\ ArcGIS \\ Projects \\ MyProject10 \\ HYDROGRAPHIE_SURFACIQUE_% Value% .shp<\/em> <strong>How to iterate the records selection<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"300\" data-attachment-id=\"8247\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/arcgis-model-builder-entity-iterators\/72-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/72.png?fit=630%2C300&amp;ssl=1\" data-orig-size=\"630,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"72\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/72.png?fit=630%2C300&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/72.png?resize=630%2C300&#038;ssl=1\" alt=\"\" class=\"wp-image-8247\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/72.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/72.png?resize=300%2C143&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>The input layer contains 18 hydrographic sectors, each one represented\nby a polygon . The iterator will create , successively , a table containing the\nrecords of a single hydrographic region. For the Brittany region, for example,\nthere are 9 polygons (entities) in the input layer. This table will be used as\ninput for the processing model, and the statistics will be calculated for the 9\nrecords of Brittany, then , in the other iterations , for each region code present\nin the input entity class. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>For each iteration , the iterator will, also, generate a string, <em>Value,<\/em> containing the code for the hydrographic region . This value will be used as an online substitution variable for the output layer of the process model. To this end , we insert % Value% in the layer name at the end of the last tool knew model , for example <em>C: \\ Users \\ admin \\ Documents \\ ArcGIS \\ Projects \\ MyProject10 \\ MyProject10.gdb \\ SECTEURS_% Value% _Statistics<\/em> <\/p>\n\n\n\n<p><strong>How to iterate Field Values<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"579\" height=\"432\" data-attachment-id=\"8248\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/arcgis-model-builder-entity-iterators\/73-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/73.png?fit=579%2C432&amp;ssl=1\" data-orig-size=\"579,432\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"73\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/73.png?fit=579%2C432&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/73.png?resize=579%2C432&#038;ssl=1\" alt=\"\" class=\"wp-image-8248\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/73.png?w=579&amp;ssl=1 579w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/03\/73.png?resize=300%2C224&amp;ssl=1 300w\" sizes=\"auto, (max-width: 579px) 100vw, 579px\" \/><\/figure>\n\n\n\n<p>The attribute table of the input layer contains a field with values . This\niterator allows creating a series of values that will be used successively as\ninput for a tool of the processing model, for example for the Buffer tool, the\ndistance of the buffer. <\/p>\n\n\n\n<p>The iterator reads all records from the input table and according to your\nchoice , it creates a series of different values or a series comprising all the\nvalues found , even if there are repeated values. This is checked by the\ncheckbox \u00ab\u00a0Unique Values\u00a0\u00bb. <br>\nFor example , a table with 100 records has 12 different values. <br>\nIf the box is checked , the model will run 12 times , once for each of the 12\nvalues . If the box is not checked , the model will run 100 times , once for\neach recording . <\/p>\n\n\n\n<p>As the last element in the three parameter windows you can see a check\nbox \u00ab\u00a0Skip Null Values\u00a0\u00bb. If is possible to find null values (not zero),\nit is advisable to check this box because, even though, the iterator will not\nhave any problem, the processing tools will. When in doubt, check it out, it cannot\nhurt, unless the values null are taken in account by the processing model. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have already discussed two types of iterators, the layer iterators ( ArcGIS Model Builder: how to spread a template into a dataset in input ) and the digital iterators ( ArcGIS Model Builder: FOR and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1260],"tags":[],"class_list":["post-8245","post","type-post","status-publish","format-standard","hentry","category-non-classe-en"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-28Z","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=8245"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8245\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=8245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=8245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=8245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}