WEBVTT 1 00:00:01.050 --> 00:00:02.580 In lecture two of module two, 2 00:00:02.580 --> 00:00:04.800 we're going to dig into one of the more technical aspects 3 00:00:04.800 --> 00:00:07.770 of geoprocessing to help develop a better understanding 4 00:00:07.770 --> 00:00:10.620 of what's really going on behind the scenes in ArcGIS 5 00:00:10.620 --> 00:00:13.443 when we click run in a geoprocessing dialogue box. 6 00:00:14.880 --> 00:00:18.360 As I was perusing geoprocessing tool reference pages, 7 00:00:18.360 --> 00:00:20.880 you know, like you do in your free time, 8 00:00:20.880 --> 00:00:23.850 I stumbled across something interesting. 9 00:00:23.850 --> 00:00:26.790 This is for the help for the Intersect tool. 10 00:00:26.790 --> 00:00:29.040 For inputs with different geometry types, 11 00:00:29.040 --> 00:00:32.190 for example, line on poly, we're talking about a tool 12 00:00:32.190 --> 00:00:34.560 that takes two or more vector datasets 13 00:00:34.560 --> 00:00:36.390 as their input features. 14 00:00:36.390 --> 00:00:38.700 The output feature class geometry will default 15 00:00:38.700 --> 00:00:41.100 to the same as the input features geometry type 16 00:00:41.100 --> 00:00:42.963 with the lowest dimension geometry. 17 00:00:44.370 --> 00:00:48.933 Again, this comes from a help file, to which I say, huh? 18 00:00:50.070 --> 00:00:52.530 Look at the graphic on the right hand side 19 00:00:52.530 --> 00:00:55.260 to see if we can't introduce some clarity here. 20 00:00:55.260 --> 00:00:57.240 As you move from left to right on the graph, 21 00:00:57.240 --> 00:00:59.760 from points to lines to polygons, 22 00:00:59.760 --> 00:01:02.070 the number of dimensions increases. 23 00:01:02.070 --> 00:01:05.010 So if you're in a situation where you're intersecting 24 00:01:05.010 --> 00:01:08.010 a point feature class and a line feature class, 25 00:01:08.010 --> 00:01:10.260 the output features will be points. 26 00:01:10.260 --> 00:01:13.740 Lines and polygons, the output features will be lines. 27 00:01:13.740 --> 00:01:15.270 This is what's meant by defaulting 28 00:01:15.270 --> 00:01:17.133 to the lowest dimension geometry. 29 00:01:18.840 --> 00:01:21.000 Now that we've got that cleared up, let's move on 30 00:01:21.000 --> 00:01:23.940 to explore environment settings and how they do 31 00:01:23.940 --> 00:01:26.973 or don't affect various geoprocessing operations. 32 00:01:27.840 --> 00:01:29.910 First, let's establish some common ground 33 00:01:29.910 --> 00:01:32.910 regarding what environment settings are, what they do, 34 00:01:32.910 --> 00:01:35.220 and where to find and define them. 35 00:01:35.220 --> 00:01:38.010 Then we'll look at specific geoprocessing tools 36 00:01:38.010 --> 00:01:40.620 and evaluate whether various Environment settings 37 00:01:40.620 --> 00:01:43.683 affect the values or spatial extent of the output data. 38 00:01:44.730 --> 00:01:46.620 Environment settings are additional parameters 39 00:01:46.620 --> 00:01:49.440 that affect a tool performance and results. 40 00:01:49.440 --> 00:01:52.170 They don't appear in a tool's primary dialogue box. 41 00:01:52.170 --> 00:01:56.370 Rather, you access them from the environment's dialogue box. 42 00:01:56.370 --> 00:01:58.350 These are parameters that you set once, 43 00:01:58.350 --> 00:02:01.350 although you can change them as often as you'd like. 44 00:02:01.350 --> 00:02:04.890 Unlike tool parameters you set each time you geoprocess, 45 00:02:04.890 --> 00:02:07.080 environment settings cascade through the project 46 00:02:07.080 --> 00:02:09.960 to influence subsequent geoprocessing operations, 47 00:02:09.960 --> 00:02:11.820 assuming the geoprocessing tool honors 48 00:02:11.820 --> 00:02:13.830 the environment setting. 49 00:02:13.830 --> 00:02:16.620 The software evaluates environment settings for inclusion 50 00:02:16.620 --> 00:02:19.320 in a particular geoprocessing rule at run-time. 51 00:02:19.320 --> 00:02:22.743 That is when you click run from a tool dialogue box. 52 00:02:24.120 --> 00:02:27.030 Now it's important to note that not all geoprocessing tools 53 00:02:27.030 --> 00:02:29.280 respect every environment setting. 54 00:02:29.280 --> 00:02:31.590 If you derive an unexpected result, 55 00:02:31.590 --> 00:02:34.230 the environment setting dialogue is one place to check 56 00:02:34.230 --> 00:02:36.963 among many to help troubleshoot your situation. 57 00:02:37.920 --> 00:02:41.100 We'll look at some examples of this in a few slides. 58 00:02:41.100 --> 00:02:43.110 I'll also mention that some environment settings 59 00:02:43.110 --> 00:02:45.780 are vector or raster specific. 60 00:02:45.780 --> 00:02:48.270 So a raster environment setting is not going to affect 61 00:02:48.270 --> 00:02:51.513 a vector geoprocessing operation and vice versa. 62 00:02:54.300 --> 00:02:55.800 Geoprocessing tools will observe 63 00:02:55.800 --> 00:02:58.020 default environmental settings. 64 00:02:58.020 --> 00:02:59.670 Even if you haven't set any, 65 00:02:59.670 --> 00:03:02.520 that doesn't mean some don't exist by default. 66 00:03:02.520 --> 00:03:05.610 One example of this is the current workspace setting. 67 00:03:05.610 --> 00:03:08.640 Although you've never set this, at least not in this class, 68 00:03:08.640 --> 00:03:11.580 you've already benefited from having one in lab one. 69 00:03:11.580 --> 00:03:13.110 This environment setting is established 70 00:03:13.110 --> 00:03:16.830 automatically by ArcGIS when a new project is created. 71 00:03:16.830 --> 00:03:19.110 It points to the project geo database 72 00:03:19.110 --> 00:03:21.843 also created at the same time as the new project. 73 00:03:23.070 --> 00:03:25.260 When you click run on a tool dialogue box, 74 00:03:25.260 --> 00:03:27.630 ArcGIS looks for environment settings, 75 00:03:27.630 --> 00:03:29.280 applies them if any are found, 76 00:03:29.280 --> 00:03:32.430 or more specifically found to be relevant, 77 00:03:32.430 --> 00:03:34.683 and then runs the geoprocessing operation. 78 00:03:35.550 --> 00:03:37.260 As noted in the previous lecture, 79 00:03:37.260 --> 00:03:40.650 there's an environment section in every tool reference page. 80 00:03:40.650 --> 00:03:42.840 Here, you can learn which environments are honored 81 00:03:42.840 --> 00:03:45.510 by a particular geoprocessing tool. 82 00:03:45.510 --> 00:03:46.950 You can also easily link to 83 00:03:46.950 --> 00:03:48.540 the environment settings reference page 84 00:03:48.540 --> 00:03:51.180 from this part of the tool reference. 85 00:03:51.180 --> 00:03:54.120 Some geoprocessing tools assume default parameter values 86 00:03:54.120 --> 00:03:56.373 based on the existing environmental settings. 87 00:03:57.360 --> 00:03:59.730 Remember, you can always change these 88 00:03:59.730 --> 00:04:02.100 either in the environment settings dialogue box 89 00:04:02.100 --> 00:04:04.383 or on the tool specific environments tab. 90 00:04:06.810 --> 00:04:09.030 One other thing to mention about environment settings 91 00:04:09.030 --> 00:04:11.340 is their hierarchical structure. 92 00:04:11.340 --> 00:04:14.040 There are four levels to this hierarchy. 93 00:04:14.040 --> 00:04:16.713 The application level, this is the default. 94 00:04:17.670 --> 00:04:19.320 In the absence of other information, 95 00:04:19.320 --> 00:04:22.320 ArcGIS will look for application level environment settings 96 00:04:22.320 --> 00:04:24.110 and apply that to a geoprocessing tool 97 00:04:24.110 --> 00:04:25.773 at the time of execution. 98 00:04:26.670 --> 00:04:28.770 Tool level environment settings only apply 99 00:04:28.770 --> 00:04:30.600 to that single tool run. 100 00:04:30.600 --> 00:04:34.290 It overrides the application level setting of the same name. 101 00:04:34.290 --> 00:04:36.450 You might have an application level setting 102 00:04:36.450 --> 00:04:38.410 established to limit the spatial extent 103 00:04:39.660 --> 00:04:42.180 of your output to the area of interest. 104 00:04:42.180 --> 00:04:45.270 However, maybe you want to run a tool to produce output 105 00:04:45.270 --> 00:04:47.760 that extends beyond your area of interest, 106 00:04:47.760 --> 00:04:50.250 alter the extent setting at the tool level, 107 00:04:50.250 --> 00:04:52.470 produce your result, and carry on as you did 108 00:04:52.470 --> 00:04:55.110 prior to altering the tool level setting. 109 00:04:55.110 --> 00:04:56.670 We'll talk about model level 110 00:04:56.670 --> 00:04:59.880 and model process level settings later in the course. 111 00:04:59.880 --> 00:05:02.310 For now, it's enough to know they exist 112 00:05:02.310 --> 00:05:03.450 and that they behave differently 113 00:05:03.450 --> 00:05:05.250 than the two levels we've discussed. 114 00:05:06.300 --> 00:05:08.580 Last thing here, each of the four levels 115 00:05:08.580 --> 00:05:10.920 have the same list of environment settings 116 00:05:10.920 --> 00:05:13.440 and the settings function the same way. 117 00:05:13.440 --> 00:05:14.760 If you set the extent parameter 118 00:05:14.760 --> 00:05:17.220 to the same feature class in the application level 119 00:05:17.220 --> 00:05:20.490 and then the tool level, you'll produce the same output. 120 00:05:20.490 --> 00:05:22.860 The difference is both in how you access 121 00:05:22.860 --> 00:05:24.903 and how you set the parameters. 122 00:05:28.440 --> 00:05:31.710 I present several environment settings categories here. 123 00:05:31.710 --> 00:05:33.960 Note this is not an exhaustive list. 124 00:05:33.960 --> 00:05:36.843 Rather, I list those that I make use of most frequently. 125 00:05:37.980 --> 00:05:40.710 Workspace settings direct file storage traffic 126 00:05:40.710 --> 00:05:42.900 where the files are written on disk. 127 00:05:42.900 --> 00:05:45.050 The processing extent limits the spatial extent 128 00:05:45.050 --> 00:05:47.790 of the analysis and output. 129 00:05:47.790 --> 00:05:50.520 Raster analysis, as its name implies, 130 00:05:50.520 --> 00:05:53.253 influences raster geoprocessing operations. 131 00:05:54.480 --> 00:05:57.690 How do you access the environment settings dialogue box? 132 00:05:57.690 --> 00:05:59.493 From the Analysis ribbon, of course. 133 00:06:00.330 --> 00:06:01.950 The Environment button is on the left side 134 00:06:01.950 --> 00:06:03.480 of the Analysis ribbon. 135 00:06:03.480 --> 00:06:07.020 Click it to open the environment settings dialogue box. 136 00:06:07.020 --> 00:06:09.570 The top half is in the image on the left 137 00:06:09.570 --> 00:06:12.930 and the bottom half of the dialogue box is on the right. 138 00:06:12.930 --> 00:06:14.910 I've also minimized several of the categories 139 00:06:14.910 --> 00:06:16.590 to hide some details. 140 00:06:16.590 --> 00:06:18.330 You can expand or contract the section 141 00:06:18.330 --> 00:06:21.080 by clicking the arrow to the left of the category name. 142 00:06:23.640 --> 00:06:25.020 I thought it would be useful to look at 143 00:06:25.020 --> 00:06:27.030 a few environment settings in the context of 144 00:06:27.030 --> 00:06:30.450 specific geoprocessing tools to learn how they do 145 00:06:30.450 --> 00:06:32.823 and do not affect those operations. 146 00:06:33.720 --> 00:06:36.660 On the left is the environment settings dialogue box. 147 00:06:36.660 --> 00:06:38.250 These are all default values, 148 00:06:38.250 --> 00:06:41.580 including those for the current and scratch workspaces. 149 00:06:41.580 --> 00:06:44.580 By default, ArcGIS assigns current workspace 150 00:06:44.580 --> 00:06:47.910 and the scratch workspace to the project geo database, 151 00:06:47.910 --> 00:06:50.250 which is created with the new project. 152 00:06:50.250 --> 00:06:52.620 You can change either or both of those settings 153 00:06:52.620 --> 00:06:54.450 and that would redirect the traffic. 154 00:06:54.450 --> 00:06:56.940 Your output from a geoprocessing operation 155 00:06:56.940 --> 00:06:58.790 to a different database or directory. 156 00:06:59.880 --> 00:07:01.320 On the right side of the slide, 157 00:07:01.320 --> 00:07:04.440 we see the Copy Features geoprocessing tool. 158 00:07:04.440 --> 00:07:07.380 Let's experiment with copying a feature class, 159 00:07:07.380 --> 00:07:10.470 a pretty basic operation all things considered. 160 00:07:10.470 --> 00:07:13.653 This is the tool dialogue box before any parameters are set. 161 00:07:15.570 --> 00:07:17.490 If I click the Environments tab, 162 00:07:17.490 --> 00:07:19.470 we can see a lot of the same categories that appear 163 00:07:19.470 --> 00:07:23.040 in the environment settings dialogue box in the left image. 164 00:07:23.040 --> 00:07:24.300 The image on the right displays 165 00:07:24.300 --> 00:07:25.860 the tool level environment settings 166 00:07:25.860 --> 00:07:28.023 for the Copy Features geoprocessing tool. 167 00:07:28.920 --> 00:07:31.380 Note that not all of the available settings on the left 168 00:07:31.380 --> 00:07:33.840 are included on the tool level settings. 169 00:07:33.840 --> 00:07:35.040 This implies that these settings 170 00:07:35.040 --> 00:07:36.543 are not honored by the tool. 171 00:07:38.820 --> 00:07:40.470 I'm going to set my extent 172 00:07:40.470 --> 00:07:43.020 to a feature class named Waitsfield. 173 00:07:43.020 --> 00:07:44.220 Note that you do not have to use 174 00:07:44.220 --> 00:07:46.260 a polygon feature class for this setting. 175 00:07:46.260 --> 00:07:49.200 A bounding box can and is drawn around 176 00:07:49.200 --> 00:07:50.883 every type of vector geometry. 177 00:07:52.410 --> 00:07:54.390 Once I select my extent parameter, 178 00:07:54.390 --> 00:07:57.630 the boxes below are populated with numeric values. 179 00:07:57.630 --> 00:08:00.090 When I open the Copy Features geoprocessing tool 180 00:08:00.090 --> 00:08:01.980 and examine the Environments tab, 181 00:08:01.980 --> 00:08:04.230 the tool level environment settings, 182 00:08:04.230 --> 00:08:05.670 I note that the same set of numbers 183 00:08:05.670 --> 00:08:07.500 from the environment settings dialogue box 184 00:08:07.500 --> 00:08:09.630 on the left appear. 185 00:08:09.630 --> 00:08:11.880 We see the application level settings on the left 186 00:08:11.880 --> 00:08:13.930 and the tool level settings on the right. 187 00:08:14.880 --> 00:08:17.610 Now where do you suppose those numbers come from? 188 00:08:17.610 --> 00:08:18.930 If we open the layer properties 189 00:08:18.930 --> 00:08:20.550 for the Waitsfield feature class, 190 00:08:20.550 --> 00:08:23.790 and access the extent section of the Source tab, 191 00:08:23.790 --> 00:08:26.220 I see that same collection of numbers. 192 00:08:26.220 --> 00:08:29.610 Top, bottom, left, and right. 193 00:08:29.610 --> 00:08:31.080 Four unique numbers from which 194 00:08:31.080 --> 00:08:32.880 we can generate four coordinate pairs 195 00:08:32.880 --> 00:08:36.000 to define the minimum bounding box of the feature class. 196 00:08:36.000 --> 00:08:38.610 The minimum bounding box is the smallest rectangle 197 00:08:38.610 --> 00:08:40.200 I can draw around a feature class 198 00:08:40.200 --> 00:08:42.063 that includes all of its features. 199 00:08:43.770 --> 00:08:47.070 I've set the required parameters of the Copy Features tool. 200 00:08:47.070 --> 00:08:50.010 I want to make a copy of a point feature class. 201 00:08:50.010 --> 00:08:51.390 I ran this operation twice, 202 00:08:51.390 --> 00:08:53.760 once with the default environmental settings 203 00:08:53.760 --> 00:08:55.260 and once with the extent set to 204 00:08:55.260 --> 00:08:57.360 the Waitsfield feature class. 205 00:08:57.360 --> 00:08:58.660 Let's look at the results. 206 00:09:00.720 --> 00:09:03.210 If I look at the input data over on the left, 207 00:09:03.210 --> 00:09:06.630 there's a black polygon, the Waitsfield feature class, 208 00:09:06.630 --> 00:09:08.340 and a collection of points. 209 00:09:08.340 --> 00:09:09.810 These are actually points of interest 210 00:09:09.810 --> 00:09:12.330 in and around the matter of valley. 211 00:09:12.330 --> 00:09:13.620 On the right we see the output 212 00:09:13.620 --> 00:09:15.870 with the default settings in place. 213 00:09:15.870 --> 00:09:18.220 Doesn't look any different than the input data. 214 00:09:19.800 --> 00:09:21.000 But if we look at the output with 215 00:09:21.000 --> 00:09:23.370 the extent set to the Waitsfield feature class, 216 00:09:23.370 --> 00:09:25.830 we see something altogether different. 217 00:09:25.830 --> 00:09:27.780 There are a lot fewer points, 218 00:09:27.780 --> 00:09:29.340 but for some reason there are still points 219 00:09:29.340 --> 00:09:31.593 outside the Waitsfield boundary. 220 00:09:32.880 --> 00:09:34.290 Remember, the extent was set to 221 00:09:34.290 --> 00:09:35.910 the Waitsfield feature class, 222 00:09:35.910 --> 00:09:37.590 which really means the bounding box 223 00:09:37.590 --> 00:09:39.720 of the Waitsfield feature class. 224 00:09:39.720 --> 00:09:42.360 The yellow box represents that bounding box 225 00:09:42.360 --> 00:09:45.160 drawn from those coordinates we saw in an earlier slide. 226 00:09:46.050 --> 00:09:48.930 Let's take a look at another copy feature example. 227 00:09:48.930 --> 00:09:51.330 In this case, let's copy a line feature class 228 00:09:51.330 --> 00:09:53.970 representing winter recreation trails. 229 00:09:53.970 --> 00:09:55.920 Based on what we saw in the last example, 230 00:09:55.920 --> 00:09:57.660 I'd say the output looks a little bit different 231 00:09:57.660 --> 00:09:59.310 than what was expected. 232 00:09:59.310 --> 00:10:01.160 What do you suppose is going on here? 233 00:10:02.010 --> 00:10:04.620 Here's the bounding box of the Waitsfield feature class, 234 00:10:04.620 --> 00:10:05.943 the extent environment. 235 00:10:07.320 --> 00:10:10.170 And here's the extent of the output data. 236 00:10:10.170 --> 00:10:12.915 We already observed with the copy point features 237 00:10:12.915 --> 00:10:15.510 that the tool does not function like the Clip tool. 238 00:10:15.510 --> 00:10:17.880 Rather, ArcGIS makes a copy of the features 239 00:10:17.880 --> 00:10:20.340 that pass through the bounding box. 240 00:10:20.340 --> 00:10:21.840 Remember with select by location 241 00:10:21.840 --> 00:10:23.970 that you select a feature regardless of how much 242 00:10:23.970 --> 00:10:27.030 is in or outside the polygon boundary. 243 00:10:27.030 --> 00:10:28.920 This is the same sort of deal. 244 00:10:28.920 --> 00:10:30.990 Any of those line features you see outside 245 00:10:30.990 --> 00:10:33.600 of the extent have some portion of their feature 246 00:10:33.600 --> 00:10:36.030 inside the bounding box. 247 00:10:36.030 --> 00:10:38.700 Any line features completely outside the bounding box 248 00:10:38.700 --> 00:10:40.653 are excluded from the output dataset. 249 00:10:42.660 --> 00:10:44.400 One more digression. 250 00:10:44.400 --> 00:10:47.100 If you think it's frustrating to read unhelpful help, 251 00:10:47.100 --> 00:10:50.100 imagine the difficulties this presents with teaching. 252 00:10:50.100 --> 00:10:52.770 From the tool reference, the tool you are using 253 00:10:52.770 --> 00:10:54.960 will determine the processing extent. 254 00:10:54.960 --> 00:10:56.430 All tools have a default extent 255 00:10:56.430 --> 00:10:58.800 they calculate from their inputs. 256 00:10:58.800 --> 00:11:00.360 This default is rarely documented 257 00:11:00.360 --> 00:11:03.660 on the tool reference page, but it's usually obvious. 258 00:11:03.660 --> 00:11:07.170 Okay, but what if it's not obvious? 259 00:11:07.170 --> 00:11:10.230 And as a further aside, obvious to who? 260 00:11:10.230 --> 00:11:13.290 The person that created the tool in question? 261 00:11:13.290 --> 00:11:16.230 My advice here is to look for external sources of help, 262 00:11:16.230 --> 00:11:19.020 external to the Esri tool reference. 263 00:11:19.020 --> 00:11:22.290 One good resource is the GIS Stack Exchange site. 264 00:11:22.290 --> 00:11:24.180 I can't promise you'll find answers here, 265 00:11:24.180 --> 00:11:25.860 but there are lots of good resources 266 00:11:25.860 --> 00:11:27.573 that may get you back on track. 267 00:11:29.370 --> 00:11:32.790 Speaking of which, let's get back to the topic at hand. 268 00:11:32.790 --> 00:11:35.490 In this case, we're using the same processing extent setting 269 00:11:35.490 --> 00:11:38.310 as before, the Waitsfield feature class. 270 00:11:38.310 --> 00:11:40.920 This time, I'm going to copy a raster dataset 271 00:11:40.920 --> 00:11:42.363 instead of a vector dataset. 272 00:11:43.230 --> 00:11:46.080 We worked with the crop scape data in the introductory class 273 00:11:46.080 --> 00:11:48.380 and we'll use that as our raster dataset here. 274 00:11:49.440 --> 00:11:52.320 We see the tool fully parameterized here, 275 00:11:52.320 --> 00:11:54.360 and if we switch to the Environments tab, 276 00:11:54.360 --> 00:11:56.220 we see that the processing extent setting 277 00:11:56.220 --> 00:11:58.773 has been adopted by the Copy Raster tool. 278 00:12:00.690 --> 00:12:02.640 On the left is the input raster 279 00:12:02.640 --> 00:12:04.950 and on the right is the output raster. 280 00:12:04.950 --> 00:12:07.950 Maybe not exactly what we are expecting here. 281 00:12:07.950 --> 00:12:10.680 The spatial extent has been reduced from the input raster, 282 00:12:10.680 --> 00:12:14.070 but it still seems to extend beyond what I was expecting. 283 00:12:14.070 --> 00:12:17.003 Let's dig in a little further to see what we can determine. 284 00:12:18.660 --> 00:12:21.270 I'm comparing the output of the copy raster operation 285 00:12:21.270 --> 00:12:24.330 to another raster dataset I'm using in my project. 286 00:12:24.330 --> 00:12:26.040 The blue data you see is from a DEM 287 00:12:26.040 --> 00:12:29.490 that uses the Vermont State plan coordinate system, 288 00:12:29.490 --> 00:12:32.040 same as my Waitsfield feature class. 289 00:12:32.040 --> 00:12:36.180 The crop scape data uses the same symbology as before. 290 00:12:36.180 --> 00:12:39.600 I'm using the Swipe tool to compare the two datasets. 291 00:12:39.600 --> 00:12:41.910 Based on what I see, the two datasets are using 292 00:12:41.910 --> 00:12:43.860 different coordinate systems. 293 00:12:43.860 --> 00:12:45.360 You could confirm this information 294 00:12:45.360 --> 00:12:48.600 from the layer properties for the different rasters. 295 00:12:48.600 --> 00:12:51.180 I also see that the cells are not aligned. 296 00:12:51.180 --> 00:12:53.160 The crop scape data seems to be rotated 297 00:12:53.160 --> 00:12:55.260 in relation to the DEM. 298 00:12:55.260 --> 00:12:57.180 This could and probably would affect 299 00:12:57.180 --> 00:12:59.670 any analysis that you need to do. 300 00:12:59.670 --> 00:13:00.840 Remember that one of the benefits 301 00:13:00.840 --> 00:13:03.210 of raster analysis over vector analysis 302 00:13:03.210 --> 00:13:05.550 is the one-to-one correspondence between the cells 303 00:13:05.550 --> 00:13:07.890 of two different raster datasets. 304 00:13:07.890 --> 00:13:10.650 With rotated cells that only partially overlap, 305 00:13:10.650 --> 00:13:13.350 you're bound to introduce confusion into your results. 306 00:13:14.220 --> 00:13:17.490 ArcGIS will of course project the data on the fly, 307 00:13:17.490 --> 00:13:19.680 but that means you're seeding control of some decisions 308 00:13:19.680 --> 00:13:22.380 that are potentially better made by you. 309 00:13:22.380 --> 00:13:24.660 Hence the need to harmonize the data. 310 00:13:24.660 --> 00:13:27.663 Standardize it to eliminate some of the automated guesswork. 311 00:13:28.620 --> 00:13:30.090 We might also consider looking into 312 00:13:30.090 --> 00:13:32.580 raster specific environments to see 313 00:13:32.580 --> 00:13:34.830 if there's anything to learn there. 314 00:13:34.830 --> 00:13:35.913 Let's do that now. 315 00:13:37.440 --> 00:13:38.850 We're also going to switch tools here 316 00:13:38.850 --> 00:13:41.880 to see if we can't get closer to the result that we want. 317 00:13:41.880 --> 00:13:45.150 The crop scape data limited to the Waitsfield feature class 318 00:13:45.150 --> 00:13:46.773 that directly overlaps my DEM. 319 00:13:48.300 --> 00:13:50.370 Let's look at the cell alignment setting. 320 00:13:50.370 --> 00:13:52.380 This sounds promising. 321 00:13:52.380 --> 00:13:55.620 We'll align ourselves with the processing extent. 322 00:13:55.620 --> 00:13:57.750 On the right, you can see that I've already parameterized 323 00:13:57.750 --> 00:13:59.133 the Project Raster tool. 324 00:14:02.310 --> 00:14:03.660 And if we look in the environment setting, 325 00:14:03.660 --> 00:14:05.430 so the Project Raster tool, 326 00:14:05.430 --> 00:14:08.520 we actually don't see a cell alignment category. 327 00:14:08.520 --> 00:14:10.710 This means the Project Raster tool does not honor 328 00:14:10.710 --> 00:14:13.020 that particular environment setting. 329 00:14:13.020 --> 00:14:16.170 Let's run the tool anyways and check the output. 330 00:14:16.170 --> 00:14:18.090 We know we want the data in the same coordinate system 331 00:14:18.090 --> 00:14:19.470 of the rest of the project data, 332 00:14:19.470 --> 00:14:22.050 so we need to do this regardless. 333 00:14:22.050 --> 00:14:24.420 The crop scape data is shown on the right side of the image 334 00:14:24.420 --> 00:14:26.580 and the DEM on the left. 335 00:14:26.580 --> 00:14:27.990 Looks like we're making some progress. 336 00:14:27.990 --> 00:14:29.730 We see that the cells are oriented 337 00:14:29.730 --> 00:14:31.413 in the same direction at least, 338 00:14:32.340 --> 00:14:34.290 but they still do not directly overlap. 339 00:14:35.280 --> 00:14:36.870 One other detail to mention here is that 340 00:14:36.870 --> 00:14:39.960 both datasets use a 30-meter cell size. 341 00:14:39.960 --> 00:14:42.120 Time to dig deeper still. 342 00:14:42.120 --> 00:14:43.320 What other environment settings 343 00:14:43.320 --> 00:14:45.453 might influence our raster analysis? 344 00:14:46.980 --> 00:14:48.363 How about the snap raster? 345 00:14:49.260 --> 00:14:53.910 ArcGIS uses the snap raster to snap or fix cell position. 346 00:14:53.910 --> 00:14:55.710 The bottom left cell of the snap raster 347 00:14:55.710 --> 00:14:58.440 is used to generate this positional alignment. 348 00:14:58.440 --> 00:15:00.120 Your input data can extend beyond 349 00:15:00.120 --> 00:15:02.603 the spatial limit of the snap raster. 350 00:15:02.603 --> 00:15:05.160 In that case, ArcGIS still uses the snap raster 351 00:15:05.160 --> 00:15:07.080 in the same way, only it aligns 352 00:15:07.080 --> 00:15:09.000 to another cell in your input raster, 353 00:15:09.000 --> 00:15:11.403 not the lower left corner of the input dataset. 354 00:15:13.560 --> 00:15:16.290 Looking at my project raster environments on the right side, 355 00:15:16.290 --> 00:15:17.910 I see that the snap raster is one of 356 00:15:17.910 --> 00:15:20.160 the environment settings honored by the tool. 357 00:15:21.750 --> 00:15:24.360 Difficult to display the cells in alignment, so instead, 358 00:15:24.360 --> 00:15:26.310 I've used the swipe tool in the vertical 359 00:15:26.310 --> 00:15:28.140 and horizontal directions to give you 360 00:15:28.140 --> 00:15:30.240 a sense of the overlap. 361 00:15:30.240 --> 00:15:33.090 Looks like I'm cutting cells from both datasets in half 362 00:15:33.090 --> 00:15:35.440 and I'm satisfied that my alignment is correct. 363 00:15:37.950 --> 00:15:40.020 If we compare the output crop scape data 364 00:15:40.020 --> 00:15:42.060 to the input crop scape data, 365 00:15:42.060 --> 00:15:45.360 we see the difference in rotation there too. 366 00:15:45.360 --> 00:15:46.890 Things are looking pretty good 367 00:15:46.890 --> 00:15:48.483 in terms of data harmonization. 368 00:15:49.800 --> 00:15:51.630 What have we accomplished so far? 369 00:15:51.630 --> 00:15:54.030 We've projected our data and used the extent setting 370 00:15:54.030 --> 00:15:54.870 to limit the data to 371 00:15:54.870 --> 00:15:57.480 the Waitsfield feature class bounding box. 372 00:15:57.480 --> 00:16:01.410 We set the snap raster so the cells are completely aligned. 373 00:16:01.410 --> 00:16:03.540 Almost there, but we've still got the issue of 374 00:16:03.540 --> 00:16:05.280 the crop scape data extending beyond 375 00:16:05.280 --> 00:16:06.730 the Waitsfield town boundary. 376 00:16:08.220 --> 00:16:10.980 Maybe the mask setting will do the trick. 377 00:16:10.980 --> 00:16:12.000 Even though the mask setting 378 00:16:12.000 --> 00:16:13.980 is in the raster analysis category, 379 00:16:13.980 --> 00:16:15.750 you can still use a vector feature class 380 00:16:15.750 --> 00:16:17.760 as the parameter setting. 381 00:16:17.760 --> 00:16:19.140 Choose the Waitsfield feature class 382 00:16:19.140 --> 00:16:22.410 to constrain the dataset to the Waitsfield bounding box. 383 00:16:22.410 --> 00:16:23.790 Do you think this is going to work based on 384 00:16:23.790 --> 00:16:26.880 what you learn in the vector copy feature examples? 385 00:16:26.880 --> 00:16:29.190 I'm a bit skeptical myself. 386 00:16:29.190 --> 00:16:31.980 Once again, we'll use the project raster tool. 387 00:16:31.980 --> 00:16:34.710 Here's a quick look at the environments 388 00:16:34.710 --> 00:16:36.360 and here are the tool parameters. 389 00:16:38.010 --> 00:16:38.843 Let's run it. 390 00:16:40.950 --> 00:16:43.533 Looks better, but why can't I get this right? 391 00:16:44.760 --> 00:16:46.620 The combination of the snap raster, 392 00:16:46.620 --> 00:16:49.560 an extent environment settings that both played their part, 393 00:16:49.560 --> 00:16:52.530 both of those are honored by the project raster tool. 394 00:16:52.530 --> 00:16:53.913 We're getting so close. 395 00:16:55.650 --> 00:16:56.483 Bear with me here. 396 00:16:56.483 --> 00:16:59.760 I've had one of those crazy geoprocessing visions again. 397 00:16:59.760 --> 00:17:02.070 Maybe I can just use a raster calculator query 398 00:17:02.070 --> 00:17:03.570 to do the job. 399 00:17:03.570 --> 00:17:05.880 I'll just query the crop scape data to look for cells 400 00:17:05.880 --> 00:17:07.443 with a value greater than zero. 401 00:17:08.490 --> 00:17:09.990 Good news, bad news. 402 00:17:09.990 --> 00:17:12.510 My result is constrained to the Waitsfield boundary, 403 00:17:12.510 --> 00:17:16.080 but all the cells have the same value, one. 404 00:17:16.080 --> 00:17:16.950 Why? 405 00:17:16.950 --> 00:17:19.170 Well, I queried the data and all the cells 406 00:17:19.170 --> 00:17:21.690 that evaluated as true were assigned a value of one 407 00:17:21.690 --> 00:17:23.430 and all the cells evaluated as false 408 00:17:23.430 --> 00:17:24.933 were assigned a value of zero. 409 00:17:27.780 --> 00:17:29.970 If I look at the environment section of the tool reference, 410 00:17:29.970 --> 00:17:32.490 I see that the mask setting is honored. 411 00:17:32.490 --> 00:17:34.890 If I read a little deeper, I learned that any cells 412 00:17:34.890 --> 00:17:37.620 outside the mask, the Waitsfield boundary, 413 00:17:37.620 --> 00:17:39.750 are assigned a value of no data. 414 00:17:39.750 --> 00:17:41.800 That's why the output looked like it did. 415 00:17:42.780 --> 00:17:45.630 So where do we go from here? 416 00:17:45.630 --> 00:17:47.430 We're most of the way to our goal 417 00:17:47.430 --> 00:17:50.670 and have a bunch of partial fixes and erroneous pieces. 418 00:17:50.670 --> 00:17:52.980 Time to consult some GIS tea leaves, 419 00:17:52.980 --> 00:17:56.100 or if that's not your thing, some tool reference pages. 420 00:17:56.100 --> 00:17:58.320 Guaranteed good times. 421 00:17:58.320 --> 00:18:00.780 After a cursory review and a couple of naps, 422 00:18:00.780 --> 00:18:03.180 I've come up with three possible options. 423 00:18:03.180 --> 00:18:06.930 Another raster calculator operation, extract by mask, 424 00:18:06.930 --> 00:18:08.940 and extract by attributes. 425 00:18:08.940 --> 00:18:12.240 Sounds promising except for maybe that first one. 426 00:18:12.240 --> 00:18:13.713 Fool me once and so forth. 427 00:18:15.690 --> 00:18:16.980 I reviewed the help and observed 428 00:18:16.980 --> 00:18:19.800 that raster calculator honors the mass setting. 429 00:18:19.800 --> 00:18:22.110 I'm going to multiply a projected version 430 00:18:22.110 --> 00:18:24.150 of the crop scape data by the output 431 00:18:24.150 --> 00:18:27.420 of the raster calculator query to see what happens. 432 00:18:27.420 --> 00:18:29.820 Again, I'm trying to produce a crop scape dataset 433 00:18:29.820 --> 00:18:32.040 of just the town of Waitsfield. 434 00:18:32.040 --> 00:18:34.290 We'll look at that result in a couple slides. 435 00:18:36.600 --> 00:18:38.670 Seems logical that the Extract by Mask tool 436 00:18:38.670 --> 00:18:40.950 would honor the mask environment setting. 437 00:18:40.950 --> 00:18:43.410 Also seems like it might not need the mass setting at all 438 00:18:43.410 --> 00:18:46.950 since you actually specify the mask in the tool parameters. 439 00:18:46.950 --> 00:18:48.900 This is essentially the raster equivalent 440 00:18:48.900 --> 00:18:51.150 to the vector clip operation. 441 00:18:51.150 --> 00:18:54.120 Set the input raster to our projected dataset 442 00:18:54.120 --> 00:18:56.820 and the mask to the Waitsfield feature class. 443 00:18:56.820 --> 00:18:59.970 Let's also look at the extract by attributes option. 444 00:18:59.970 --> 00:19:02.130 This is essentially the same as a vector query 445 00:19:02.130 --> 00:19:04.290 and data export workflow. 446 00:19:04.290 --> 00:19:06.990 Remember with vector data, if you have features selected 447 00:19:06.990 --> 00:19:10.080 and you perform a geoprocessing operation on that dataset, 448 00:19:10.080 --> 00:19:13.530 only the selected features are considered for the operation. 449 00:19:13.530 --> 00:19:15.840 I set my input raster as the projected version 450 00:19:15.840 --> 00:19:18.540 of the crop scape data and then I create a query 451 00:19:18.540 --> 00:19:20.103 for values greater than zero. 452 00:19:21.000 --> 00:19:22.650 Let's take a look at the outputs. 453 00:19:23.490 --> 00:19:26.130 Generally speaking, they're all the same. 454 00:19:26.130 --> 00:19:29.010 That's a bit more obvious for the two on the right. 455 00:19:29.010 --> 00:19:30.420 Remember from a few slides back 456 00:19:30.420 --> 00:19:32.700 the image of the cropland data layer. 457 00:19:32.700 --> 00:19:34.620 It appears the right two outputs maintain 458 00:19:34.620 --> 00:19:37.020 the input raster symbology. 459 00:19:37.020 --> 00:19:39.960 Not so with the raster calculator output. 460 00:19:39.960 --> 00:19:42.510 Although the extent is the same as the other outputs 461 00:19:42.510 --> 00:19:44.430 and the cell values are too, 462 00:19:44.430 --> 00:19:47.610 the symbology was not carried over into the output. 463 00:19:47.610 --> 00:19:49.260 You could of course use a layer file 464 00:19:49.260 --> 00:19:51.633 to restore the symbology and be on your way. 465 00:19:52.560 --> 00:19:53.610 That's it for now. 466 00:19:53.610 --> 00:19:55.650 Hopefully I've demonstrated some useful insights 467 00:19:55.650 --> 00:19:58.920 into the multiple pathways to solving geospatial problems 468 00:19:58.920 --> 00:20:00.810 and the influence of environment settings 469 00:20:00.810 --> 00:20:03.090 on geoprocessing operations. 470 00:20:03.090 --> 00:20:04.950 Plenty more to talk about, but at this point 471 00:20:04.950 --> 00:20:07.380 I think it's time to do a little digging on your own. 472 00:20:07.380 --> 00:20:08.880 Grab some practice data, 473 00:20:08.880 --> 00:20:10.770 try different approaches and settings, 474 00:20:10.770 --> 00:20:13.620 take notes, and evaluate the outputs. 475 00:20:13.620 --> 00:20:15.120 I'll see you in lecture three.