[MUSIC] Hello everyone and welcome back. In this lesson, we're going to apply the knowledge from last lesson on geoprocessing tools and use it in working with the intersect tool. The intersect tool is one of those foundational elements of geo-processing. It's sort of an atomic unit of geo-processing that does a really basic operation and you'll find yourself using it quite a bit because it fits into many different analyses. So, to start with, let's set up a scenario. And this is one that comes directly from my work. At one point, we did some work to develop fish species range information for the United States Forest Service. Because they needed to know which fish species were on their lands, so they make sure that they were being good stewards of the streams and the habitat and the fish that were on the Forest Service land. So, in green here, I have the Forest Service land in California And this blue blob is a range of a single fish species called the hardhead or Mylopharodon Conocephalus which I probably just butchered the name for any of you who actually know fish. But so we have blue is the potential locations of this fish and green is the forest service lands. Now this is interesting to look at but what we really want to know is how much forest service land does this fish potentially reside on. And just so I I don't confuse many of you are thinking, well, fish are in streams, they're not on land. This is a watershed based representation. The fish could be in any of these streams in the watershed. So we're basically using terrestrial/aquatic unit to model the fish species range here. And our question still stands. How much of the for service land is this fish species on? To get that answer we're going to use the intersect tool. The intersect tool is sort of like a cousin of spacial join that you already know about. And what it does differently is it, instead of just attaching attributes, actually breaks the features apart and only gives us the portions of the features that we put in that overlap each other. For those of you who are familiar with set theory in mathematics, or programming, intersect still matches those other disciplines. In that intersect takes two things that you put in to it and only returns the common part, the inner section of those two. For those of you not familiar with mathematics, think of a road network. And where two roads cross, we have an intersection, it's the part of the two roads that overlaps, that's intersect. So, that's what's going to help us answer this question, because it's going to give us just the portions of the features where these two overlap, so we can answer that question of how much area is this fish species on? And if I go to the overlay tool set in the analysis tools in our toolbox, I will see the intersect tool, and I'll double-click it to run it. And I get the option to give it input features. And I'm going to click and select both of these with the shift key, and then I'll drag them into the box here. And it's runs both of those through this tool. Over the right here, I can see a graphical example of what it's going to do, which is that it takes two separate feature classes, and it puts out only the parts that overlap. And notice that, If we're looking at it from the circle's perspective, it breaks apart the circle based upon the rectangles. And if we're looking at it from the rectangle's perspective, it clips the rectangles to the circle. So we get all the boundaries within the area that we are looking at. Now I'm going to give it a name of hard head on forest service land. And I'm going to let it join all the attributes. Just like with spacial join, we can have attached attributes based upon which polygons are overlapping which other polygons. This is really handy and really expands the potential analysis we can do with this tool. And the rest of this I'm going to leave at its defaults and I'll click okay. And I can see in the bottom again that it's running and it should be pretty quick. Intersect is usually a relatively quick tool even when it's running on complex polygons. And, we can see that it finished already, and I get my hard head on for surface land flare here. Let's go zoom in on a portion up here. And just so we can see what's going on, let's make this new layer hollow so that we can see what's underneath it, but let's make the boundary relatively thick and easy to see here. And we can see that it matches the outline of the hard head layer. And then let's make the hard-head range layer somewhat transparent so we can see what's beneath it. And what we can see is this black outline tracks where both of these overlap. in this complex area in here, it does not give us back as polygons to this portion in between the small polygons of the forest service land here. So, this is not part of our returned layer, but this part here is where they barely overlap, and this part same thing. So, we can see that only the parts where these overlap are returned. Okay, so then how do we get the answer to my question of how much area of the forest service land is this species potentially on? Stop and think about it for a second. You already know the tool that you need to use. At least, if you came from the previous class. I'm going to go over to the attribute table on the Hardhead on forest service land. And since we only have the portions of these two feature classes that overlap, if I go all the way over to the right to the shape area which was automatically calculated for me since it's in a geodatabase. I can right-click on it and go to statistics. And right here I get the sum in square meters of the total area of land. And while that looks like a really big number, if we check our number here it's about 8,500 square kilometers, which if we were to convert that would be 3,035 square miles. And that's a lot, but it seems to jive with what we're looking at too. And one last thing we can do, if we want to take this a little further, is we could say what if I want to know how much of a particular forest it's on? Well, I'll go to select my attributes, and since the forest name is on there, I can do forest name, and get unique values, and let's say El Dorado National Forest there. Equals El Dorado, I will do apply. And I'm going to right click on this layer and I go to selection and zoom to those selected features, so we could see what we're looking at here. So we can see the features that on El Dorado National Forest here. And now, if I go to the attribute table now, I can see just those features. And I can right-click on the shape area field again and go to statistics, and I can see that I'm getting a different answer based upon my selection. So that's three, that's six, so that's 567 square kilometers here. And that's much smaller than before and makes sense, given the area we're looking at. So, 567 square kilometers on this particular national forest. Okay, that's it for this demo. In this demo I showed you how to use the intersect tool to take two features and find the parts of them that overlap and get new features back showing only the areas that overlap. I also showed you how to incorporate that tool into a workflow to get answers to your questions. In a future demo, we'll ramp up how we used the Intersect tool to get answers to things like percent overlap, and we'll also continue giving examples of different workflows in GIS with geoprocessing tools. I think this is where GIS is really fun, and I hope you enjoy it too. See you next time.