1 00:00:00,387 --> 00:00:03,010 - [Instructor] Hi, and welcome to module seven 2 00:00:03,010 --> 00:00:06,150 of "Advanced Geographic Information Systems." 3 00:00:06,150 --> 00:00:08,660 This week we'll have three lectures, 4 00:00:08,660 --> 00:00:11,610 two "Slide Decks" and one live demo of 5 00:00:11,610 --> 00:00:14,197 a model construction in ArcGIS." 6 00:00:15,060 --> 00:00:15,993 Let's get started. 7 00:00:18,110 --> 00:00:19,511 This first lecture, we'll focus on 8 00:00:19,511 --> 00:00:23,010 the basics of model builder, the functionality with 9 00:00:23,010 --> 00:00:25,430 an ArcGIS that allows us to specify 10 00:00:25,430 --> 00:00:27,147 a geo processing workflow 11 00:00:27,147 --> 00:00:30,623 using a visual programming environment. 12 00:00:31,490 --> 00:00:34,040 A model is considered a collection of one, 13 00:00:34,040 --> 00:00:37,450 or typically more geoprocessing tools connected 14 00:00:37,450 --> 00:00:39,900 in a specific order to represent 15 00:00:39,900 --> 00:00:41,910 that geoprocessing workflow. 16 00:00:41,910 --> 00:00:43,360 We've got three things to consider 17 00:00:43,360 --> 00:00:45,370 with our model variables. 18 00:00:45,370 --> 00:00:48,940 First, variables are represented as data 19 00:00:48,940 --> 00:00:52,630 or values that the user adds to the model. 20 00:00:52,630 --> 00:00:55,480 Second, only the output variable 21 00:00:55,480 --> 00:00:57,310 or the output data set produced by 22 00:00:57,310 --> 00:01:00,190 a geoprocessing tool is created automatically. 23 00:01:00,190 --> 00:01:02,473 The rest is up for the user to specify, 24 00:01:03,350 --> 00:01:06,240 and then finally, to employ tool parameters 25 00:01:06,240 --> 00:01:07,870 and variables in a model, 26 00:01:07,870 --> 00:01:10,200 either create standalone variables 27 00:01:10,200 --> 00:01:11,900 within the model itself, 28 00:01:11,900 --> 00:01:13,934 and then connect them to a tool 29 00:01:13,934 --> 00:01:17,989 or expose those tool parameters as variables 30 00:01:17,989 --> 00:01:20,700 and then the user can specify 31 00:01:20,700 --> 00:01:23,033 the proper parameters at runtime. 32 00:01:25,210 --> 00:01:26,480 The tool element is one of 33 00:01:26,480 --> 00:01:30,180 the basic building blocks of a geo processing workflow. 34 00:01:30,180 --> 00:01:32,790 These elements perform various operations 35 00:01:32,790 --> 00:01:35,423 on geographic or tabular data. 36 00:01:38,290 --> 00:01:39,600 A tool dialogue is something 37 00:01:39,600 --> 00:01:41,660 we've seen many times before. 38 00:01:41,660 --> 00:01:43,950 It's the interface where a tool's parameters 39 00:01:43,950 --> 00:01:46,690 are specified and much like 40 00:01:46,690 --> 00:01:48,240 the geoprocessing operations 41 00:01:48,240 --> 00:01:51,080 we've performed with individual tools, 42 00:01:51,080 --> 00:01:54,040 those dialogue boxes will look very similar 43 00:01:54,040 --> 00:01:56,363 within the model builder environment. 44 00:01:57,700 --> 00:01:59,400 In terms of tool parameters, 45 00:01:59,400 --> 00:02:02,110 we're talking about the inputs, outputs, 46 00:02:02,110 --> 00:02:04,110 and the specifications that impact 47 00:02:04,110 --> 00:02:06,703 the geo-processing that the tool performs. 48 00:02:07,670 --> 00:02:09,320 Again, this is something we've worked 49 00:02:09,320 --> 00:02:11,773 with in the past as well. 50 00:02:12,700 --> 00:02:16,083 And then lastly, inline variable substitution. 51 00:02:17,300 --> 00:02:19,140 This represents a variable that can be used 52 00:02:19,140 --> 00:02:22,943 as a value or a data path for another model parameter. 53 00:02:23,930 --> 00:02:28,383 We enclose these variables inside percent symbols, 54 00:02:29,840 --> 00:02:33,510 and we can use inline variables substitution 55 00:02:33,510 --> 00:02:35,180 for model variables, 56 00:02:35,180 --> 00:02:38,093 system variables, or environment settings. 57 00:02:41,020 --> 00:02:44,030 Now, once again, these geo processing tools 58 00:02:44,030 --> 00:02:48,650 form the basic building blocks of a geoprocessing workflow. 59 00:02:48,650 --> 00:02:52,190 There are three different options, a built-in tool. 60 00:02:52,190 --> 00:02:54,950 Again, something we've worked with many times before. 61 00:02:54,950 --> 00:02:56,920 These are the geoprocessing tools contained 62 00:02:56,920 --> 00:02:59,863 in one of the many different ArcGIS toolboxes. 63 00:03:00,850 --> 00:03:03,690 A script tool such as a Python file, 64 00:03:03,690 --> 00:03:05,530 or if you'd like to go old school, 65 00:03:05,530 --> 00:03:08,950 an AML file that's short for Arc-macro language, 66 00:03:08,950 --> 00:03:12,970 or even an executable, a dot exe or a dot bat file 67 00:03:12,970 --> 00:03:15,420 can be created using the script tool wizard 68 00:03:15,420 --> 00:03:18,310 and then run from a file on the disc. 69 00:03:18,310 --> 00:03:21,210 And then lastly, a model tool, in this case, 70 00:03:21,210 --> 00:03:23,963 we're nesting models, one within another. 71 00:03:27,960 --> 00:03:29,252 Now in terms of variables, 72 00:03:29,252 --> 00:03:33,780 we've got data variables and value variables. 73 00:03:33,780 --> 00:03:35,610 Data variables are model elements 74 00:03:35,610 --> 00:03:37,350 that contain descriptive information 75 00:03:37,350 --> 00:03:39,073 about data stored on the disk. 76 00:03:40,290 --> 00:03:41,760 And in particular, we're referring here 77 00:03:41,760 --> 00:03:45,860 to either input data or derived data. 78 00:03:45,860 --> 00:03:48,340 And note the colors of the ovals here, 79 00:03:48,340 --> 00:03:49,970 these are important to understand 80 00:03:49,970 --> 00:03:53,193 the various components of the ArcGIS models. 81 00:03:54,260 --> 00:03:57,904 Now value variables represent things like strings, numbers, 82 00:03:57,904 --> 00:04:01,890 true false values, spatial references, and so on. 83 00:04:01,890 --> 00:04:05,410 These do not reference data that are stored on the disk. 84 00:04:05,410 --> 00:04:09,413 And these can be things like input values or derive values. 85 00:04:12,660 --> 00:04:15,780 How do we link all those different pieces together? 86 00:04:15,780 --> 00:04:18,330 We use model connectors to connect data 87 00:04:18,330 --> 00:04:20,083 and values, to tools. 88 00:04:21,680 --> 00:04:23,300 A data connector connects data 89 00:04:23,300 --> 00:04:26,730 and value variables to tools and is symbolized 90 00:04:26,730 --> 00:04:29,753 with a solid line and arrow. 91 00:04:30,830 --> 00:04:33,440 An environment connector connects a variable containing 92 00:04:33,440 --> 00:04:35,950 an environment setting to a tool, 93 00:04:35,950 --> 00:04:37,610 so the tool will be employed 94 00:04:37,610 --> 00:04:40,690 the environment setting what executed. 95 00:04:40,690 --> 00:04:42,720 A pre-conditioned connector ensures 96 00:04:42,720 --> 00:04:45,730 that a geoprocessing tool only be executed 97 00:04:45,730 --> 00:04:46,950 after the contents of 98 00:04:46,950 --> 00:04:49,870 the preconditioned variable are created. 99 00:04:49,870 --> 00:04:52,970 This tool is represented with a dash arrow. 100 00:04:52,970 --> 00:04:55,860 In this case, the dashes are much shorter. 101 00:04:55,860 --> 00:04:58,930 And then lastly, there's a feedback connector 102 00:04:58,930 --> 00:05:01,250 and this connects the output of a tool back 103 00:05:01,250 --> 00:05:04,360 into the same tool as an input, otherwise known 104 00:05:04,360 --> 00:05:07,173 as a feedback loop, and these connectors 105 00:05:07,173 --> 00:05:11,339 are displayed using a dash line arrow format 106 00:05:11,339 --> 00:05:12,883 with a cyan color. 107 00:05:13,940 --> 00:05:16,100 In terms of the model process, 108 00:05:16,100 --> 00:05:18,620 once again, the model itself is a tool 109 00:05:18,620 --> 00:05:21,130 and the variables connected to it. 110 00:05:21,130 --> 00:05:24,070 The connector lines indicate the sequence 111 00:05:24,070 --> 00:05:28,730 of the processing order and not surprisingly derived data 112 00:05:28,730 --> 00:05:33,310 from one process becomes the input data for another process. 113 00:05:33,310 --> 00:05:36,020 And I should note that each process is 114 00:05:36,020 --> 00:05:39,870 in one of four states, not ready to run, 115 00:05:39,870 --> 00:05:44,240 ready to run, running, or has been run. 116 00:05:44,240 --> 00:05:45,880 Let's look at the image over on the right 117 00:05:45,880 --> 00:05:49,000 to clarify those different states. 118 00:05:49,000 --> 00:05:52,390 Not ready to run values are symbolized simply 119 00:05:52,390 --> 00:05:56,383 by a plain black outline with the polygon filled in white. 120 00:05:57,740 --> 00:06:00,004 Once a tool is ready to run, 121 00:06:00,004 --> 00:06:02,290 you'll see that those icons are filled in with 122 00:06:02,290 --> 00:06:05,283 the assorted colors, you see in that ready to run column. 123 00:06:06,550 --> 00:06:08,630 And when a tool is running, 124 00:06:08,630 --> 00:06:10,730 either the tool or the iterator, 125 00:06:10,730 --> 00:06:13,430 if there is one in your model, will flash red 126 00:06:13,430 --> 00:06:17,753 to indicate the stage of the process the model is in. 127 00:06:18,650 --> 00:06:21,850 And then lastly, once a tool has been run, 128 00:06:21,850 --> 00:06:24,150 you'll notice that there's a shadow offset 129 00:06:25,060 --> 00:06:29,210 to the lower right, indicating that tool iterator 130 00:06:29,210 --> 00:06:33,753 or derived data derive value has been run or produced. 131 00:06:36,210 --> 00:06:38,550 Now, there's really three different types 132 00:06:38,550 --> 00:06:41,570 of data that we can think about, input data. 133 00:06:41,570 --> 00:06:43,170 And we all know what that means. 134 00:06:43,170 --> 00:06:45,340 These are the input data sets that we supply 135 00:06:45,340 --> 00:06:48,250 to a geoprocessing tool so that 136 00:06:48,250 --> 00:06:50,883 some geoprocessing operation can be performed on. 137 00:06:51,960 --> 00:06:55,260 Intermediate data, represents data created 138 00:06:55,260 --> 00:06:57,080 from each step of the model. 139 00:06:57,080 --> 00:06:59,930 Now these can be data that you might want to keep, 140 00:06:59,930 --> 00:07:03,420 or that you get rid of because you don't need them, 141 00:07:03,420 --> 00:07:06,830 once the model has been run to completion. 142 00:07:06,830 --> 00:07:08,730 So these are created as a middle step 143 00:07:08,730 --> 00:07:11,060 to connect other processes that will create 144 00:07:11,060 --> 00:07:14,120 or derive the final output, or perhaps 145 00:07:14,120 --> 00:07:16,350 it's another intermediate step before you get 146 00:07:16,350 --> 00:07:19,980 to that place of deriving the final output. 147 00:07:19,980 --> 00:07:22,800 These data are deleted by default, 148 00:07:22,800 --> 00:07:26,260 but, you can manage that data within the model itself, 149 00:07:26,260 --> 00:07:28,600 specifying both the location, whether 150 00:07:28,600 --> 00:07:30,400 or not it should be deleted, or even 151 00:07:30,400 --> 00:07:32,870 whether you should add that to the final display 152 00:07:32,870 --> 00:07:34,583 once the model has been completed. 153 00:07:35,490 --> 00:07:37,270 And then the last of the three data types 154 00:07:37,270 --> 00:07:38,720 are the output data. 155 00:07:38,720 --> 00:07:41,100 These are the data sets that represent 156 00:07:41,100 --> 00:07:44,163 the derived information from the model run. 157 00:07:48,120 --> 00:07:51,890 Optionally, you can include iterators within your model, 158 00:07:51,890 --> 00:07:55,040 an iterator repeats a process or 159 00:07:55,040 --> 00:07:59,890 a set of processes on an input or a set of inputs. 160 00:07:59,890 --> 00:08:03,670 ArcGIS includes 14 different types of iterators 161 00:08:03,670 --> 00:08:07,970 to help implement geo processing workflows. 162 00:08:07,970 --> 00:08:10,740 Of course, there's the typical four and wild loops 163 00:08:10,740 --> 00:08:13,180 that any of you that have done any programming 164 00:08:13,180 --> 00:08:14,870 would already know about, 165 00:08:14,870 --> 00:08:18,700 but you can also iterate over specific data elements 166 00:08:18,700 --> 00:08:22,840 from features and rows selections to specific file types 167 00:08:22,840 --> 00:08:25,650 or entire workspaces collections 168 00:08:25,650 --> 00:08:28,890 of data stored in a single location. 169 00:08:28,890 --> 00:08:30,730 I recommend that you review the help here 170 00:08:30,730 --> 00:08:33,440 for more information about each iterator type 171 00:08:33,440 --> 00:08:36,100 and to help decide which iterator 172 00:08:36,100 --> 00:08:37,900 might be most appropriate for the model 173 00:08:37,900 --> 00:08:39,250 that you want to construct. 174 00:08:41,380 --> 00:08:43,360 Now, when you create a new model, 175 00:08:43,360 --> 00:08:45,599 you really have three different options. 176 00:08:45,599 --> 00:08:48,560 You can, from the analysis ribbon, 177 00:08:48,560 --> 00:08:52,530 click on model builder, from the catalog pane, 178 00:08:52,530 --> 00:08:55,910 you can right click on a toolbox and specify that you want 179 00:08:55,910 --> 00:08:59,600 to create a new model, or once you're already 180 00:08:59,600 --> 00:09:02,550 in the model builder interface, 181 00:09:02,550 --> 00:09:04,387 you can look on the model builder ribbon 182 00:09:04,387 --> 00:09:06,700 and click the new button to create 183 00:09:06,700 --> 00:09:09,023 a new model in that workspace. 184 00:09:11,230 --> 00:09:13,380 Let's look at a couple example models here. 185 00:09:14,220 --> 00:09:16,260 In our first model, we want to create 186 00:09:16,260 --> 00:09:18,590 a geoprocessing workflow to select features 187 00:09:18,590 --> 00:09:22,000 from a dataset, buffer those selected features, 188 00:09:22,000 --> 00:09:23,660 and then clip those buffered features 189 00:09:23,660 --> 00:09:25,293 to the extent of a watershed. 190 00:09:26,210 --> 00:09:27,330 For our input data, 191 00:09:27,330 --> 00:09:29,310 we've got our recreation sites, 192 00:09:29,310 --> 00:09:31,590 point data representing recreation sites 193 00:09:31,590 --> 00:09:33,870 in Vermont, and the watershed boundary 194 00:09:33,870 --> 00:09:35,393 for the Winooski River Basin. 195 00:09:36,840 --> 00:09:39,702 We'll use a select layer by attribute, buffer, 196 00:09:39,702 --> 00:09:42,360 and clip geoprocessing operations 197 00:09:42,360 --> 00:09:43,523 as part of our model. 198 00:09:45,230 --> 00:09:48,970 Initially, we'll specify a selection expression that says 199 00:09:48,970 --> 00:09:51,220 that we want to select all of the recreation sites 200 00:09:51,220 --> 00:09:54,230 with more than 25 summer parking spaces. 201 00:09:54,230 --> 00:09:58,273 And we'll buffer those with a 750 meter distance. 202 00:10:00,260 --> 00:10:01,330 So here's what it looks like 203 00:10:01,330 --> 00:10:03,560 when you have your blank model, again, 204 00:10:03,560 --> 00:10:06,040 blank slate here up to you, 205 00:10:06,040 --> 00:10:07,770 what you want to do next. 206 00:10:07,770 --> 00:10:10,790 Let's add our select layer by attribute. 207 00:10:10,790 --> 00:10:12,570 And in this case, I've opened 208 00:10:12,570 --> 00:10:15,090 my geoprocessing window and I'm searching 209 00:10:15,090 --> 00:10:18,370 for that tool within that geoprocessing interface, 210 00:10:18,370 --> 00:10:20,383 like we've done so many times before. 211 00:10:21,320 --> 00:10:24,080 From here, simply drag and drop the Select Layer 212 00:10:24,080 --> 00:10:26,900 by Attribute tool into the interface, 213 00:10:26,900 --> 00:10:28,810 and we see that we now have 214 00:10:28,810 --> 00:10:30,690 our first geoprocessing tool added 215 00:10:30,690 --> 00:10:35,090 to the model and that it state is not ready to run. 216 00:10:35,090 --> 00:10:36,313 Let's add a couple more. 217 00:10:38,238 --> 00:10:41,230 From the model builder ribbon, 218 00:10:41,230 --> 00:10:44,550 there's also a tool, search menu. 219 00:10:44,550 --> 00:10:48,420 Click that drop-down, type buffer, or at least begin 220 00:10:48,420 --> 00:10:51,923 to type buffer to identify potential options there. 221 00:10:52,770 --> 00:10:56,280 Then I'll drag that buffer operation into the window, 222 00:10:56,280 --> 00:10:58,420 as well as the clip operation. 223 00:10:58,420 --> 00:11:00,040 Again, those three represent 224 00:11:00,040 --> 00:11:02,340 the geoprocessing options that we want 225 00:11:02,340 --> 00:11:03,653 to pursue with our model. 226 00:11:05,350 --> 00:11:08,303 Next up, we need to add some data. 227 00:11:09,555 --> 00:11:12,950 Once again, you can do this from multiple places, 228 00:11:12,950 --> 00:11:15,910 the contents pane or the catalog pane 229 00:11:15,910 --> 00:11:18,180 are the two most likely options. 230 00:11:18,180 --> 00:11:21,940 Simply drag and drop your data into the model. 231 00:11:21,940 --> 00:11:23,580 And you see now that we've added both 232 00:11:23,580 --> 00:11:25,360 our recreation sites and 233 00:11:25,360 --> 00:11:28,913 our Winooski River Basin boundary to the model. 234 00:11:31,330 --> 00:11:35,090 From here, we need to start establishing connections 235 00:11:35,090 --> 00:11:39,893 to the different tools in the geoprocessing workflow. 236 00:11:41,560 --> 00:11:45,930 Drag an arrow from recreation sites to select layer 237 00:11:45,930 --> 00:11:49,660 by attribute, and then specify what role 238 00:11:49,660 --> 00:11:53,840 that data set will play in the geoprocessing operation. 239 00:11:53,840 --> 00:11:57,223 In this case, our recreation sites represent the input rows. 240 00:11:58,320 --> 00:12:00,960 Once that connection has been established, 241 00:12:00,960 --> 00:12:02,470 we see now that the select layer 242 00:12:02,470 --> 00:12:05,590 by attribute tool is ready to run. 243 00:12:05,590 --> 00:12:07,050 That's not totally accurate. 244 00:12:07,050 --> 00:12:09,660 It's only mostly ready to run since we still need 245 00:12:09,660 --> 00:12:11,123 to specify an expression. 246 00:12:12,500 --> 00:12:15,440 If I double click on select layer by attribute, 247 00:12:15,440 --> 00:12:19,010 we should see an interface that looks relatively familiar. 248 00:12:19,010 --> 00:12:20,730 We've used the select layer 249 00:12:20,730 --> 00:12:23,170 by attribute many times before. 250 00:12:23,170 --> 00:12:25,480 In this case, I specify an expression, 251 00:12:25,480 --> 00:12:27,150 the number of summer parking spots 252 00:12:27,150 --> 00:12:29,973 is greater than 25 and click okay. 253 00:12:33,090 --> 00:12:36,170 Now I know that I've produced a recreation sites 254 00:12:37,040 --> 00:12:41,340 dataset temporary one or intermediate data based 255 00:12:41,340 --> 00:12:44,310 on that expression, selecting all of 256 00:12:44,310 --> 00:12:46,360 the recreation sites where there's more 257 00:12:46,360 --> 00:12:48,293 than 25 summer parking spots. 258 00:12:51,926 --> 00:12:56,926 You can click the auto layout to have ArcGIS organize 259 00:12:57,210 --> 00:12:59,340 the model in the window for you. 260 00:12:59,340 --> 00:13:01,470 It's definitely easier to do it this way than 261 00:13:01,470 --> 00:13:03,970 to try to move all those individual pieces around. 262 00:13:05,460 --> 00:13:07,250 Again, I've taken a few liberties here. 263 00:13:07,250 --> 00:13:09,680 I've specified my buffer distance 264 00:13:09,680 --> 00:13:12,100 and indicated that my Winooski River Basin 265 00:13:12,100 --> 00:13:14,653 will serve as the clip feature for the model. 266 00:13:17,200 --> 00:13:21,500 I can also choose to keep or delete the intermediate data. 267 00:13:21,500 --> 00:13:24,593 Remember, intermediate data is deleted by default. 268 00:13:27,960 --> 00:13:31,023 Once I click run on the model builder ribbon, 269 00:13:32,100 --> 00:13:35,350 I see a window popup that informs me 270 00:13:35,350 --> 00:13:37,320 of the stage of processing. 271 00:13:37,320 --> 00:13:39,350 Here, I can see that I'm on the second 272 00:13:39,350 --> 00:13:41,900 of my three geoprocessing steps 273 00:13:41,900 --> 00:13:43,943 and that that buffer is working. 274 00:13:46,790 --> 00:13:48,580 Once the model is complete, 275 00:13:48,580 --> 00:13:51,670 I can choose to add my output data 276 00:13:51,670 --> 00:13:53,810 to the display, by right clicking on 277 00:13:53,810 --> 00:13:56,778 that green oval that represents the output dataset 278 00:13:56,778 --> 00:13:58,723 and clicking add to display. 279 00:14:01,940 --> 00:14:05,130 I can see the results here on the left-hand side. 280 00:14:05,130 --> 00:14:07,640 I've got all my input data and we can see 281 00:14:07,640 --> 00:14:11,260 all of those different recreation sites 282 00:14:11,260 --> 00:14:14,140 that have more than 25 summer parking spaces, 283 00:14:14,140 --> 00:14:16,190 because they're still selected and rendered 284 00:14:16,190 --> 00:14:19,860 in that cyan pigment. 285 00:14:19,860 --> 00:14:21,170 On the right-hand side, 286 00:14:21,170 --> 00:14:23,100 I've zoomed in on a portion 287 00:14:23,100 --> 00:14:24,610 of the Winooski River Basin, 288 00:14:24,610 --> 00:14:26,430 and we can see not only the buffers 289 00:14:26,430 --> 00:14:28,300 for those recreation sites that meet 290 00:14:28,300 --> 00:14:32,290 that 25 summer parking spots threshold, 291 00:14:32,290 --> 00:14:35,270 but also that those buffered regions along 292 00:14:35,270 --> 00:14:37,870 the edge of the Winooski River Basin 293 00:14:37,870 --> 00:14:39,393 get clipped to its boundary. 294 00:14:41,320 --> 00:14:44,136 Okay, let's take it one step further. 295 00:14:44,136 --> 00:14:48,980 If I right click on my select layer by attributes, 296 00:14:48,980 --> 00:14:50,240 I can specify that I want 297 00:14:50,240 --> 00:14:53,120 to create a variable from a parameter, 298 00:14:53,120 --> 00:14:55,670 and in this case, from that tool parameter, 299 00:14:55,670 --> 00:14:57,550 the expression, remember that was 300 00:14:57,550 --> 00:15:00,223 the number of summer parking spots greater than 25. 301 00:15:01,590 --> 00:15:03,080 Once I do that, we see 302 00:15:03,080 --> 00:15:07,610 an expression added to the interface. 303 00:15:07,610 --> 00:15:10,060 And if I double click that expression, 304 00:15:10,060 --> 00:15:12,290 I can specify whatever I want. 305 00:15:12,290 --> 00:15:15,623 Let's stick with the 25 summer parking spaces for now. 306 00:15:17,170 --> 00:15:20,680 If I right click on that expression variable, 307 00:15:20,680 --> 00:15:23,600 I can choose to set that as a model parameter. 308 00:15:23,600 --> 00:15:27,800 And once I do that, we see a little p up here 309 00:15:27,800 --> 00:15:29,743 next to that particular variable. 310 00:15:31,270 --> 00:15:35,660 When I run my model from within the toolbox, 311 00:15:35,660 --> 00:15:36,500 so in this case, 312 00:15:36,500 --> 00:15:39,860 I'm running demo underscore model one, 313 00:15:39,860 --> 00:15:43,230 we see that a dialog box pops up. 314 00:15:43,230 --> 00:15:48,140 We've only specified a single variable parameter here, 315 00:15:48,140 --> 00:15:49,890 and that was that expression. 316 00:15:49,890 --> 00:15:51,830 But you might imagine that you could have 317 00:15:51,830 --> 00:15:53,380 a lot of different parameters 318 00:15:53,380 --> 00:15:54,903 that need to be specified, 319 00:15:55,970 --> 00:15:58,610 potentially even multiple different expressions. 320 00:15:58,610 --> 00:16:00,260 And if you leave your variable name 321 00:16:00,260 --> 00:16:02,710 as expression, that might prove confusing 322 00:16:02,710 --> 00:16:04,740 for some other user. 323 00:16:04,740 --> 00:16:07,920 Instead, let's rename our expression 324 00:16:09,440 --> 00:16:11,840 to recreation site selector. 325 00:16:11,840 --> 00:16:15,090 And now when I run that model from my toolbox, 326 00:16:15,090 --> 00:16:19,530 I see recreation site selector, and that prompts me 327 00:16:19,530 --> 00:16:24,530 to specify a correct query for whatever attribute 328 00:16:24,970 --> 00:16:27,823 I'm interested in selecting out of the whole dataset. 329 00:16:30,970 --> 00:16:34,640 Okay, let's take a look at one more example here. 330 00:16:34,640 --> 00:16:36,070 In this case, we want to create 331 00:16:36,070 --> 00:16:38,460 a geoprocessing workflow to select a feature 332 00:16:38,460 --> 00:16:42,520 from a dataset and clip the features of another dataset 333 00:16:42,520 --> 00:16:44,603 to the extent of the selected feature. 334 00:16:45,598 --> 00:16:50,598 Our input data for this example includes, invertebrates, 335 00:16:50,804 --> 00:16:54,080 the invertebrate populations in Vermont, 336 00:16:54,080 --> 00:16:57,490 as well as town boundaries for Vermont. 337 00:16:57,490 --> 00:16:59,460 For geoprocessing tools, 338 00:16:59,460 --> 00:17:03,433 once again, use select layer by attribute and clip. 339 00:17:04,440 --> 00:17:08,230 But this time we don't have a selection expression 340 00:17:08,230 --> 00:17:11,410 or a specified output feature class name. 341 00:17:11,410 --> 00:17:14,110 Instead, we want to use an iterator 342 00:17:14,110 --> 00:17:17,540 and inline variable substitution to specify both 343 00:17:17,540 --> 00:17:21,220 the selection expression and the output feature class. 344 00:17:21,220 --> 00:17:25,290 Then we'll use that iterator to provide the town name, 345 00:17:25,290 --> 00:17:26,593 to serve that function. 346 00:17:28,320 --> 00:17:30,880 I've already built the model out here 347 00:17:30,880 --> 00:17:32,780 and you see that I'm using my town boundaries 348 00:17:32,780 --> 00:17:36,046 as the input to the iterate feature selection. 349 00:17:36,046 --> 00:17:40,570 And that from that, I'm using the clip function 350 00:17:40,570 --> 00:17:43,190 to clip my invertebrate populations down 351 00:17:43,190 --> 00:17:45,383 to individual town boundaries. 352 00:17:47,310 --> 00:17:49,200 Note that the iterate feature selection 353 00:17:49,200 --> 00:17:52,070 iterator produces two outputs. 354 00:17:52,070 --> 00:17:56,410 One is the selected feature, the actual town boundary, 355 00:17:56,410 --> 00:17:58,260 and the other is the value, 356 00:17:58,260 --> 00:18:00,370 the name of the town. 357 00:18:00,370 --> 00:18:01,680 It's important to note the difference 358 00:18:01,680 --> 00:18:03,310 between the two, because we'll use 359 00:18:03,310 --> 00:18:05,423 those differently in the model. 360 00:18:09,530 --> 00:18:11,150 One other thing I should specify 361 00:18:11,150 --> 00:18:13,020 here before moving on. 362 00:18:13,020 --> 00:18:15,830 Note my output data set here, 363 00:18:15,830 --> 00:18:19,928 invertebrate communities, percent TownName percent. 364 00:18:19,928 --> 00:18:23,530 That's the inline variable substitution piece 365 00:18:23,530 --> 00:18:28,090 where that TownName, that percent TownName percent value 366 00:18:28,090 --> 00:18:32,330 comes from the TownName output from my iterator. 367 00:18:32,330 --> 00:18:33,970 This way, I know that each one 368 00:18:33,970 --> 00:18:36,543 of my output data sets will have a unique name. 369 00:18:38,708 --> 00:18:42,520 As I'm running the model, I noticed slight issue. 370 00:18:42,520 --> 00:18:44,830 There's an error message here that indicates 371 00:18:44,830 --> 00:18:47,680 that a particular geoprocessing step failed 372 00:18:47,680 --> 00:18:50,423 to execute because the parameters are not valid. 373 00:18:51,640 --> 00:18:53,400 On closer inspection, 374 00:18:53,400 --> 00:18:56,930 I see that that's because the town name includes a space. 375 00:18:56,930 --> 00:19:00,310 In this case for Averys Gore and spaces 376 00:19:00,310 --> 00:19:02,430 are not allowed in a file name. 377 00:19:02,430 --> 00:19:05,500 Now this does not cause the model to stop running. 378 00:19:05,500 --> 00:19:08,450 It simply skips over this town 379 00:19:08,450 --> 00:19:11,043 in the list of processing operations. 380 00:19:12,140 --> 00:19:14,520 If this was something more than a demonstration, 381 00:19:14,520 --> 00:19:16,500 I'd go back in and make adjustments 382 00:19:16,500 --> 00:19:18,320 to my town names to ensure 383 00:19:18,320 --> 00:19:20,223 that my model can run smoothly. 384 00:19:23,170 --> 00:19:24,610 One other thing to note here is 385 00:19:24,610 --> 00:19:27,070 that I also have some warnings 386 00:19:27,070 --> 00:19:29,840 in that pop-up window that I see indicating 387 00:19:29,840 --> 00:19:33,200 that some of my outputs are empty. 388 00:19:33,200 --> 00:19:36,420 This indicates a town that does not include 389 00:19:36,420 --> 00:19:39,810 any of those invertebrate populations, 390 00:19:39,810 --> 00:19:41,260 nothing to worry about here, 391 00:19:41,260 --> 00:19:43,943 we can simply let the model continue to run. 392 00:19:47,710 --> 00:19:51,630 Lastly, if we look over in the output database 393 00:19:51,630 --> 00:19:55,100 where I've chosen to write all of my output data sets, 394 00:19:55,100 --> 00:19:58,840 I can see separate feature classes for each 395 00:19:58,840 --> 00:20:01,080 of the different town boundaries. 396 00:20:01,080 --> 00:20:04,260 Invertebrate clip is the prefix 397 00:20:04,260 --> 00:20:07,000 and the town name is the suffix. 398 00:20:07,000 --> 00:20:09,500 Again, drawn on that information 399 00:20:09,500 --> 00:20:11,580 from the iterator and using 400 00:20:11,580 --> 00:20:14,183 that inline variable substitution approach. 401 00:20:15,100 --> 00:20:17,460 Okay, well, that's enough for slides. 402 00:20:17,460 --> 00:20:19,400 In the next lecture, let's take a look 403 00:20:19,400 --> 00:20:22,830 at a live demonstration of how we might work 404 00:20:22,830 --> 00:20:25,900 with model builder using ArcGIS Pro. 405 00:20:25,900 --> 00:20:27,693 I'll see you in a couple of minutes.