[MUSIC] Hello everyone and welcome back. In this lesson, we're going to go through selection work flows. I think it should be a pretty fun lecture because we're going to take all these pieces you've been learning and try to chain them together into something that's a much more realistic example of what you would do when you're working with GIS data. I don't plan to show you any new tools in particular, but I do plan to show you how you might chain them together into a workflow that you might find useful. So, to start with, let's set up the scene here. I'm going to show you a little about the pre-processing I did to set this demo up, and then we'll get into actual demonstration itself. So this gray and white roster in the background is a digital elevation model. You get really used to surfaces that look like this because they become very apparent of how mountains look. The white area is higher elevations and the dark area is lower elevations. So we have this big valley running through here. If I turn the rivers back on, we can see all the rivers feed right into this valley and out to here. Now the pre-processing I did, I first generated a slope roster from that elevation roster. And that looks kind of crazy from here, so let's zoom in so you can see it a little better. And the red is areas of higher slope, and the green is areas of lower slope. So that valley is a lower slope area. I then thresholded the slope raster into two separate rasters, one where the slope was less than ten degrees and another where the slope was less than five degrees. Because what I'm trying to do is find these kind of flattish low lying areas. My end goal is to find the portions of the river that flow through these larger low lying areas. Next, I converted each of those to polygons. And I tested each different set of polygons for this demonstration, and we're going to end up using the slope, where it's less than 5 degrees set of polygons that I generated from all of this previous data. So I'll go ahead and turn the rest of that off now, and that way things will render faster. And I will zoom to the streams layer. Now, in this workflow, what I want to do is I want to find all the streams that are in these kind of flattish, low lying areas. And what were going to need to do, based on this workflow, we might do it differently if we had a different set of data. But what we're going to do in this workflow is we're going to find, we're going to select all the portions of slope that are less than five degrees. And then we're going to select the segments of rivers that intersect them with select by location. And then we're going to use interactive selection to clean up our selection and make sure it represents what we're looking for. That's the workflow that chains together at these three major types of selection. Okay, so let's start by selecting those flattish low lying areas, and I'll do select by attributes on the slope less than five degrees polygon. And to begin with, we'll put in the grid code which is the field of the converted raster to polygon. So it assigns the raster's pixel values to this field in the polygon. So grid code equals one because in the way that I converted it from raster to polygon, then thresholded it, one means that it was less than five degrees in this case. That's not what you're trying to learn here. Just know that grid code equals one means, in this instance, that it is less than five degrees. So I'm selecting all of the polygons where it's less than five degrees, and if I apply this I get a very large selection. And let's give it a try anyway. So I'm going to go to select by location now. And let's just swap these so we can kind of see everything here. I'll go to select by location. I'm going to select the streams that touch that polygon or those selected polygons. And I'm only going to use the selected features here. And we're going to use the intersection method, anything that touches one of these polygons. So I'll click apply. [BLANK-AUDIO] It's running a selection. And now, so I can see what streams we selected, I'm going to turn off the slow player and we'll turn back on the digital elevation model and it looks like we selected almost every stream. So this wasn't that useful to us yet. There are a few steams in here that we didn't select, like this one here and this one here. Let's try this again, but let's be a little more specific. Because if we take a look, and let me turn off selections here. If we zoom in again and take a look, we can see that we have some really tiny little polygons with that low slope. So we're touching some of this stuff in here even though it's not necessarily running through a low slope area. There's also a little bit of a data alignment issue we can see here. But for the most part this isn't a fully low slope area, there's a much higher slope in here somewhere. So let's zoom back out. And now let's say that in order for it to be a low slope area of interest to us, we're really looking for area that is less than five degrees but is also maybe of some size. So let's say, and the shape area is greater than maybe 20,000 square meters. So we'll do apply, and we got many fewer polygons here. And if we zoomed in again, we could see that we're excluding most of these small polygons and only getting these larger low slope areas. So that's good. That's what we're interested in right now. We're interested in low lying valleys, these large areas and this valley here, and these long, kind of contiguous areas of low slope. And if I run select by location again, so select features from the streams layer using the 205 selected features, I click apply, and then once again, let's turn off the slope layer. And that's better, that's much more what we're interested in in this case. We're getting the streams as they flow through this valley, but we're not getting all this kind of highland stream area here. Now, depending upon what I'm using this for, I can do a different set of clean up on this selection that I have. If I'm looking for kind of a cartographic representation of the main portions of this stream, I might want to add some things and remove some other things here. But, if I'm looking for a specific analysis, I would need to match whatever criteria I had for that analysis and go add things that maybe weren't represented in the data but that I know to be true about the rivers here. So in this case, let's say that I was using this as a first cut at kind of a main stream line layer, so that I could use for just cartography, that I could represent on a map. So, I'm going to start using the interactive selection to clean up these extra spots around the edges that I wouldn't say are part of the main stream line here. So, let's zoom in up here. And, to begin with, I'm going to go to selection type. Remove from current selection. And I'm going to remove these spots around the edges that aren't really part of that main stream line. And I'll zoom out a bit and go do the same over here. In these streams that are kind of highlands, they're not connected to the main stem here. And I can just say, you know what these aren't an important part of my cartography features here, and do that again. So I'm kind of cleaning my selection for whatever my purpose is in this case. And once again, if I was using this for analysis, I'd need to make sure that I'm meeting some measure of my analysis. I'm not just trying to create data that fits some preconceived notion of my analysis. I need to make sure it fits the actual need I have for the data. And then in here, we're missing some parts that are main stem, because this long segment of river looks like it's a main stem to me, but it's not getting connected to the rest of it. So it's probably a higher-gradient area, or maybe my data alignment wasn't good. So what I'm going to do instead, in this area, is I'm going to add in those main stem features so that they get represented on my map, too. So, I'll switch my interactive selection method back to add to current selection, and I'm just going to select these features one by one. Until I get connected to the rest of that main river, and I'll also fill in this little gap in here. And now we have a full set of features here, that is kind of a contiguous main portion of the river. If I wanted to refine this further, I could join in some attributes to the streams and select streams that met other criteria. I could also spend much more time on this extra selection phase, and remember that I can go do additional work with the selections by switching to the list by selection mode. And now, let's just make sure that it's what we want before we delete our selection, let's confirm that this is the selection we want. So I'm going to right-click to the selection and then create feature from selected layer. And then I'm going to turn off the streams layer so we can just see what the new layer looks like before we do any additional exporting or work on it. And now I could kind of validate this against whatever I needed. And if I wanted to make corrections I could turn this off, and turn this back on, and go work with the selection again. And then if I was done, I could right-click on either of these and save it out to a new layer. So if I go to export data on this one, there's no selection on this because it's a layer created from a selection. And I could export it and it'll export all the features. If I did the same thing to this one, remember that by default it exports only the selected features up here. And so again, I'm exporting basically the same data here to a permanent data set on my hard drive. Okay, so that's it for this lecture. In this lecture, I showed you how to chain together the three major types of selection, select by attributes, select by location and interactive selection into a cohesive workflow to help you achieve a specific objective in your GIS. I hope that helps you put together these concepts into something that's useful for you. See you next time.