[MUSIC] Hello everyone and welcome back. In this lesson, I'm going to go over the percent overlap workflow with you. Percent overlap is exactly what it sounds like. It's, if we were to take two features in our GIS, it would be the percentage of those two combined that overlaps. So to build that work flow, though, we need to have the concept of Union and Intersect first. So we've gone over the Intersect tool, which gives us the coincident parts of the two data sets or groups, only the part that overlaps, but to get percent overlap, we also need to understand Union. And we'll do it in a mathematical way. So first let's imagine we have two sets of numbers. We have number set A, which is the numbers 1, 4 and 6 and number set B, which is numbers 2, 3 and 4. Now the intersect, which we already understand of those two, is just 4. The only number that's in both of those is the number 4. 1 and 6 get discarded because they're not in B, and 2 and 3 get discarded from B because they're not in A. Only 4 is in both, so that's the intersect, that's the overlapping portion. The Union of those though is 1,4,6,2,3. It's the combination of anything that happens to be in either of them. So 1 and 6 are in A, or 1, 4 and 6 are in A and 2, 3 and 4 are in B. And we only count 4 once. So 1,4,6 from A and then we can append 2 and 3 on the end. That's the union of those two. In feature information, it works the same way. The union is any area that happens to be in either feature class. So there's a Union tool that produces features that are in any input feature. And I'll show you that in a moment. So present overlap though, the algorithm for it is A intersect B over A union B. So the Intersect of two features over the Union of two features. And in a geoprocessing workflow, we're going to have to calculate the fields and rather than have you process what this means, I'll show it to you instead. But know that percent overlap is Intersect over Union. So that's what were about to do. So here we have select data that we use for the data-driven pages demonstration. It's the range of a particular fish species called hardhead in California. But I have an old version of the range from the 1990s and the new version of range from 2013 or so. And I want to know, how much our knowledge of the species has deviated. It could that the species range changed or that we got better information. But I want to compare the percent overlap, the percent agreement of these two layers, the old one and the new one. So lets do that now. The first thing we need is we need to Union the two layers. So bring in our toolbox, go to analysis tools, overlay. And just like we have Intersect, we have Union. And to give you the graphical representation of what we just talked about, here two input features. The yellow feature and the two features in the purple, and the Union is all of those. And it's broken up by any boundary there, so that any part that intersect get broken into any features, but we capture all of the same areas. So let's bring both of these into the Union tool. And then all Union species ranges. Let's give it a name we actually understand. And say OK. And what it's going to do is it's going to union those two and give me a new layer as a result, that is any area that either of those two have. Okay, so I hope this helps intuitively understand it. Where we have the one range and we have the other range, now we have both ranges, and any boundary is included as well. So all of a sudden we have all of the feature information kind of in one spot. Now let's do the Intersect, only the parts of the two that overlap. So, we need the Intersect as well as the Union to do this. So, I'll do intersect here and it's the same sort of thing. We provide the same information almost to the geoprocessing tool and we'll do Intersect, species, ranges, and over on the tool, it's writing down below. And you remember Intersect tool from before. And here we have only the parts that are common to both of them. So let's zoom into a spot and examine this. So to show the difference, in the blue, or in the green we have the old range and in the blue we have the new range. And so, the green that's shown right here is the spot where only the old range exists and the blue that's protruding out past the green boundary here, let's make this semi-transparent so we could see a little better. [SOUND] That blue that's protruding out past it is only in the new range. In Union, it doesn't matter, both of those show up. In Intersect it does matter. Only the spots that are in both show up. So we can see the spots in all the range that don't show up in the Intersect, and we can see the spots in the new range that don't show up in the Intersect. So Intersect is kind of that exclusive combination. Now, let's figure out the percent overlap, the percent agreement. Well, the really simple way to do it is to just look at the attribute tables and go find the shaped area, and do the statistics on that shaped area, and get a sum of the area. So, statistics for this, I'm going to copy this very large number. So we have that in the calculator and then, let's go find an Intersect value. [SOUND] Then go to the attribute table, and go to the end, and get the statistics. And if we get the sum of the area here, and go back to the calculator again, so save that value. Then we'll put in this other value here for the intersected area. And then we'll divide it by the value in memory here, so Intersect divided by Union. So we're dividing the total area of the intersected polygon by the total area of the union polygon, and we'll see that we have about 61% overlap for these two. Now to make a little easier to conceptualize, we can also dissolve these layers here. So let's go to data management, and generalization, and there's a dissolve tool. Dissolve takes all the feature boundaries and makes them not matter anymore. So if this is one feature class, here we can, or features that share an attribute, they all get their boundaries removed. So let's dissolve our Intersect features. We'll name it Dissolve_Intersect. And while that's running, we'll set up the union as well. And we'll call it Dissolve_Union. And I'll click okay and now let's turn off the rest of these in the background. And now it's easy to see, and there are no boundaries, and so there's only one feature. Instead of having to sum it up, we can just grab the total value for the area from the shape area field. Since Dissolve removed all the boundaries between the features but kept the full outline, we have one Polygon that has the area of all them. So we can pull the values straight from this one field in the shape area field instead of having to get some from statistics, and we get the side benefit of seeing the areas that were analyzing more clearly here. So again, just to show that we did the workflow I talked about to get percent overlap, what we did is we found the Intersect and the Union, and since percent overlap is Intersect divided by Union, all we need is the area of the Intersected polygons and the area of the Union polygons. And we're dividing the intersect area by the union area. So we get the area from that table either by summing up all the features or dissolving and grabbing this, and then we divide this value from the intersected field by the unioned value from the shape area field in the union table. And when we did that, we got 61%. Okay, so that's it for this lecture. That's the percent overlap or the percent agreement workflow, where we can figure out how much of two sets of polygons overlaps, or what percentage of those two sets of polygons overlaps? And, we do that by calculating the Intersection area of the two polygons and the Union area of the two polygons. And then, getting the value of those areas from the attribute table and then dividing them, Intersect divided by Union. And that gives us the percentage overlap. I hope that helps. I think this workflow is kind of fun, and I hope you can find a way to use it in your own work. See you next time.